[3d7557e] | 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 | |
---|
| 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 */ |
---|
| 26 | |
---|
| 27 | #include <bsp.h> |
---|
| 28 | |
---|
| 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 | */ |
---|
| 34 | #define RTEMS_SET_ETHERNET_ADDRESS |
---|
| 35 | #if (defined (RTEMS_SET_ETHERNET_ADDRESS)) |
---|
| 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 | |
---|
| 39 | #endif |
---|
| 40 | |
---|
| 41 | /* |
---|
| 42 | * Default network interface |
---|
| 43 | */ |
---|
| 44 | static struct rtems_bsdnet_ifconfig netdriver_config = { |
---|
| 45 | #if 0 |
---|
| 46 | RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */ |
---|
| 47 | RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */ |
---|
| 48 | #endif |
---|
| 49 | "no driver", /* name */ |
---|
| 50 | NULL, /* attach function */ |
---|
| 51 | |
---|
| 52 | NULL, /* link to next interface */ |
---|
| 53 | |
---|
| 54 | #if (defined (RTEMS_USE_BOOTP)) |
---|
| 55 | NULL, /* BOOTP supplies IP address */ |
---|
| 56 | NULL, /* BOOTP supplies IP net mask */ |
---|
| 57 | #else |
---|
| 58 | "XXX.YYY.ZZZ.XYZ", /* 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 /* Use default driver parameters */ |
---|
| 68 | }; |
---|
| 69 | |
---|
| 70 | /* |
---|
| 71 | * Network configuration |
---|
| 72 | */ |
---|
| 73 | struct rtems_bsdnet_config rtems_bsdnet_config = { |
---|
| 74 | &netdriver_config, |
---|
| 75 | |
---|
| 76 | #if (defined (RTEMS_USE_BOOTP)) |
---|
| 77 | rtems_bsdnet_do_bootp, |
---|
| 78 | #else |
---|
| 79 | NULL, |
---|
| 80 | #endif |
---|
| 81 | |
---|
| 82 | 0, /* Default network task priority */ |
---|
| 83 | 0, /* Default mbuf capacity */ |
---|
| 84 | 0, /* Default mbuf cluster capacity */ |
---|
| 85 | |
---|
| 86 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
| 87 | "rtems_host", /* Host name */ |
---|
| 88 | "nodomain.com", /* Domain name */ |
---|
| 89 | "XXX.YYY.ZZZ.1", /* Gateway */ |
---|
| 90 | "XXX.YYY.ZZZ.1", /* Log host */ |
---|
| 91 | {"XXX.YYY.ZZZ.1" }, /* Name server(s) */ |
---|
| 92 | |
---|
| 93 | /* |
---|
| 94 | * A real example -- DO NOT USE THIS YOURSELF!!! |
---|
| 95 | */ |
---|
| 96 | |
---|
| 97 | #if 0 |
---|
| 98 | "dy4", /* Host name */ |
---|
| 99 | "NOT_oarcorp.com", /* Domain name */ |
---|
| 100 | "192.168.1.2", /* Gateway */ |
---|
| 101 | "192.168.1.2", /* Log host */ |
---|
| 102 | {"192.168.1.2" }, /* Name server(s) */ |
---|
| 103 | #endif |
---|
| 104 | #endif /* !RTEMS_USE_BOOTP */ |
---|
| 105 | |
---|
| 106 | }; |
---|
| 107 | |
---|
| 108 | /* |
---|
| 109 | * For TFTP test application |
---|
| 110 | */ |
---|
| 111 | #if (!defined (RTEMS_USE_BOOTP)) |
---|
| 112 | #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ" |
---|
| 113 | #define RTEMS_TFTP_TEST_FILE_NAME "tftptest" |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | #endif /* _RTEMS_NETWORKCONFIG_H_ */ |
---|