source: network-demos/networkconfig.h @ 51ed002

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since 51ed002 was c646d0b, checked in by Joel Sherrill <joel.sherrill@…>, on 07/18/07 at 19:35:18

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

  • networkconfig.h: Make the NFS server, remote filesystem, and directory to look at configurable.
  • 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#ifdef RTEMS_USE_LOOPBACK
50/*
51 * Loopback interface
52 */
53extern void rtems_bsdnet_loopattach();
54static struct rtems_bsdnet_ifconfig loopback_config = {
55        "lo0",                          /* name */
56        rtems_bsdnet_loopattach,        /* attach function */
57
58        NULL,                           /* link to next interface */
59
60        "127.0.0.1",                    /* IP address */
61        "255.0.0.0",                    /* IP net mask */
62};
63#endif
64
65/*
66 * Default network interface
67 */
68static struct rtems_bsdnet_ifconfig netdriver_config = {
69        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
70        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
71
72#ifdef RTEMS_USE_LOOPBACK
73        &loopback_config,               /* link to next interface */
74#else
75        NULL,                           /* No more interfaces */
76#endif
77
78#if (defined (RTEMS_USE_BOOTP))
79        NULL,                           /* BOOTP supplies IP address */
80        NULL,                           /* BOOTP supplies IP net mask */
81#else
82        "XXX.YYY.ZZZ.XYZ",              /* IP address */
83        "255.255.255.0",                /* IP net mask */
84#endif /* !RTEMS_USE_BOOTP */
85
86#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
87        ethernet_address,               /* Ethernet hardware address */
88#else
89        NULL,                           /* Driver supplies hardware address */
90#endif
91        0                               /* Use default driver parameters */
92};
93
94/*
95 * Network configuration
96 */
97struct rtems_bsdnet_config rtems_bsdnet_config = {
98        &netdriver_config,
99
100#if (defined (RTEMS_USE_BOOTP))
101        rtems_bsdnet_do_bootp,
102#else
103        NULL,
104#endif
105
106        0,                      /* Default network task priority */
107        0,                      /* Default mbuf capacity */
108        0,                      /* Default mbuf cluster capacity */
109
110#if (!defined (RTEMS_USE_BOOTP))
111        "rtems_host",           /* Host name */
112        "nodomain.com",         /* Domain name */
113        "XXX.YYY.ZZZ.1",        /* Gateway */
114        "XXX.YYY.ZZZ.1",        /* Log host */
115        {"XXX.YYY.ZZZ.1" },     /* Name server(s) */
116        {"XXX.YYY.ZZZ.1" },     /* NTP server(s) */
117
118#endif /* !RTEMS_USE_BOOTP */
119
120};
121
122/*
123 * For TFTP test application
124 */
125#if (defined (RTEMS_USE_BOOTP))
126#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
127#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
128#else
129#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
130#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
131#endif
132
133/*
134 * For NFS test application
135 *
136 * NFS server/path to mount and a directory to ls once mounted
137 */
138#define RTEMS_NFS_SERVER      "192.168.1.210"
139#define RTEMS_NFS_SERVER_PATH "/home"
140#define RTEMS_NFS_LS_PATH     "/mnt/nfstest"
141#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.