Changeset 7bd2c06 in network-demos
- Timestamp:
- 09/14/07 20:54:42 (16 years ago)
- Branches:
- 4.11, 57a009d5b89e72f488ab655184e6a33bb0fe6b7f, network-demos-4-10-branch, network-demos-4-8-branch, network-demos-4-9-branch
- Children:
- 5538df4
- Parents:
- e8722e7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
re8722e7 r7bd2c06 1 2007-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> 2 3 * networkconfig.h: Loopback only network configuration. Use one of the 4 real ones as an example. 5 1 6 2007-09-07 Joel Sherrill <joel.sherrill@oarcorp.com> 2 7 -
networkconfig.h
re8722e7 r7bd2c06 1 1 /* 2 * Network configuration EXAMPLE!!! 2 * Network configuration -- LOOPBACK ONLY!!! 3 * 4 * See one of the other networkconfig.h files for an 5 * example of a system that includes a real NIC and 6 * the loopback interface. 3 7 * 4 8 ************************************************************ … … 13 17 #define _RTEMS_NETWORKCONFIG_H_ 14 18 15 /*16 * The following will normally be set by the BSP if it supports17 * a single network device driver. In the event, it supports18 * multiple network device drivers, then the user's default19 * network device driver will have to be selected by a BSP20 * specific mechanism.21 */22 23 #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME24 #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"25 #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"26 #endif27 28 #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH29 #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"30 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 031 #endif32 19 33 20 /* #define RTEMS_USE_BOOTP */ … … 36 23 37 24 /* 38 * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the39 * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not40 * defined the driver will choose an address.41 */42 #define RTEMS_SET_ETHERNET_ADDRESS43 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))44 /* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */45 static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };46 47 #endif48 49 #define RTEMS_USE_LOOPBACK50 #ifdef RTEMS_USE_LOOPBACK51 /*52 25 * Loopback interface 53 26 */ 54 extern void rtems_bsdnet_loopattach(); 55 static struct rtems_bsdnet_ifconfig loopback_config = { 56 "lo0", /* name */ 57 rtems_bsdnet_loopattach, /* attach function */ 58 59 NULL, /* link to next interface */ 60 61 "127.0.0.1", /* IP address */ 62 "255.0.0.0", /* IP net mask */ 63 }; 64 #endif 27 extern int rtems_bsdnet_loopattach(); 65 28 66 29 /* … … 68 31 */ 69 32 static struct rtems_bsdnet_ifconfig netdriver_config = { 70 RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ 71 RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ 72 73 #ifdef RTEMS_USE_LOOPBACK 74 &loopback_config, /* link to next interface */ 75 #else 76 NULL, /* No more interfaces */ 77 #endif 78 79 #if (defined (RTEMS_USE_BOOTP)) 80 NULL, /* BOOTP supplies IP address */ 81 NULL, /* BOOTP supplies IP net mask */ 82 #else 83 "XXX.YYY.ZZZ.XYZ", /* IP address */ 84 "255.255.255.0", /* IP net mask */ 85 #endif /* !RTEMS_USE_BOOTP */ 86 87 #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) 88 ethernet_address, /* Ethernet hardware address */ 89 #else 90 NULL, /* Driver supplies hardware address */ 91 #endif 92 0 /* Use default driver parameters */ 33 "lo0", /* name */ 34 rtems_bsdnet_loopattach, /* attach function */ 35 NULL, /* No more interfaces */ 36 "127.0.0.1", /* IP address */ 37 "255.0.0.0", /* IP net mask */ 38 NULL, /* Driver supplies hardware address */ 39 0 /* Use default driver parameters */ 93 40 }; 94 41 … … 97 44 */ 98 45 struct rtems_bsdnet_config rtems_bsdnet_config = { 99 #if 0 100 &netdriver_config, 101 #endif 102 103 #if (defined (RTEMS_USE_BOOTP)) 104 rtems_bsdnet_do_bootp, 105 #else 106 NULL, 107 #endif 108 109 0, /* Default network task priority */ 110 0, /* Default mbuf capacity */ 111 0, /* Default mbuf cluster capacity */ 112 113 #if (!defined (RTEMS_USE_BOOTP)) 114 "rtems_host", /* Host name */ 115 "nodomain.com", /* Domain name */ 116 "XXX.YYY.ZZZ.1", /* Gateway */ 117 "XXX.YYY.ZZZ.1", /* Log host */ 118 {"XXX.YYY.ZZZ.1" }, /* Name server(s) */ 119 {"XXX.YYY.ZZZ.1" }, /* NTP server(s) */ 120 121 #endif /* !RTEMS_USE_BOOTP */ 122 46 &netdriver_config, 47 NULL, /* do not use bootp */ 48 0, /* Default network task priority */ 49 0, /* Default mbuf capacity */ 50 0, /* Default mbuf cluster capacity */ 123 51 }; 124 52
Note: See TracChangeset
for help on using the changeset viewer.