source: network-demos/networkconfig.h @ cdd3e7a

4.11network-demos-4-10-branch
Last change on this file since cdd3e7a was cdd3e7a, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 17, 2008 at 7:31:54 PM

2008-09-17 Joel Sherrill <joel.sherrill@…>

  • networkconfig-mpc8313erdb.h, networkconfig.h: Rename STACK_CHECKER_ON to more appropriate CONFIGURE_STACK_CHECKER_ENABLED.
  • Property mode set to 100644
File size: 4.9 KB
Line 
1/*
2 * Network configuration for IceCube in RTEMS Lab
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] = { 0x00, 0x04, 0x9F, 0x00, 0x5B, 0x21 };
45#endif
46
47#ifdef RTEMS_USE_LOOPBACK
48/*
49 * Loopback interface
50 */
51extern void rtems_bsdnet_loopattach();
52static struct rtems_bsdnet_ifconfig loopback_config = {
53        "lo0",                          /* name */
54        rtems_bsdnet_loopattach,        /* attach function */
55        NULL,                           /* link to next interface */
56        "127.0.0.1",                    /* IP address */
57        "255.0.0.0",                    /* IP net mask */
58};
59#endif
60
61/*
62 * Default network interface
63 */
64static struct rtems_bsdnet_ifconfig netdriver_config = {
65        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
66        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
67
68#ifdef RTEMS_USE_LOOPBACK
69        &loopback_config,               /* link to next interface */
70#else
71        NULL,                           /* No more interfaces */
72#endif
73
74#if (defined (RTEMS_USE_BOOTP))
75        NULL,                           /* BOOTP supplies IP address */
76        NULL,                           /* BOOTP supplies IP net mask */
77#else
78        "192.168.1.244",                /* IP address */
79        "255.255.255.0",                /* IP net mask */
80#endif /* !RTEMS_USE_BOOTP */
81
82#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
83        ethernet_address,               /* Ethernet hardware address */
84#else
85        NULL,                           /* Driver supplies hardware address */
86#endif
87        0,                              /* Use default driver parameters */
88        0,                              /* mtu */
89        0,                              /* rbuf_count */
90        0,                              /* xbuf_count */
91        0,                              /* port */
92        0                               /* irq */
93
94};
95
96/*
97 * Network configuration
98 */
99struct rtems_bsdnet_config rtems_bsdnet_config = {
100        &netdriver_config,
101
102#if (defined (RTEMS_USE_BOOTP))
103        rtems_bsdnet_do_bootp,
104#else
105        NULL,
106#endif
107
108        0,                              /* Default network task priority */
109        256 * 1024,                     /* Default mbuf capacity */
110        256 * 1024,                     /* Default mbuf cluster capacity */
111
112#if (!defined (RTEMS_USE_BOOTP))
113        "rtems",                /* Host name */
114        "nodomain.com",         /* Domain name */
115        "192.168.1.14",         /* Gateway */
116        "192.168.1.1",          /* Log host */
117        {"192.168.1.1"  },      /* Name server(s) */
118        {"192.168.1.1"  },      /* NTP server(s) */
119#else
120        NULL,                   /* Host name */
121        NULL,                   /* Domain name */
122        NULL,                   /* Gateway */
123        NULL,                   /* Log host */
124        { NULL },               /* Name server(s) */
125        { NULL },               /* NTP server(s) */
126#endif /* !RTEMS_USE_BOOTP */
127        0,                      /* efficiency */
128        0,                      /* udp TX buffer */
129        0,                      /* udp RX buffer */
130        0,                      /* tcp TX buffer */
131        0,                      /* tcp RX buffer */
132};
133
134/*
135 * For TFTP test application
136 */
137#if (defined (RTEMS_USE_BOOTP))
138#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
139#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
140#else
141#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
142#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
143#endif
144
145/*
146 * For NFS test application
147 *
148 * NFS server/path to mount and a directory to ls once mounted
149 */
150#define RTEMS_NFS_SERVER      "192.168.1.210"
151#define RTEMS_NFS_SERVER_PATH "/home"
152#define RTEMS_NFS_LS_PATH     "/mnt/nfstest"
153
154#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.