[4cfe89f] | 1 | /* |
---|
| 2 | * Network configuration |
---|
| 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 | |
---|
[16a968e] | 15 | #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME |
---|
| 16 | #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined" |
---|
| 17 | #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1" |
---|
| 18 | #endif |
---|
| 19 | |
---|
| 20 | #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH |
---|
| 21 | #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined" |
---|
| 22 | #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0 |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | /* #define RTEMS_USE_BOOTP */ |
---|
[4cfe89f] | 26 | |
---|
| 27 | #include <bsp.h> |
---|
| 28 | |
---|
[f84493d] | 29 | /* |
---|
| 30 | * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the |
---|
| 31 | * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not |
---|
| 32 | * defined the driver will choose an address. |
---|
| 33 | */ |
---|
[16a968e] | 34 | #define RTEMS_SET_ETHERNET_ADDRESS |
---|
[f84493d] | 35 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
[16a968e] | 36 | /* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */ |
---|
| 37 | static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 }; |
---|
| 38 | |
---|
[f84493d] | 39 | #endif |
---|
| 40 | |
---|
[4cfe89f] | 41 | /* |
---|
| 42 | * Default network interface |
---|
| 43 | */ |
---|
| 44 | static struct rtems_bsdnet_ifconfig netdriver_config = { |
---|
| 45 | RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ |
---|
| 46 | RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ |
---|
| 47 | |
---|
| 48 | NULL, /* link to next interface */ |
---|
| 49 | |
---|
| 50 | #if (defined (RTEMS_USE_BOOTP)) |
---|
| 51 | NULL, /* BOOTP supplies IP address */ |
---|
| 52 | NULL, /* BOOTP supplies IP net mask */ |
---|
| 53 | #else |
---|
[83c159d] | 54 | "XXX.YYY.ZZZ.XYZ", /* IP address */ |
---|
[4cfe89f] | 55 | "255.255.255.0", /* IP net mask */ |
---|
| 56 | #endif /* !RTEMS_USE_BOOTP */ |
---|
| 57 | |
---|
[f84493d] | 58 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
| 59 | ethernet_address, /* Ethernet hardware address */ |
---|
| 60 | #else |
---|
| 61 | NULL, /* Driver supplies hardware address */ |
---|
| 62 | #endif |
---|
[4cfe89f] | 63 | 0 /* Use default driver parameters */ |
---|
| 64 | }; |
---|
| 65 | |
---|
| 66 | /* |
---|
| 67 | * Network configuration |
---|
| 68 | */ |
---|
| 69 | struct rtems_bsdnet_config rtems_bsdnet_config = { |
---|
| 70 | &netdriver_config, |
---|
| 71 | |
---|
| 72 | #if (defined (RTEMS_USE_BOOTP)) |
---|
| 73 | rtems_bsdnet_do_bootp, |
---|
| 74 | #else |
---|
| 75 | NULL, |
---|
| 76 | #endif |
---|
| 77 | |
---|
| 78 | 0, /* Default network task priority */ |
---|
| 79 | 0, /* Default mbuf capacity */ |
---|
| 80 | 0, /* Default mbuf cluster capacity */ |
---|
| 81 | |
---|
| 82 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
[83c159d] | 83 | "rtems_host", /* Host name */ |
---|
| 84 | "nodomain.com", /* Domain name */ |
---|
| 85 | "XXX.YYY.ZZZ.1", /* Gateway */ |
---|
| 86 | "XXX.YYY.ZZZ.1", /* Log host */ |
---|
| 87 | {"XXX.YYY.ZZZ.1" }, /* Name server(s) */ |
---|
| 88 | |
---|
| 89 | /* |
---|
| 90 | * A real example -- DO NOT USE THIS YOURSELF!!! |
---|
| 91 | */ |
---|
| 92 | |
---|
[16a968e] | 93 | #if 0 |
---|
| 94 | "dy4", /* Host name */ |
---|
[83c159d] | 95 | "NOT_oarcorp.com", /* Domain name */ |
---|
[16a968e] | 96 | "192.168.1.2", /* Gateway */ |
---|
| 97 | "192.168.1.2", /* Log host */ |
---|
| 98 | {"192.168.1.2" }, /* Name server(s) */ |
---|
[83c159d] | 99 | #endif |
---|
[4cfe89f] | 100 | #endif /* !RTEMS_USE_BOOTP */ |
---|
| 101 | |
---|
| 102 | }; |
---|
| 103 | |
---|
| 104 | /* |
---|
| 105 | * For TFTP test application |
---|
| 106 | */ |
---|
| 107 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
[83c159d] | 108 | #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" |
---|
[16a968e] | 109 | #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" |
---|
[4cfe89f] | 110 | #endif |
---|
| 111 | |
---|
| 112 | #endif /* _RTEMS_NETWORKCONFIG_H_ */ |
---|