]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - rtems-omk-template/appnet/networkconfig.h
appnet: add more variants of driver setup.
[rtems-devel.git] / rtems-omk-template / appnet / networkconfig.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 static char ethernet_address[6] = {0x00, 0x04, 0x9F, 0x00, 0x27, 0x50 };
9
10 int rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
11 int rtems_vtnet_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
12
13 #if 1
14 static struct rtems_bsdnet_ifconfig netdriver_config = {
15         .name = RTEMS_BSP_NETWORK_DRIVER_NAME,
16         .attach = RTEMS_BSP_NETWORK_DRIVER_ATTACH,
17         .next = NULL,
18         .ip_address = "192.168.3.66",
19         .ip_netmask = "255.255.255.0",
20         .hardware_address = ethernet_address,
21         .ignore_broadcast = 0,
22         .mtu = 0,
23         .rbuf_count = 0,
24         .xbuf_count = 0,
25         .port = 0,
26         .irno = 0,
27         .bpar = 0,
28         .drv_ctrl = NULL
29 };
30 #elif 1
31 static struct rtems_bsdnet_ifconfig netdriver_config = {
32         .name = "fxp1" /*RTEMS_BSP_NETWORK_DRIVER_NAME*/,
33         .attach = rtems_fxp_attach /*RTEMS_BSP_NETWORK_DRIVER_ATTACH*/,
34         .next = NULL,
35         .ip_address = "192.168.3.66",
36         .ip_netmask = "255.255.255.0",
37         .hardware_address = ethernet_address,
38         .ignore_broadcast = 0,
39         .mtu = 0,
40         .rbuf_count = 0,
41         .xbuf_count = 0,
42         .port = 0,
43         .irno = 0,
44         .bpar = 0,
45         .drv_ctrl = NULL
46 };
47 #elif 1
48 static struct rtems_bsdnet_ifconfig netdriver_config = {
49         .name = "vio0" /*RTEMS_BSP_NETWORK_DRIVER_NAME*/,
50         .attach = rtems_vtnet_driver_attach /*RTEMS_BSP_NETWORK_DRIVER_ATTACH*/,
51         .next = NULL,
52         .ip_address = "192.168.3.66",
53         .ip_netmask = "255.255.255.0",
54         .hardware_address = ethernet_address,
55         .ignore_broadcast = 0,
56         .mtu = 0,
57         .rbuf_count = 0,
58         .xbuf_count = 0,
59         .port = 0,
60         .irno = 0,
61         .bpar = 0,
62         .drv_ctrl = NULL
63 };
64 #else
65 static struct rtems_bsdnet_ifconfig netdriver_config = {
66         .name = (char *)BSP_NE2000_NETWORK_DRIVER_NAME,
67         .attach = BSP_NE2000_NETWORK_DRIVER_ATTACH,
68         .next = NULL,
69         .ip_address = "192.168.3.66",
70         .ip_netmask = "255.255.255.0",
71         .hardware_address = ethernet_address,
72         .ignore_broadcast = 0,
73         .mtu = 0,
74         .rbuf_count = 0,
75         .xbuf_count = 0,
76         .port = 0x300,
77         .irno = 9,
78         .bpar = 0,
79         .drv_ctrl = NULL
80 };
81 #endif
82
83 struct rtems_bsdnet_config rtems_bsdnet_config = {
84         .ifconfig = &netdriver_config,
85 /*      .bootp = rtems_bsdnet_do_bootp,*/
86 /*      .bootp = rtems_bsdnet_do_dhcp,*/
87 #if 1
88         .bootp = rtems_bsdnet_do_dhcp_failsafe,
89 #endif
90         .network_task_priority = 0,             /* 100        */
91 #if 1
92         .mbuf_bytecount = 256 * 1024,           /* 64 kbytes  */
93         .mbuf_cluster_bytecount = 256 * 1024,   /* 128 kbytes */
94 #else
95         .mbuf_bytecount = 2048 * 1024,          /* 2 MB */
96         .mbuf_cluster_bytecount = 2048 * 1024,  /* 2 MB */
97 #endif
98         .hostname = NULL,
99         .domainname = NULL,
100         .gateway = "192.168.3.1",
101         .log_host = NULL,
102         .name_server = { "NULL" },
103         .ntp_server = { "NULL" },
104         .sb_efficiency = 0,
105         .udp_tx_buf_size = 0,                   /* UDP TX: 9216 bytes */
106         .udp_rx_buf_size = 0,                   /* UDP RX: 40 * (1024 + sizeof(struct sockaddr_in)) */
107         .tcp_tx_buf_size = 0,                   /* TCP TX: 16 * 1024 bytes */
108         .tcp_rx_buf_size = 0,                   /* TCP TX: 16 * 1024 bytes */
109 };
110
111 #endif
112