1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
4 #include <rtems/rtems_bsdnet.h>
7 /* This was taken from existing example, driver failed to provide its own, so why not. */
8 static char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x50 };
10 extern void rtems_bsdnet_loopattach();
12 /* config for loopback device */
13 static struct rtems_bsdnet_ifconfig loopback_config = {
15 rtems_bsdnet_loopattach,
19 /* Rest of the struct is set to 0 (is defaulted) */
22 /* config for ethernet */
23 static struct rtems_bsdnet_ifconfig netdriver_config = {
24 RTEMS_BSP_NETWORK_DRIVER_NAME,
25 RTEMS_BSP_NETWORK_DRIVER_ATTACH,
26 &loopback_config, /* link to next interface */
27 "192.168.2.3", /* IP address */
28 "255.255.255.0", /* IP address net mask */
29 ethernet_address /* ethernet hardware address, 0 - supplied by driver according to documentation, but it caused error when tested */
31 /* rest of the struct is set to 0 (is defaulted) */
35 struct rtems_bsdnet_config rtems_bsdnet_config = {
36 &netdriver_config, /* This entry points to the head of the ifconfig chain. */
37 NULL, /* rtems_bsdnet_do_bootp if it should use bootp, null otherwise */
38 /* From here on, zero means default value. */
39 100, /* network task priority (default 100) */
40 65792, /* mbuf bytecount (default 64kbytes) */
41 /* Using default sizes stops RTEMS from answering to pings. (Probably because it allocates too few buffer for an answer.). */
42 263168, //180584, /* mbuf cluster bytecount (default 128kbytes) */
43 "midam_deska", /* hostname (default BOOTP) */
44 "testdomain", /* domain name (default BOOTP) */
45 "192.168.2.2", /* gateway (default BOOTP) */
46 "192.168.2.2", /* log_host (default BOOTP) */
47 { "192.168.2.2", }, /* name_server[3] (default BOOTP) */
48 { "192.168.2.2", }, /* ntp_server[3] (default BOOTP) */
49 0, /* sb efficiency (default 2) */
50 0, /* udp tx buf size (default 9216 bytes) */
51 0, /* udp rx buf size (default 40 * (1024 + sizeof(struct sockaddr_in) bytes) */
52 0, /* tcp tx buf size (default 16 * 1024 bytes) */
53 0 /* tcp rx buf size (default 16 * 1024 bytes) */