source: network-demos/networkconfig-icecube.h @ 52ce8e2

4.11network-demos-4-10-branchnetwork-demos-4-9-branch
Last change on this file since 52ce8e2 was 12e60d3, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 25, 2007 at 4:17:01 PM

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

  • networkconfig-icecube.h: Fix MAC address and typo.
  • Property mode set to 100644
File size: 3.7 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
56        NULL,                           /* link to next interface */
57
58        "127.0.0.1",                    /* IP address */
59        "255.0.0.0",                    /* IP net mask */
60};
61#endif
62
63/*
64 * Default network interface
65 */
66static struct rtems_bsdnet_ifconfig netdriver_config = {
67        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
68        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
69
70#ifdef RTEMS_USE_LOOPBACK
71        &loopback_config,               /* link to next interface */
72#else
73        NULL,                           /* No more interfaces */
74#endif
75
76#if (defined (RTEMS_USE_BOOTP))
77        NULL,                           /* BOOTP supplies IP address */
78        NULL,                           /* BOOTP supplies IP net mask */
79#else
80        "192.168.1.244",                /* IP address */
81        "255.255.255.0",                /* IP net mask */
82#endif /* !RTEMS_USE_BOOTP */
83
84#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
85        ethernet_address,               /* Ethernet hardware address */
86#else
87        NULL,                           /* Driver supplies hardware address */
88#endif
89        0,                              /* Use default driver parameters */
90        0,                              /* mtu */
91        0,                              /* rbuf_count */
92        0,                              /* xbuf_count */
93        0,                              /* port */
94        0                               /* irq */
95
96};
97
98/*
99 * Network configuration
100 */
101struct rtems_bsdnet_config rtems_bsdnet_config = {
102        &netdriver_config,
103
104#if (defined (RTEMS_USE_BOOTP))
105        rtems_bsdnet_do_bootp,
106#else
107        NULL,
108#endif
109
110        0,                              /* Default network task priority */
111        256 * 1024,                     /* Default mbuf capacity */
112        256 * 1024,                     /* Default mbuf cluster capacity */
113
114#if (!defined (RTEMS_USE_BOOTP))
115        "rtems",                /* Host name */
116        "nodomain.com",         /* Domain name */
117        "192.168.1.14",         /* Gateway */
118        "192.168.1.1",          /* Log host */
119        {"192.168.1.1"  },      /* Name server(s) */
120        {"192.168.1.1"  },      /* NTP server(s) */
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
145#endif /* _RTEMS_NETWORKCONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.