1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
4 #include <rtems/rtems_bsdnet.h>
5 #include <rtems/rtems_dhcp_failsafe.h>
8 #ifdef RTEMS_USE_LOOPBACK
11 rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
13 #ifdef RTEMS_USE_LOOPBACK_ONLY
14 static struct rtems_bsdnet_ifconfig netdriver_config = {
16 static struct rtems_bsdnet_ifconfig loopback_config = {
19 .attach = rtems_bsdnet_loopattach,
21 .ip_address = "127.0.0.1",
22 .ip_netmask = "255.0.0.0",
25 #endif /*RTEMS_USE_LOOPBACK*/
27 #ifndef RTEMS_USE_LOOPBACK_ONLY
28 static struct rtems_bsdnet_ifconfig netdriver_config = {
29 .name = BSP_NE2000_NETWORK_DRIVER_NAME,
30 .attach = BSP_NE2000_NETWORK_DRIVER_ATTACH,
31 #ifdef RTEMS_USE_LOOPBACK
32 .next = &loopback_config,
33 #else /*RTEMS_USE_LOOPBACK*/
35 #endif /*RTEMS_USE_LOOPBACK*/
36 .ip_address = "192.168.3.66",
37 .ip_netmask = "255.255.255.0",
38 .hardware_address = NULL,
39 .ignore_broadcast = 0,
48 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
50 struct rtems_bsdnet_config rtems_bsdnet_config = {
51 .ifconfig = &netdriver_config,
52 /* .bootp = rtems_bsdnet_do_bootp,*/
53 /* .bootp = rtems_bsdnet_do_dhcp,*/
54 .bootp = rtems_bsdnet_do_dhcp_failsafe,
55 .network_task_priority = 0, /* 100 */
56 .mbuf_bytecount = 256 * 1024, /* 64 kbytes */
57 .mbuf_cluster_bytecount = 256 * 1024, /* 128 kbytes */
60 .gateway = "192.168.3.1",
62 .name_server = { "NULL" },
63 .ntp_server = { "NULL" },
65 .udp_tx_buf_size = 0, /* UDP TX: 9216 bytes */
66 .udp_rx_buf_size = 0, /* UDP RX: 40 * (1024 + sizeof(struct sockaddr_in)) */
67 .tcp_tx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */
68 .tcp_rx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */
71 #endif /* ifndef __NETWORKCONFIG_H__ */