]> rtime.felk.cvut.cz Git - orte.git/blob - orte/examples/rtems-shell/networkconfig-static.h
a5ba84ec6fd3a0bde08b39560d0abbf6e11f132e
[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 rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
12
13 #ifdef RTEMS_USE_LOOPBACK_ONLY
14 static struct rtems_bsdnet_ifconfig netdriver_config = {
15 #else
16 static struct rtems_bsdnet_ifconfig loopback_config = {
17 #endif
18         .name = "lo0",
19         .attach = rtems_bsdnet_loopattach,
20         .next = NULL,
21         .ip_address = "127.0.0.1",
22         .ip_netmask = "255.0.0.0",
23 };
24
25 #endif /*RTEMS_USE_LOOPBACK*/
26
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*/
34         .next = NULL,
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,
40         .mtu = 0,
41         .rbuf_count = 0,
42         .xbuf_count = 0,
43         .port = 0,
44         .irno = 0,
45         .bpar = 0,
46         .drv_ctrl = NULL
47 };
48 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
49
50 struct rtems_bsdnet_config rtems_bsdnet_config = {
51         .ifconfig = &netdriver_config,
52         .bootp = NULL,
53         .network_task_priority = 0,             /* 100        */
54         .mbuf_bytecount = 256 * 1024,           /* 64 kbytes  */
55         .mbuf_cluster_bytecount = 256 * 1024,   /* 128 kbytes */
56         .hostname = NULL,
57         .domainname = NULL,
58         .gateway = NULL,
59         .log_host = NULL,
60         .name_server = { "NULL" },
61         .ntp_server = { "NULL" },
62         .sb_efficiency = 0,
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 */
67 };
68
69 #endif
70