source: network-demos/networkconfig-qemu.h @ 84b2a48

4.11network-demos-4-10-branchnetwork-demos-4-9-branch
Last change on this file since 84b2a48 was ea7c3bf, checked in by Joel Sherrill <joel.sherrill@…>, on 09/07/07 at 22:33:32

2007-09-07 Joel Sherrill <joel.sherrill@…>

  • networkconfig-qemu.h: Disable DHCP and use static IP.
  • networkconfig.h: Use only loopback so tests can run OK on any target even if they can't do anything.
  • networkconfig-icecube.h: New file.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*
2 * Network configuration -- QEMU NOT using DHCP
3 *
4 ************************************************************
5 * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION     *
6 * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
7 ************************************************************
8 *
9 *  networkconfig.h,v 1.8 2001/08/31 18:11:43 joel Exp
10 */
11
12#ifndef _RTEMS_NETWORKCONFIG_H_
13#define _RTEMS_NETWORKCONFIG_H_
14
15/*
16 *  The following will normally be set by the BSP if it supports
17 *  a single network device driver.  In the event, it supports
18 *  multiple network device drivers, then the user's default
19 *  network device driver will have to be selected by a BSP
20 *  specific mechanism.
21 */
22
23#undef RTEMS_BSP_NETWORK_DRIVER_NAME
24#undef RTEMS_BSP_NETWORK_DRIVER_ATTACH
25#define RTEMS_BSP_NETWORK_DRIVER_NAME    "ne1"
26#define RTEMS_BSP_NETWORK_DRIVER_ATTACH  rtems_ne_driver_attach
27
28#ifdef RTEMS_USE_BOOTP
29#undef RTEMS_USE_BOOTP
30#endif
31
32/*
33 * If you use DHCP on the QEMU instance, there is less configuration
34 */
35// #define RTEMS_USE_BOOTP
36
37#include <bsp.h>
38
39/*
40 * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
41 * Ethernet address here.  If RTEMS_SET_ETHERNET_ADDRESS is not
42 * defined the driver will choose an address.
43 */
44//#define RTEMS_SET_ETHERNET_ADDRESS
45#ifdef RTEMS_SET_ETHERNET_ADDRESS
46#undef RTEMS_SET_ETHERNET_ADDRESS
47#endif
48
49#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
50/* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */
51static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
52#endif
53
54#ifdef RTEMS_USE_LOOPBACK
55/*
56 * Loopback interface
57 */
58extern void rtems_bsdnet_loopattach();
59static struct rtems_bsdnet_ifconfig loopback_config = {
60        "lo0",                          /* name */
61        rtems_bsdnet_loopattach,        /* attach function */
62
63        NULL,                           /* link to next interface */
64
65        "127.0.0.1",                    /* IP address */
66        "255.0.0.0",                    /* IP net mask */
67};
68#endif
69
70/*
71 * Default network interface
72 */
73static struct rtems_bsdnet_ifconfig netdriver_config = {
74        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
75        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
76
77#ifdef RTEMS_USE_LOOPBACK
78        &loopback_config,               /* link to next interface */
79#else
80        NULL,                           /* No more interfaces */
81#endif
82
83#if (defined (RTEMS_USE_BOOTP))
84        NULL,                           /* BOOTP supplies IP address */
85        NULL,                           /* BOOTP supplies IP net mask */
86#else
87        "10.0.2.5",                     /* IP address */
88        "255.255.255.0",                /* IP net mask */
89#endif /* !RTEMS_USE_BOOTP */
90
91#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
92        ethernet_address,               /* Ethernet hardware address */
93#else
94        NULL,                           /* Driver supplies hardware address */
95#endif
96        0,                              /* Use default driver parameters */
97        0, /* mtu */
98        0, /* rbuf_count */
99        0, /* xbuf_count */
100        0, /* port */
101        9 /* irq */
102};
103
104/*
105 * Network configuration
106 */
107struct rtems_bsdnet_config rtems_bsdnet_config = {
108        &netdriver_config,
109
110#if (defined (RTEMS_USE_BOOTP))
111        rtems_bsdnet_do_bootp,
112#else
113        NULL,
114#endif
115
116        0,                      /* Default network task priority */
117        256 * 1024,                     /* Default mbuf capacity */
118        256 * 1024,                     /* Default mbuf cluster capacity */
119
120#if (!defined (RTEMS_USE_BOOTP))
121        "rtems",        /* Host name */
122        "",             /* Domain name */
123        "10.0.2.1",     /* Gateway */
124        "10.0.0.1",     /* Log host */
125        {"10.0.2.3" },  /* Name server(s) */
126        {"" },  /* NTP server(s) */
127
128#endif /* !RTEMS_USE_BOOTP */
129
130};
131
132/*
133 * For TFTP test application
134 */
135#if (defined (RTEMS_USE_BOOTP))
136#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
137#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
138#else
139#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
140#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
141#endif
142
143/*
144 * For NFS test application
145 *
146 * NFS mount and a directory to ls once mounted
147 */
148#define RTEMS_NFS_SERVER      "192.168.1.210"
149#define RTEMS_NFS_SERVER_PATH "/home"
150#define RTEMS_NFS_LS_PATH     "/mnt/nfstest"
151
152#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.