1
/* $Id: rtems_network_config.h 3553 2011-05-05 06:14:19Z nanang $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
* Thanks Zetron, Inc and Phil Torre <ptorre@zetron.com> for donating PJLIB
27
* Network configuration
29
************************************************************
30
* EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
31
* BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
32
************************************************************
36
#ifndef _RTEMS_NETWORKCONFIG_H_
37
#define _RTEMS_NETWORKCONFIG_H_
40
#define DEFAULT_IP_ADDRESS_STRING "192.168.0.2"
41
#define DEFAULT_NETMASK_STRING "255.255.255.0"
42
#define DEFAULT_GATEWAY_STRING "192.168.0.1"
47
#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
48
#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
49
#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
52
#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
53
#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
54
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
57
#define NETWORK_STACK_PRIORITY 128
58
/* #define RTEMS_USE_BOOTP */
60
/* #define RTEMS_USE_LOOPBACK */
65
* Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
66
* Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not
67
* defined the driver will choose an address.
69
// NOTE: The address below is a dummy address that should only ever
70
// be used for testing on a private network. DO NOT LET A PRODUCT
71
// CONTAINING THIS ETHERNET ADDRESS OUT INTO THE FIELD!
72
//#define RTEMS_SET_ETHERNET_ADDRESS
73
#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
74
static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
77
#define RTEMS_USE_LOOPBACK
78
#ifdef RTEMS_USE_LOOPBACK
82
extern int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig* dummy, int unused);
83
static struct rtems_bsdnet_ifconfig loopback_config = {
85
rtems_bsdnet_loopattach, /* attach function */
86
NULL, /* link to next interface */
87
"127.0.0.1", /* IP address */
88
"255.0.0.0", /* IP net mask */
93
* Default network interface
95
static struct rtems_bsdnet_ifconfig netdriver_config = {
96
RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
97
RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */
99
#ifdef RTEMS_USE_LOOPBACK
100
&loopback_config, /* link to next interface */
102
NULL, /* No more interfaces */
105
#if (defined (RTEMS_USE_BOOTP))
106
NULL, /* BOOTP supplies IP address */
107
NULL, /* BOOTP supplies IP net mask */
109
"192.168.0.33", /* IP address */
110
"255.255.255.0", /* IP net mask */
111
#endif /* !RTEMS_USE_BOOTP */
113
#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
114
ethernet_address, /* Ethernet hardware address */
116
NULL, /* Driver supplies hardware address */
118
0 /* Use default driver parameters */
122
* Network configuration
124
struct rtems_bsdnet_config rtems_bsdnet_config = {
127
#if (defined (RTEMS_USE_BOOTP))
128
rtems_bsdnet_do_bootp,
133
NETWORK_STACK_PRIORITY, /* Default network task priority */
134
1048576, /* Default mbuf capacity */
135
1048576, /* Default mbuf cluster capacity */
137
#if (!defined (RTEMS_USE_BOOTP))
138
"testnode", /* Host name */
139
"example.org", /* Domain name */
140
"192.168.6.9", /* Gateway */
141
"192.168.7.41", /* Log host */
142
{"198.137.231.1" }, /* Name server(s) */
143
{"207.202.190.162" }, /* NTP server(s) */
144
#endif /* !RTEMS_USE_BOOTP */
148
#endif /* _RTEMS_NETWORKCONFIG_H_ */