summaryrefslogtreecommitdiffstats
path: root/networkconfig-icecube.h
blob: 5bf4352b0c24e7dea42ffc99088213a0be7236a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 * Network configuration for IceCube in RTEMS Lab
 * 
 ************************************************************
 * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION     *
 * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! * 
 ************************************************************
 */

#ifndef _RTEMS_NETWORKCONFIG_H_
#define _RTEMS_NETWORKCONFIG_H_

/*
 *  The following will normally be set by the BSP if it supports
 *  a single network device driver.  In the event, it supports
 *  multiple network device drivers, then the user's default
 *  network device driver will have to be selected by a BSP
 *  specific mechanism.
 */

#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
#endif

#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
#endif

/* #define RTEMS_USE_BOOTP */

#include <bsp.h>

/*
 * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
 * Ethernet address here.  If RTEMS_SET_ETHERNET_ADDRESS is not
 * defined the driver will choose an address.
 */
#define RTEMS_SET_ETHERNET_ADDRESS
#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
  static char ethernet_address[6] = { 0x00, 0x04, 0x9F, 0x00, 0x5B, 0x21 };
#endif

/*
 * Default network interface
 */
static struct rtems_bsdnet_ifconfig netdriver_config = {
        RTEMS_BSP_NETWORK_DRIVER_NAME,          /* name */
        RTEMS_BSP_NETWORK_DRIVER_ATTACH,        /* attach function */
        NULL,                           /* No more interfaces */

#if (defined (RTEMS_USE_BOOTP))
        NULL,                           /* BOOTP supplies IP address */
        NULL,                           /* BOOTP supplies IP net mask */
#else
        "192.168.1.244",                /* IP address */
        "255.255.255.0",                /* IP net mask */
#endif /* !RTEMS_USE_BOOTP */

#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
        ethernet_address,               /* Ethernet hardware address */
#else
        NULL,                           /* Driver supplies hardware address */
#endif
        0,                              /* Use default driver parameters */
        0,                              /* mtu */
        0,                              /* rbuf_count */
        0,                              /* xbuf_count */
        0,                              /* port */
        0                               /* irq */

};

/*
 * Network configuration
 */
struct rtems_bsdnet_config rtems_bsdnet_config = {
        &netdriver_config,

#if (defined (RTEMS_USE_BOOTP))
        rtems_bsdnet_do_bootp,
#else
        NULL,
#endif

        0,                              /* Default network task priority */
        256 * 1024,                     /* Default mbuf capacity */
        256 * 1024,                     /* Default mbuf cluster capacity */

#if (!defined (RTEMS_USE_BOOTP))
        "rtems",                /* Host name */
        "nodomain.com",         /* Domain name */
        "192.168.1.14",         /* Gateway */
        "192.168.1.1",          /* Log host */
        {"192.168.1.1"  },      /* Name server(s) */
        {"192.168.1.1"  },      /* NTP server(s) */
#else
        NULL,                   /* Host name */
        NULL,                   /* Domain name */
        NULL,                   /* Gateway */
        NULL,                   /* Log host */
        { NULL },               /* Name server(s) */
        { NULL },               /* NTP server(s) */
#endif /* !RTEMS_USE_BOOTP */
        0,                      /* efficiency */
        0,                      /* udp TX buffer */
        0,                      /* udp RX buffer */
        0,                      /* tcp TX buffer */
        0,                      /* tcp RX buffer */
};

/*
 * For TFTP test application
 */
#if (defined (RTEMS_USE_BOOTP))
#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
#else
#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
#endif

/*
 * For NFS test application
 * 
 * NFS server/path to mount and a directory to ls once mounted
 */
#define RTEMS_NFS_SERVER      "192.168.1.210"
#define RTEMS_NFS_SERVER_PATH "/home"
#define RTEMS_NFS_LS_PATH     "/mnt/nfstest"

#endif /* _RTEMS_NETWORKCONFIG_H_ */