00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef _RTEMS_NETWORKCONFIG_H_
00037 #define _RTEMS_NETWORKCONFIG_H_
00038
00039
00040 #define DEFAULT_IP_ADDRESS_STRING "192.168.0.2"
00041 #define DEFAULT_NETMASK_STRING "255.255.255.0"
00042 #define DEFAULT_GATEWAY_STRING "192.168.0.1"
00043
00044
00045
00046
00047 #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
00048 #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
00049 #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
00050 #endif
00051
00052 #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
00053 #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
00054 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
00055 #endif
00056
00057 #define NETWORK_STACK_PRIORITY 128
00058
00059
00060
00061
00062 #include <bsp.h>
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
00074 static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
00075 #endif
00076
00077 #define RTEMS_USE_LOOPBACK
00078 #ifdef RTEMS_USE_LOOPBACK
00079
00080
00081
00082 extern int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig* dummy, int unused);
00083 static struct rtems_bsdnet_ifconfig loopback_config = {
00084 "lo0",
00085 rtems_bsdnet_loopattach,
00086 NULL,
00087 "127.0.0.1",
00088 "255.0.0.0",
00089 };
00090 #endif
00091
00092
00093
00094
00095 static struct rtems_bsdnet_ifconfig netdriver_config = {
00096 RTEMS_BSP_NETWORK_DRIVER_NAME,
00097 RTEMS_BSP_NETWORK_DRIVER_ATTACH,
00098
00099 #ifdef RTEMS_USE_LOOPBACK
00100 &loopback_config,
00101 #else
00102 NULL,
00103 #endif
00104
00105 #if (defined (RTEMS_USE_BOOTP))
00106 NULL,
00107 NULL,
00108 #else
00109 "192.168.0.33",
00110 "255.255.255.0",
00111 #endif
00112
00113 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
00114 ethernet_address,
00115 #else
00116 NULL,
00117 #endif
00118 0
00119 };
00120
00121
00122
00123
00124 struct rtems_bsdnet_config rtems_bsdnet_config = {
00125 &netdriver_config,
00126
00127 #if (defined (RTEMS_USE_BOOTP))
00128 rtems_bsdnet_do_bootp,
00129 #else
00130 NULL,
00131 #endif
00132
00133 NETWORK_STACK_PRIORITY,
00134 1048576,
00135 1048576,
00136
00137 #if (!defined (RTEMS_USE_BOOTP))
00138 "testnode",
00139 "example.org",
00140 "192.168.6.9",
00141 "192.168.7.41",
00142 {"198.137.231.1" },
00143 {"207.202.190.162" },
00144 #endif
00145
00146 };
00147
00148 #endif
00149