1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
4 #include <rtems/rtems_bsdnet.h>
7 static char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x50 };
9 #ifdef RTEMS_USE_LOOPBACK
11 int 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 = RTEMS_BSP_NETWORK_DRIVER_NAME,
30 .attach = RTEMS_BSP_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.2.3",
37 .ip_netmask = "255.255.255.0",
38 .hardware_address = ethernet_address,
39 .ignore_broadcast = 0,
48 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
50 struct rtems_bsdnet_config rtems_bsdnet_config = {
51 .ifconfig = &netdriver_config,
53 .network_task_priority = 0, /* 100 */
54 .mbuf_bytecount = 256 * 1024, /* 64 kbytes */
55 .mbuf_cluster_bytecount = 256 * 1024, /* 128 kbytes */
60 .name_server = { "NULL" },
61 .ntp_server = { "NULL" },
63 .udp_tx_buf_size = 0, /* UDP TX: 9216 bytes */
64 .udp_rx_buf_size = 0, /* UDP RX: 40 * (1024 + sizeof(struct sockaddr_in)) */
65 .tcp_tx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */
66 .tcp_rx_buf_size = 0, /* TCP TX: 16 * 1024 bytes */