source: network-demos/networkconfig.h @ ea7c3bf

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since ea7c3bf was ea7c3bf, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 7, 2007 at 10:33:32 PM

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.6 KB
Line 
1/*
2 * Network configuration EXAMPLE!!!
3 *
4 ************************************************************
5 * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION     *
6 * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
7 ************************************************************
8 *
9 *  $Id$
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#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
24#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
25#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
26#endif
27
28#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
29#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
30#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
31#endif
32
33/* #define RTEMS_USE_BOOTP */
34
35#include <bsp.h>
36
37/*
38 * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
39 * Ethernet address here.  If RTEMS_SET_ETHERNET_ADDRESS is not
40 * defined the driver will choose an address.
41 */
42#define RTEMS_SET_ETHERNET_ADDRESS
43#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
44/* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */
45static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
46
47#endif
48
49#define RTEMS_USE_LOOPBACK
50#ifdef RTEMS_USE_LOOPBACK
51/*
52 * Loopback interface
53 */
54extern void rtems_bsdnet_loopattach();
55static struct rtems_bsdnet_ifconfig loopback_config = {
56        "lo0",                          /* name */
57        rtems_bsdnet_loopattach,        /* attach function */
58
59        NULL,                           /* link to next interface */
60
61        "127.0.0.1",                    /* IP address */
62        "255.0.0.0",                    /* IP net mask */
63};
64#endif
65
66/*
67 * Default network interface
68 */
69static struct rtems_bsdnet_ifconfig netdriver_config = {
70        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
71        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
72
73#ifdef RTEMS_USE_LOOPBACK
74        &loopback_config,               /* link to next interface */
75#else
76        NULL,                           /* No more interfaces */
77#endif
78
79#if (defined (RTEMS_USE_BOOTP))
80        NULL,                           /* BOOTP supplies IP address */
81        NULL,                           /* BOOTP supplies IP net mask */
82#else
83        "XXX.YYY.ZZZ.XYZ",              /* IP address */
84        "255.255.255.0",                /* IP net mask */
85#endif /* !RTEMS_USE_BOOTP */
86
87#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
88        ethernet_address,               /* Ethernet hardware address */
89#else
90        NULL,                           /* Driver supplies hardware address */
91#endif
92        0                               /* Use default driver parameters */
93};
94
95/*
96 * Network configuration
97 */
98struct rtems_bsdnet_config rtems_bsdnet_config = {
99#if 0
100        &netdriver_config,
101#endif
102
103#if (defined (RTEMS_USE_BOOTP))
104        rtems_bsdnet_do_bootp,
105#else
106        NULL,
107#endif
108
109        0,                      /* Default network task priority */
110        0,                      /* Default mbuf capacity */
111        0,                      /* Default mbuf cluster capacity */
112
113#if (!defined (RTEMS_USE_BOOTP))
114        "rtems_host",           /* Host name */
115        "nodomain.com",         /* Domain name */
116        "XXX.YYY.ZZZ.1",        /* Gateway */
117        "XXX.YYY.ZZZ.1",        /* Log host */
118        {"XXX.YYY.ZZZ.1" },     /* Name server(s) */
119        {"XXX.YYY.ZZZ.1" },     /* NTP server(s) */
120
121#endif /* !RTEMS_USE_BOOTP */
122
123};
124
125/*
126 * For TFTP test application
127 */
128#if (defined (RTEMS_USE_BOOTP))
129#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
130#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
131#else
132#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
133#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
134#endif
135
136/*
137 * For NFS test application
138 *
139 * NFS server/path to mount and a directory to ls once mounted
140 */
141#define RTEMS_NFS_SERVER      "192.168.1.210"
142#define RTEMS_NFS_SERVER_PATH "/home"
143#define RTEMS_NFS_LS_PATH     "/mnt/nfstest"
144#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.