source: network-demos/networkconfig.h @ 1a1b6704

rtems-4-5-branch
Last change on this file since 1a1b6704 was 1a1b6704, checked in by Joel Sherrill <joel.sherrill@…>, on 05/09/00 at 21:38:58

Updated significantly.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2 * Network configuration
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
43#define RTEMS_SET_ETHERNET_ADDRESS
44#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
45/* static char ethernet_address[6] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */
46static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
47
48#endif
49
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        &netdriver_config,
100
101#if (defined (RTEMS_USE_BOOTP))
102        rtems_bsdnet_do_bootp,
103#else
104        NULL,
105#endif
106
107        0,                      /* Default network task priority */
108        0,                      /* Default mbuf capacity */
109        0,                      /* Default mbuf cluster capacity */
110
111#if (!defined (RTEMS_USE_BOOTP))
112        "rtems_host",           /* Host name */
113        "nodomain.com",         /* Domain name */
114        "XXX.YYY.ZZZ.1",        /* Gateway */
115        "XXX.YYY.ZZZ.1",        /* Log host */
116        {"XXX.YYY.ZZZ.1" },     /* Name server(s) */
117        {"XXX.YYY.ZZZ.1" },     /* NTP server(s) */
118
119        /*
120         *  A real example -- DO NOT USE THIS YOURSELF!!!
121         */
122
123#if 0
124        "dy4",                  /* Host name */
125        "NOT_oarcorp.com",      /* Domain name */
126        "192.168.1.2",          /* Gateway */
127        "192.168.1.2",          /* Log host */
128        {"192.168.1.2" },       /* Name server(s) */
129        {"192.168.1.2" },       /* NTP server(s) */
130#endif
131#endif /* !RTEMS_USE_BOOTP */
132
133};
134
135/*
136 * For TFTP test application
137 */
138#if (!defined (RTEMS_USE_BOOTP))
139#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
140#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
141#endif
142
143#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.