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
10 int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
12 #ifdef RTEMS_USE_LOOPBACK_ONLY
13 static struct rtems_bsdnet_ifconfig netdriver_config = {
15 static struct rtems_bsdnet_ifconfig loopback_config = {
18 .attach = rtems_bsdnet_loopattach,
20 .ip_address = "127.0.0.1",
21 .ip_netmask = "255.0.0.0",
24 #endif /*RTEMS_USE_LOOPBACK*/
26 #ifndef RTEMS_USE_LOOPBACK_ONLY
27 static struct rtems_bsdnet_ifconfig netdriver_config = {
28 .name = BSP_NE2000_NETWORK_DRIVER_NAME,
29 .attach = BSP_NE2000_NETWORK_DRIVER_ATTACH,
30 #ifdef RTEMS_USE_LOOPBACK
31 .next = &loopback_config,
32 #else /*RTEMS_USE_LOOPBACK*/
34 #endif /*RTEMS_USE_LOOPBACK*/
35 .ip_address = "192.168.3.66",
36 .ip_netmask = "255.255.255.0",
37 .hardware_address = NULL,
38 .ignore_broadcast = 0,
47 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
49 struct rtems_bsdnet_config rtems_bsdnet_config = {
50 .ifconfig = &netdriver_config,
51 /* .bootp = rtems_bsdnet_do_bootp,*/
52 /* .bootp = rtems_bsdnet_do_dhcp,*/
53 .bootp = rtems_bsdnet_do_dhcp_failsafe,
54 .network_task_priority = 0, /* 100 */
55 .mbuf_bytecount = 256 * 1024, /* 64 kbytes */
56 .mbuf_cluster_bytecount = 256 * 1024, /* 128 kbytes */
59 .gateway = "192.168.3.1",
61 .name_server = { "NULL" },
62 .ntp_server = { "NULL" },
64 .udp_tx_buf_size = 0, /* UDP TX: 9216 bytes */
65 .udp_rx_buf_size = 0, /* UDP RX: 40 * (1024 + sizeof(struct sockaddr_in)) */
66 .tcp_tx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */
67 .tcp_rx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */