]> rtime.felk.cvut.cz Git - orte.git/blob - orte/examples/rtems-shell/networkconfig-static.h
Reformat the sources with orte/uncrustify script
[orte.git] / orte / examples / rtems-shell / networkconfig-static.h
1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
3
4 #include <rtems/rtems_bsdnet.h>
5 #include <bsp.h>
6
7 static char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x50 };
8
9 #ifdef RTEMS_USE_LOOPBACK
10
11 int
12 rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
13
14 #ifdef RTEMS_USE_LOOPBACK_ONLY
15 static struct rtems_bsdnet_ifconfig netdriver_config = {
16 #else
17 static struct rtems_bsdnet_ifconfig loopback_config = {
18 #endif
19   .name = "lo0",
20   .attach = rtems_bsdnet_loopattach,
21   .next = NULL,
22   .ip_address = "127.0.0.1",
23   .ip_netmask = "255.0.0.0",
24 };
25
26 #endif /*RTEMS_USE_LOOPBACK*/
27
28 #ifndef RTEMS_USE_LOOPBACK_ONLY
29 static struct rtems_bsdnet_ifconfig netdriver_config = {
30   .name = RTEMS_BSP_NETWORK_DRIVER_NAME,
31   .attach = RTEMS_BSP_NETWORK_DRIVER_ATTACH,
32 #ifdef RTEMS_USE_LOOPBACK
33   .next = &loopback_config,
34 #else /*RTEMS_USE_LOOPBACK*/
35   .next = NULL,
36 #endif /*RTEMS_USE_LOOPBACK*/
37   .ip_address = "192.168.2.3",
38   .ip_netmask = "255.255.255.0",
39   .hardware_address = ethernet_address,
40   .ignore_broadcast = 0,
41   .mtu = 0,
42   .rbuf_count = 0,
43   .xbuf_count = 0,
44   .port = 0,
45   .irno = 0,
46   .bpar = 0,
47   .drv_ctrl = NULL
48 };
49 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
50
51 struct rtems_bsdnet_config rtems_bsdnet_config = {
52   .ifconfig = &netdriver_config,
53   .bootp = NULL,
54   .network_task_priority = 0,                   /* 100        */
55   .mbuf_bytecount = 256 * 1024,                 /* 64 kbytes  */
56   .mbuf_cluster_bytecount = 256 * 1024,         /* 128 kbytes */
57   .hostname = NULL,
58   .domainname = NULL,
59   .gateway = NULL,
60   .log_host = NULL,
61   .name_server = { "NULL" },
62   .ntp_server = { "NULL" },
63   .sb_efficiency = 0,
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 */
68 };
69
70 #endif /* ifndef __NETWORKCONFIG_H__ */