summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-18 13:33:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-18 13:33:30 +0000
commit07ee042fd43c1ee5f85f172eb0d1e52db9b835b0 (patch)
treedd39e024d595ee2c43433c92448605ca73149d03
parentRemove dupe entry. (diff)
downloadnetwork-demos-07ee042fd43c1ee5f85f172eb0d1e52db9b835b0.tar.bz2
2008-09-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* networkconfig.h: Revert previous patch. Use loopback configuration only.
-rw-r--r--ChangeLog5
-rw-r--r--networkconfig.h133
2 files changed, 39 insertions, 99 deletions
diff --git a/ChangeLog b/ChangeLog
index 3626207..806cd4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-18 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * networkconfig.h: Revert previous patch. Use loopback configuration
+ only.
+
2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* networkconfig-mpc8313erdb.h, networkconfig.h: Rename STACK_CHECKER_ON
diff --git a/networkconfig.h b/networkconfig.h
index ade7e7b..1739577 100644
--- a/networkconfig.h
+++ b/networkconfig.h
@@ -1,5 +1,9 @@
/*
- * Network configuration for IceCube in RTEMS Lab
+ * Network configuration -- LOOPBACK ONLY!!!
+ *
+ * See one of the other networkconfig.h files for an
+ * example of a system that includes a real NIC and
+ * the loopback interface.
*
************************************************************
* EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
@@ -12,123 +16,55 @@
#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
-
-#ifdef RTEMS_USE_LOOPBACK
-/*
* Loopback interface
*/
-extern void rtems_bsdnet_loopattach();
-static struct rtems_bsdnet_ifconfig loopback_config = {
- "lo0", /* name */
- rtems_bsdnet_loopattach, /* attach function */
- NULL, /* link to next interface */
- "127.0.0.1", /* IP address */
- "255.0.0.0", /* IP net mask */
-};
-#endif
+extern int rtems_bsdnet_loopattach();
/*
* Default network interface
*/
static struct rtems_bsdnet_ifconfig netdriver_config = {
- RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
- RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */
-
-#ifdef RTEMS_USE_LOOPBACK
- &loopback_config, /* link to next interface */
-#else
- NULL, /* No more interfaces */
-#endif
-
-#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 */
-
+ "lo0", /* name */
+ rtems_bsdnet_loopattach, /* attach function */
+ NULL, /* No more interfaces */
+ "127.0.0.1", /* IP address */
+ "255.0.0.0", /* IP net mask */
+ NULL, /* Driver supplies hardware address */
+ 0, /* Use default driver parameters */
+ 0, /* default efficiency multiplier */
+ 0, /* default udp TX socket buffer size */
+ 0, /* default udp RX socket buffer size */
+ 0, /* default tcp TX socket buffer size */
+ 0, /* default tcp RX socket buffer size */
};
/*
* Network configuration
*/
struct rtems_bsdnet_config rtems_bsdnet_config = {
- &netdriver_config,
+ &netdriver_config,
+ NULL, /* do not use bootp */
+ 0, /* Default network task priority */
+ 0, /* Default mbuf capacity */
+ 0, /* Default mbuf cluster capacity */
+ "rtems", /* Host name */
+ "nodomain.com", /* Domain name */
+ "127.0.0.1", /* Gateway */
+ "127.0.0.1", /* Log host */
+ {"127.0.0.1" }, /* Name server(s) */
+ {"127.0.0.1" }, /* NTP server(s) */
+ 0, /* sb_efficiency */
+ 0, /* udp_tx_buf_size */
+ 0, /* udp_rx_buf_size */
+ 0, /* tcp_tx_buf_size */
+ 0 /* tcp_rx_buf_size */
-#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 */
};
/*
@@ -150,5 +86,4 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
#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_ */