From 7bd2c062b62a63393f5011379f2a98a62026b6b1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 14 Sep 2007 20:54:42 +0000 Subject: 2007-09-14 Joel Sherrill * networkconfig.h: Loopback only network configuration. Use one of the real ones as an example. --- ChangeLog | 5 +++ networkconfig.h | 108 ++++++++++---------------------------------------------- 2 files changed, 23 insertions(+), 90 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb20fb4..d33c51b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-14 Joel Sherrill + + * networkconfig.h: Loopback only network configuration. Use one of the + real ones as an example. + 2007-09-07 Joel Sherrill * networkconfig-qemu.h: Disable DHCP and use static IP. diff --git a/networkconfig.h b/networkconfig.h index c92a3eb..75d0e12 100644 --- a/networkconfig.h +++ b/networkconfig.h @@ -1,5 +1,9 @@ /* - * Network configuration EXAMPLE!!! + * 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,114 +16,38 @@ #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 -/* - * 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] = { 0x08, 0x00, 0x3e, 0x12, 0x28, 0xb1 }; */ -static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 }; - -#endif - -#define RTEMS_USE_LOOPBACK -#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 - "XXX.YYY.ZZZ.XYZ", /* 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 */ + "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 */ }; /* * Network configuration */ struct rtems_bsdnet_config rtems_bsdnet_config = { -#if 0 - &netdriver_config, -#endif - -#if (defined (RTEMS_USE_BOOTP)) - rtems_bsdnet_do_bootp, -#else - NULL, -#endif - - 0, /* Default network task priority */ - 0, /* Default mbuf capacity */ - 0, /* Default mbuf cluster capacity */ - -#if (!defined (RTEMS_USE_BOOTP)) - "rtems_host", /* Host name */ - "nodomain.com", /* Domain name */ - "XXX.YYY.ZZZ.1", /* Gateway */ - "XXX.YYY.ZZZ.1", /* Log host */ - {"XXX.YYY.ZZZ.1" }, /* Name server(s) */ - {"XXX.YYY.ZZZ.1" }, /* NTP server(s) */ - -#endif /* !RTEMS_USE_BOOTP */ - + &netdriver_config, + NULL, /* do not use bootp */ + 0, /* Default network task priority */ + 0, /* Default mbuf capacity */ + 0, /* Default mbuf cluster capacity */ }; /* -- cgit v1.2.3