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 | |
---|
10 | #ifndef _RTEMS_NETWORKCONFIG_H_ |
---|
11 | #define _RTEMS_NETWORKCONFIG_H_ |
---|
12 | |
---|
13 | /* |
---|
14 | * The following will normally be set by the BSP if it supports |
---|
15 | * a single network device driver. In the event, it supports |
---|
16 | * multiple network device drivers, then the user's default |
---|
17 | * network device driver will have to be selected by a BSP |
---|
18 | * specific mechanism. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
22 | #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined" |
---|
23 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1" |
---|
24 | #endif |
---|
25 | |
---|
26 | #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH |
---|
27 | #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined" |
---|
28 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0 |
---|
29 | #endif |
---|
30 | |
---|
31 | /* #define RTEMS_USE_BOOTP */ |
---|
32 | |
---|
33 | #include <bsp.h> |
---|
34 | |
---|
35 | /* |
---|
36 | * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the |
---|
37 | * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not |
---|
38 | * defined the driver will choose an address. |
---|
39 | */ |
---|
40 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
41 | static char ethernet_address[6] = { 0x00, 0x04, 0x9F, 0x00, 0x5B, 0x21 }; |
---|
42 | #endif |
---|
43 | |
---|
44 | /* |
---|
45 | * Default network interface |
---|
46 | */ |
---|
47 | static struct rtems_bsdnet_ifconfig netdriver_config = { |
---|
48 | RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ |
---|
49 | RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ |
---|
50 | NULL, /* No more interfaces */ |
---|
51 | |
---|
52 | #if (defined (RTEMS_USE_BOOTP)) |
---|
53 | NULL, /* BOOTP supplies IP address */ |
---|
54 | NULL, /* BOOTP supplies IP net mask */ |
---|
55 | #else |
---|
56 | "192.168.1.245", /* IP address */ |
---|
57 | "255.255.255.0", /* IP net mask */ |
---|
58 | #endif /* !RTEMS_USE_BOOTP */ |
---|
59 | |
---|
60 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
61 | ethernet_address, /* Ethernet hardware address */ |
---|
62 | #else |
---|
63 | NULL, /* Driver supplies hardware address */ |
---|
64 | #endif |
---|
65 | 0, /* ignore broadcast */ |
---|
66 | 0, /* mtu */ |
---|
67 | 0, /* rbuf_count */ |
---|
68 | 0, /* xbuf_count */ |
---|
69 | 0, /* port */ |
---|
70 | 0, /* irq */ |
---|
71 | 0, /* bpar */ |
---|
72 | NULL /* driver control pointer */ |
---|
73 | }; |
---|
74 | |
---|
75 | /* |
---|
76 | * Network configuration |
---|
77 | */ |
---|
78 | struct rtems_bsdnet_config rtems_bsdnet_config = { |
---|
79 | &netdriver_config, |
---|
80 | |
---|
81 | #if (defined (RTEMS_USE_BOOTP)) |
---|
82 | rtems_bsdnet_do_bootp, |
---|
83 | #else |
---|
84 | NULL, |
---|
85 | #endif |
---|
86 | |
---|
87 | 0, /* Default network task priority */ |
---|
88 | 256 * 1024, /* Default mbuf capacity */ |
---|
89 | 256 * 1024, /* Default mbuf cluster capacity */ |
---|
90 | |
---|
91 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
92 | "rtems", /* Host name */ |
---|
93 | "nodomain.com", /* Domain name */ |
---|
94 | "192.168.1.14", /* Gateway */ |
---|
95 | "192.168.1.1", /* Log host */ |
---|
96 | {"192.168.1.1" }, /* Name server(s) */ |
---|
97 | {"192.168.1.1" }, /* NTP server(s) */ |
---|
98 | #else |
---|
99 | NULL, /* Host name */ |
---|
100 | NULL, /* Domain name */ |
---|
101 | NULL, /* Gateway */ |
---|
102 | NULL, /* Log host */ |
---|
103 | { NULL }, /* Name server(s) */ |
---|
104 | { NULL }, /* NTP server(s) */ |
---|
105 | #endif /* !RTEMS_USE_BOOTP */ |
---|
106 | 0, /* efficiency */ |
---|
107 | 0, /* udp TX buffer */ |
---|
108 | 0, /* udp RX buffer */ |
---|
109 | 0, /* tcp TX buffer */ |
---|
110 | 0, /* tcp RX buffer */ |
---|
111 | }; |
---|
112 | |
---|
113 | /* |
---|
114 | * For TFTP test application |
---|
115 | */ |
---|
116 | #if (defined (RTEMS_USE_BOOTP)) |
---|
117 | #define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST" |
---|
118 | #define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE" |
---|
119 | #else |
---|
120 | #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" |
---|
121 | #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" |
---|
122 | #endif |
---|
123 | |
---|
124 | /* |
---|
125 | * For NFS test application |
---|
126 | * |
---|
127 | * NFS server/path to mount and a directory to ls once mounted |
---|
128 | */ |
---|
129 | #define RTEMS_NFS_SERVER "192.168.1.210" |
---|
130 | #define RTEMS_NFS_SERVER_PATH "/home" |
---|
131 | #define RTEMS_NFS_LS_PATH "/mnt/nfstest" |
---|
132 | |
---|
133 | #endif /* _RTEMS_NETWORKCONFIG_H_ */ |
---|