]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - rtems/gw/system_opt/networkconfig.h
a1621147b1f9620ef26ccac372be79d46c1abbb1
[can-benchmark.git] / rtems / gw / system_opt / networkconfig.h
1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
3
4 #include <rtems/rtems_bsdnet.h>
5 #include <bsp.h>
6
7 /* This was taken from existing example, driver failed to provide its own, so why not. */\r
8 static char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x50 };\r
9 \r
10 extern void rtems_bsdnet_loopattach();\r
11 \r
12 /* config for loopback device */\r
13 static struct rtems_bsdnet_ifconfig loopback_config = {\r
14         "lo0",\r
15         rtems_bsdnet_loopattach,\r
16         NULL,\r
17         "127.0.0.1",\r
18         "255.0.0.0"\r
19     /* Rest of the struct is set to 0 (is defaulted) */\r
20 };\r
21 \r
22 /* config for ethernet */\r
23 static struct rtems_bsdnet_ifconfig netdriver_config = {\r
24         RTEMS_BSP_NETWORK_DRIVER_NAME,\r
25         RTEMS_BSP_NETWORK_DRIVER_ATTACH,\r
26         &loopback_config, /* link to next interface */\r
27         "192.168.2.3", /* IP address */\r
28         "255.255.255.0", /* IP address net mask */\r
29         ethernet_address /* ethernet hardware address, 0 - supplied by driver according to documentation, but it caused error when tested */\r
30     \r
31         /* rest of the struct is set to 0 (is defaulted) */\r
32 };\r
33 \r
34 /* Main config. */
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. */\r
39     100, /* network task priority (default 100) */
40         65792, /* mbuf bytecount (default 64kbytes) */\r
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) */
54 };
55
56 #endif
57