1 | /* |
---|
2 | * Network configuration -- QEMU NOT using DHCP |
---|
3 | * |
---|
4 | ************************************************************ |
---|
5 | * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION * |
---|
6 | * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! * |
---|
7 | ************************************************************ |
---|
8 | * |
---|
9 | * networkconfig.h,v 1.8 2001/08/31 18:11:43 joel Exp |
---|
10 | */ |
---|
11 | |
---|
12 | #ifndef _RTEMS_NETWORKCONFIG_H_ |
---|
13 | #define _RTEMS_NETWORKCONFIG_H_ |
---|
14 | |
---|
15 | /* |
---|
16 | * The following will normally be set by the BSP if it supports |
---|
17 | * a single network device driver. In the event, it supports |
---|
18 | * multiple network device drivers, then the user's default |
---|
19 | * network device driver will have to be selected by a BSP |
---|
20 | * specific mechanism. |
---|
21 | */ |
---|
22 | |
---|
23 | #undef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
24 | #undef RTEMS_BSP_NETWORK_DRIVER_ATTACH |
---|
25 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "ne1" |
---|
26 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach |
---|
27 | |
---|
28 | #ifdef RTEMS_USE_BOOTP |
---|
29 | #undef RTEMS_USE_BOOTP |
---|
30 | #endif |
---|
31 | |
---|
32 | /* |
---|
33 | * If you use DHCP on the QEMU instance, there is less configuration |
---|
34 | */ |
---|
35 | // #define RTEMS_USE_BOOTP |
---|
36 | |
---|
37 | #include <bsp.h> |
---|
38 | |
---|
39 | /* |
---|
40 | * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the |
---|
41 | * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not |
---|
42 | * defined the driver will choose an address. |
---|
43 | */ |
---|
44 | //#define RTEMS_SET_ETHERNET_ADDRESS |
---|
45 | #ifdef RTEMS_SET_ETHERNET_ADDRESS |
---|
46 | #undef RTEMS_SET_ETHERNET_ADDRESS |
---|
47 | #endif |
---|
48 | |
---|
49 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
50 | /* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */ |
---|
51 | static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 }; |
---|
52 | #endif |
---|
53 | |
---|
54 | #ifdef RTEMS_USE_LOOPBACK |
---|
55 | /* |
---|
56 | * Loopback interface |
---|
57 | */ |
---|
58 | extern void rtems_bsdnet_loopattach(); |
---|
59 | static struct rtems_bsdnet_ifconfig loopback_config = { |
---|
60 | "lo0", /* name */ |
---|
61 | rtems_bsdnet_loopattach, /* attach function */ |
---|
62 | NULL, /* link to next interface */ |
---|
63 | "127.0.0.1", /* IP address */ |
---|
64 | "255.0.0.0", /* IP net mask */ |
---|
65 | }; |
---|
66 | #endif |
---|
67 | |
---|
68 | /* |
---|
69 | * Default network interface |
---|
70 | */ |
---|
71 | static struct rtems_bsdnet_ifconfig netdriver_config = { |
---|
72 | RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ |
---|
73 | RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ |
---|
74 | |
---|
75 | #ifdef RTEMS_USE_LOOPBACK |
---|
76 | &loopback_config, /* link to next interface */ |
---|
77 | #else |
---|
78 | NULL, /* No more interfaces */ |
---|
79 | #endif |
---|
80 | |
---|
81 | #if (defined (RTEMS_USE_BOOTP)) |
---|
82 | NULL, /* BOOTP supplies IP address */ |
---|
83 | NULL, /* BOOTP supplies IP net mask */ |
---|
84 | #else |
---|
85 | "10.0.2.5", /* IP address */ |
---|
86 | "255.255.255.0", /* IP net mask */ |
---|
87 | #endif /* !RTEMS_USE_BOOTP */ |
---|
88 | |
---|
89 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
90 | ethernet_address, /* Ethernet hardware address */ |
---|
91 | #else |
---|
92 | NULL, /* Driver supplies hardware address */ |
---|
93 | #endif |
---|
94 | 0, /* Use default driver parameters */ |
---|
95 | 0, /* mtu */ |
---|
96 | 0, /* rbuf_count */ |
---|
97 | 0, /* xbuf_count */ |
---|
98 | 0, /* port */ |
---|
99 | 9 /* irq */ |
---|
100 | }; |
---|
101 | |
---|
102 | /* |
---|
103 | * Network configuration |
---|
104 | */ |
---|
105 | struct rtems_bsdnet_config rtems_bsdnet_config = { |
---|
106 | &netdriver_config, |
---|
107 | |
---|
108 | #if (defined (RTEMS_USE_BOOTP)) |
---|
109 | rtems_bsdnet_do_bootp, |
---|
110 | #else |
---|
111 | NULL, |
---|
112 | #endif |
---|
113 | 0, /* Default network task priority */ |
---|
114 | 256 * 1024, /* 256K - not default mbuf capacity */ |
---|
115 | 256 * 1024, /* 256K - not default mbuf cluster capacity */ |
---|
116 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
117 | "rtems", /* Host name */ |
---|
118 | "", /* Domain name */ |
---|
119 | "10.0.2.1", /* Gateway */ |
---|
120 | "10.0.0.1", /* Log host */ |
---|
121 | {"10.0.2.3" }, /* Name server(s) */ |
---|
122 | {"" }, /* NTP server(s) */ |
---|
123 | #else |
---|
124 | #error "Fill me in" |
---|
125 | #endif /* !RTEMS_USE_BOOTP */ |
---|
126 | 1, /* sb_efficiency */ |
---|
127 | 0, /* udp_tx_buf_size */ |
---|
128 | 0, /* udp_rx_buf_size */ |
---|
129 | 0, /* tcp_tx_buf_size */ |
---|
130 | 0 /* tcp_rx_buf_size */ |
---|
131 | |
---|
132 | }; |
---|
133 | |
---|
134 | /* |
---|
135 | * For TFTP test application |
---|
136 | */ |
---|
137 | #if (defined (RTEMS_USE_BOOTP)) |
---|
138 | #define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST" |
---|
139 | #define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE" |
---|
140 | #else |
---|
141 | #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" |
---|
142 | #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" |
---|
143 | #endif |
---|
144 | |
---|
145 | /* |
---|
146 | * For NFS test application |
---|
147 | * |
---|
148 | * NFS mount and a directory to ls once mounted |
---|
149 | */ |
---|
150 | #define RTEMS_NFS_SERVER "192.168.1.210" |
---|
151 | #define RTEMS_NFS_SERVER_PATH "/home" |
---|
152 | #define RTEMS_NFS_LS_PATH "/mnt/nfstest" |
---|
153 | |
---|
154 | #endif /* _RTEMS_NETWORKCONFIG_H_ */ |
---|