]> rtime.felk.cvut.cz Git - orte.git/blob - orte/examples/rtems-shell/networkconfig-i386-qemu.h
RTEMS: QEMU provides ETHERNET HW address so there is no need to setup it in application.
[orte.git] / orte / examples / rtems-shell / networkconfig-i386-qemu.h
1 #ifndef __NETWORKCONFIG_H__
2 #define __NETWORKCONFIG_H__
3
4 #include <rtems/rtems_bsdnet.h>
5 #include <rtems/rtems_dhcp_failsafe.h>
6 #include <bsp.h>
7
8 #ifdef RTEMS_USE_LOOPBACK
9
10 int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
11
12 #ifdef RTEMS_USE_LOOPBACK_ONLY
13 static struct rtems_bsdnet_ifconfig netdriver_config = {
14 #else
15 static struct rtems_bsdnet_ifconfig loopback_config = {
16 #endif
17         .name = "lo0",
18         .attach = rtems_bsdnet_loopattach,
19         .next = NULL,
20         .ip_address = "127.0.0.1",
21         .ip_netmask = "255.0.0.0",
22 };
23
24 #endif /*RTEMS_USE_LOOPBACK*/
25
26 #ifndef RTEMS_USE_LOOPBACK_ONLY
27 static struct rtems_bsdnet_ifconfig netdriver_config = {
28         .name = BSP_NE2000_NETWORK_DRIVER_NAME,
29         .attach = BSP_NE2000_NETWORK_DRIVER_ATTACH,
30 #ifdef RTEMS_USE_LOOPBACK
31         .next = &loopback_config,
32 #else /*RTEMS_USE_LOOPBACK*/
33         .next = NULL,
34 #endif /*RTEMS_USE_LOOPBACK*/
35         .ip_address = "192.168.3.66",
36         .ip_netmask = "255.255.255.0",
37         .hardware_address = NULL,
38         .ignore_broadcast = 0,
39         .mtu = 0,
40         .rbuf_count = 0,
41         .xbuf_count = 0,
42         .port = 0x300,
43         .irno = 9,
44         .bpar = 0,
45         .drv_ctrl = NULL
46 };
47 #endif /*RTEMS_USE_LOOPBACK_ONLY*/
48
49 struct rtems_bsdnet_config rtems_bsdnet_config = {
50         .ifconfig = &netdriver_config,
51 /*      .bootp = rtems_bsdnet_do_bootp,*/
52 /*      .bootp = rtems_bsdnet_do_dhcp,*/
53         .bootp = rtems_bsdnet_do_dhcp_failsafe,
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 = "192.168.3.1",
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
71