1 | /* |
---|
2 | * Network configuration for MPC8313ERDB in RTEMS Lab |
---|
3 | * |
---|
4 | ************************************************************ |
---|
5 | * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION * |
---|
6 | * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! * |
---|
7 | ************************************************************ |
---|
8 | * |
---|
9 | * $Id$ |
---|
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 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
24 | #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined" |
---|
25 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1" |
---|
26 | #endif |
---|
27 | |
---|
28 | #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH |
---|
29 | #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined" |
---|
30 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0 |
---|
31 | #endif |
---|
32 | |
---|
33 | /* #define RTEMS_USE_BOOTP */ |
---|
34 | |
---|
35 | #include <bsp.h> |
---|
36 | |
---|
37 | /* |
---|
38 | * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the |
---|
39 | * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not |
---|
40 | * defined the driver will choose an address. |
---|
41 | */ |
---|
42 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
43 | static char ethernet_address[6] = { 0x00, 0x04, 0x9F, 0x00, 0x5B, 0x21 }; |
---|
44 | #endif |
---|
45 | |
---|
46 | /* |
---|
47 | * Default network interface |
---|
48 | */ |
---|
49 | static struct rtems_bsdnet_ifconfig netdriver_config = { |
---|
50 | RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ |
---|
51 | RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ |
---|
52 | NULL, /* No more interfaces */ |
---|
53 | |
---|
54 | #if (defined (RTEMS_USE_BOOTP)) |
---|
55 | NULL, /* BOOTP supplies IP address */ |
---|
56 | NULL, /* BOOTP supplies IP net mask */ |
---|
57 | #else |
---|
58 | "192.168.1.245", /* IP address */ |
---|
59 | "255.255.255.0", /* IP net mask */ |
---|
60 | #endif /* !RTEMS_USE_BOOTP */ |
---|
61 | |
---|
62 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
63 | ethernet_address, /* Ethernet hardware address */ |
---|
64 | #else |
---|
65 | NULL, /* Driver supplies hardware address */ |
---|
66 | #endif |
---|
67 | 0, /* ignore broadcast */ |
---|
68 | 0, /* mtu */ |
---|
69 | 0, /* rbuf_count */ |
---|
70 | 0, /* xbuf_count */ |
---|
71 | 0, /* port */ |
---|
72 | 0, /* irq */ |
---|
73 | 0, /* bpar */ |
---|
74 | NULL /* driver control pointer */ |
---|
75 | }; |
---|
76 | |
---|
77 | /* |
---|
78 | * Network configuration |
---|
79 | */ |
---|
80 | struct rtems_bsdnet_config rtems_bsdnet_config = { |
---|
81 | &netdriver_config, |
---|
82 | |
---|
83 | #if (defined (RTEMS_USE_BOOTP)) |
---|
84 | rtems_bsdnet_do_bootp, |
---|
85 | #else |
---|
86 | NULL, |
---|
87 | #endif |
---|
88 | |
---|
89 | 0, /* Default network task priority */ |
---|
90 | 256 * 1024, /* Default mbuf capacity */ |
---|
91 | 256 * 1024, /* Default mbuf cluster capacity */ |
---|
92 | |
---|
93 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
94 | "rtems", /* Host name */ |
---|
95 | "nodomain.com", /* Domain name */ |
---|
96 | "192.168.1.14", /* Gateway */ |
---|
97 | "192.168.1.1", /* Log host */ |
---|
98 | {"192.168.1.1" }, /* Name server(s) */ |
---|
99 | {"192.168.1.1" }, /* NTP server(s) */ |
---|
100 | #else |
---|
101 | NULL, /* Host name */ |
---|
102 | NULL, /* Domain name */ |
---|
103 | NULL, /* Gateway */ |
---|
104 | NULL, /* Log host */ |
---|
105 | { NULL }, /* Name server(s) */ |
---|
106 | { NULL }, /* NTP server(s) */ |
---|
107 | #endif /* !RTEMS_USE_BOOTP */ |
---|
108 | 0, /* efficiency */ |
---|
109 | 0, /* udp TX buffer */ |
---|
110 | 0, /* udp RX buffer */ |
---|
111 | 0, /* tcp TX buffer */ |
---|
112 | 0, /* tcp RX buffer */ |
---|
113 | }; |
---|
114 | |
---|
115 | /* |
---|
116 | * For TFTP test application |
---|
117 | */ |
---|
118 | #if (defined (RTEMS_USE_BOOTP)) |
---|
119 | #define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST" |
---|
120 | #define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE" |
---|
121 | #else |
---|
122 | #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" |
---|
123 | #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" |
---|
124 | #endif |
---|
125 | |
---|
126 | /* |
---|
127 | * For NFS test application |
---|
128 | * |
---|
129 | * NFS server/path to mount and a directory to ls once mounted |
---|
130 | */ |
---|
131 | #define RTEMS_NFS_SERVER "192.168.1.210" |
---|
132 | #define RTEMS_NFS_SERVER_PATH "/home" |
---|
133 | #define RTEMS_NFS_LS_PATH "/mnt/nfstest" |
---|
134 | |
---|
135 | #endif /* _RTEMS_NETWORKCONFIG_H_ */ |
---|