From 2da63bc3daa18eddfd580025dd35cac263cc6ddd Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 8 Dec 2010 10:46:46 +0000 Subject: 2010-12-08 Sebastian Huber * networkconfig.h, networkconfig-qemu.h, networkconfig-icecube.h, networkconfig-mpc8313erdb.h: Loop back interface will be initialized now during normal initialization via rtems_bsdnet_initialize_network(). --- ChangeLog | 6 ++++++ networkconfig-icecube.h | 19 ------------------- networkconfig-mpc8313erdb.h | 19 ------------------- networkconfig-qemu.h | 31 +++++-------------------------- networkconfig.h | 25 +------------------------ 5 files changed, 12 insertions(+), 88 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1bbb2a0..b966cdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-08 Sebastian Huber + + * networkconfig.h, networkconfig-qemu.h, networkconfig-icecube.h, + networkconfig-mpc8313erdb.h: Loop back interface will be initialized + now during normal initialization via rtems_bsdnet_initialize_network(). + 2010-02-12 Joel Sherrill * ttcp/rtems_ttcp.c: Update timeval usage. diff --git a/networkconfig-icecube.h b/networkconfig-icecube.h index ade7e7b..c778e04 100644 --- a/networkconfig-icecube.h +++ b/networkconfig-icecube.h @@ -44,32 +44,13 @@ 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 - /* * 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 */ diff --git a/networkconfig-mpc8313erdb.h b/networkconfig-mpc8313erdb.h index 317984a..d7331af 100644 --- a/networkconfig-mpc8313erdb.h +++ b/networkconfig-mpc8313erdb.h @@ -43,32 +43,13 @@ 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 - /* * 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 */ diff --git a/networkconfig-qemu.h b/networkconfig-qemu.h index 426da4d..8576d19 100644 --- a/networkconfig-qemu.h +++ b/networkconfig-qemu.h @@ -61,9 +61,6 @@ * must also define FIXED_NETMASK * FIXED_NETMASK IP netmask string * (e.g. "255.255.255.0") - * LO_IF_ONLY If defined, do NOT configure - * any ethernet driver but only the - * loopback interface. * MULTI_NETDRIVER ugly hack; if defined try to probe * a variety of PCI and ISA drivers * (i386 ONLY) use is discouraged! @@ -140,9 +137,7 @@ const int gesysNetworkTaskPriority = NETWORK_TASK_PRIORITY; #define FIXED_NETMASK 0 #endif -#ifdef LO_IF_ONLY -#undef NIC_NAME -#elif !defined(NIC_NAME) +#if !defined(NIC_NAME) #ifdef MULTI_NETDRIVER @@ -230,8 +225,6 @@ extern int if_index; #endif /* ifdef MULTI_NETDRIVER */ -#endif /* ifdef LO_IF_ONLY */ - #ifdef NIC_NAME extern int NIC_ATTACH(); @@ -245,30 +238,16 @@ static struct rtems_bsdnet_ifconfig netdriver_config[1] = {{ FIXED_NETMASK }}; #else -#ifndef LO_IF_ONLY -#warning "NO KNOWN NETWORK DRIVER FOR THIS BSP -- YOU MAY HAVE TO EDIT rtems_netconfig.c" -#endif +#warning "NO KNOWN NETWORK DRIVER FOR THIS BSP -- YOU MAY HAVE TO EDIT networkconfig.h" #endif -extern void rtems_bsdnet_loopattach(); -static struct rtems_bsdnet_ifconfig loopback_config = { - "lo0", /* name */ - (int (*)(struct rtems_bsdnet_ifconfig *, int))rtems_bsdnet_loopattach, /* attach function */ -#ifdef NIC_NAME - netdriver_config, /* link to next interface */ -#else - 0, /* link to next interface */ -#endif - "127.0.0.1", /* IP address */ - "255.0.0.0", /* IP net mask */ -}; - struct rtems_bsdnet_config rtems_bsdnet_config = { - &loopback_config, /* Network interface */ #ifdef NIC_NAME + netdriver_config, /* link to next interface */ RTEMS_DO_BOOTP, /* Use BOOTP to get network configuration */ #else - 0, /* Use BOOTP to get network configuration */ + 0, + 0, #endif NETWORK_TASK_PRIORITY, /* Network task priority */ #if defined(MEMORY_CUSTOM) diff --git a/networkconfig.h b/networkconfig.h index 1739577..bf303cb 100644 --- a/networkconfig.h +++ b/networkconfig.h @@ -21,34 +21,11 @@ #include -/* - * Loopback interface - */ -extern int rtems_bsdnet_loopattach(); - -/* - * Default network interface - */ -static struct rtems_bsdnet_ifconfig netdriver_config = { - "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, + NULL, /* Loop back interface only */ NULL, /* do not use bootp */ 0, /* Default network task priority */ 0, /* Default mbuf capacity */ -- cgit v1.2.3