- the PCI Pseudo-NIC is now independent from the NE2000 NIC stuff. New symbol
BX_NETWORKING controls the presence of the lowlevel networking stuff. - eth.cc: unused stuff removed
This commit is contained in:
parent
5139af0fd1
commit
f93b04df0b
@ -894,6 +894,17 @@ typedef
|
||||
|
||||
// NE2K network emulation
|
||||
#define BX_SUPPORT_NE2K 0
|
||||
|
||||
// Pseudo PCI NIC
|
||||
#define BX_SUPPORT_PCIPNIC 0
|
||||
|
||||
#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_PCI)
|
||||
#error To enable the PCI pseudo NIC, you must also enable PCI
|
||||
#endif
|
||||
|
||||
// this enables the lowlevel stuff below if one of the NICs is present
|
||||
#define BX_NETWORKING 0
|
||||
|
||||
#define BX_ETH_NULL_LOGGING 1
|
||||
#define BX_ETH_FBSD_LOGGING 1
|
||||
|
||||
@ -919,19 +930,8 @@ typedef
|
||||
// this enables TUN/TAP packet mover; determined by configure script
|
||||
#define HAVE_TUNTAP 0
|
||||
|
||||
|
||||
// Pseudo PCI NIC
|
||||
#define BX_SUPPORT_PCIPNIC 0
|
||||
|
||||
#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_PCI)
|
||||
#error To enable the PCI pseudo NIC, you must also enable PCI
|
||||
#endif
|
||||
|
||||
// Check for NE2K support, since all the networking code is ifdeffed
|
||||
// under that. There should probably be a more generic "enable-networking"
|
||||
#if (BX_SUPPORT_PCIPNIC && !BX_SUPPORT_NE2K)
|
||||
#error To enable the pseudo NIC, you must also enable ne2000
|
||||
#endif
|
||||
// this enables VDE packet mover; TODO: configure check
|
||||
#define HAVE_VDE 0
|
||||
|
||||
|
||||
// I/O Interface to debug
|
||||
|
7499
bochs/configure
vendored
7499
bochs/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(bochs.h)
|
||||
AC_REVISION([[$Id: configure.in,v 1.263 2004-09-21 21:07:39 sshwarts Exp $]])
|
||||
AC_REVISION([[$Id: configure.in,v 1.264 2004-10-03 20:02:08 vruppert Exp $]])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_HEADER(ltdlconf.h)
|
||||
|
||||
@ -721,79 +721,21 @@ AC_ARG_ENABLE(ne2000,
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BX_SUPPORT_NE2K, 1)
|
||||
NE2K_OBJS='ne2k.o'
|
||||
NETLOW_OBJS='eth.o eth_null.o eth_vnet.o'
|
||||
AC_CHECK_HEADER(net/bpf.h, NETLOW_OBJS="$NETLOW_OBJS eth_fbsd.o")
|
||||
AC_CHECK_HEADER(netpacket/packet.h, NETLOW_OBJS="$NETLOW_OBJS eth_linux.o")
|
||||
case "$target" in
|
||||
*-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_win32.o"
|
||||
;;
|
||||
*-macosx* | *-darwin*)
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
|
||||
AC_DEFINE(HAVE_TUNTAP, 1)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_HEADER(net/if.h, [
|
||||
use_ethertap=yes
|
||||
], [],
|
||||
[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
AC_CHECK_HEADER(linux/netlink.h, [
|
||||
use_ethertap=yes
|
||||
], [],
|
||||
[
|
||||
#include <asm/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
|
||||
if test "$use_ethertap" = yes; then
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tap.o"
|
||||
AC_DEFINE(HAVE_ETHERTAP, 1)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(net/if_tun.h, [
|
||||
use_tuntap=yes
|
||||
], [],
|
||||
[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
])
|
||||
AC_CHECK_HEADER(linux/if_tun.h, [
|
||||
use_tuntap=yes
|
||||
], [],
|
||||
[
|
||||
#include <asm/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
if test "$use_tuntap" = yes; then
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
|
||||
AC_DEFINE(HAVE_TUNTAP, 1)
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
networking=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_SUPPORT_NE2K, 0)
|
||||
NE2K_OBJS=''
|
||||
NETLOW_OBJS=''
|
||||
networking=no
|
||||
fi],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_SUPPORT_NE2K, 0)
|
||||
NE2K_OBJS=''
|
||||
NETLOW_OBJS=''
|
||||
networking=no
|
||||
]
|
||||
)
|
||||
AC_SUBST(NE2K_OBJS)
|
||||
AC_SUBST(NETLOW_OBJS)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for i440FX PCI support)
|
||||
AC_ARG_ENABLE(pci,
|
||||
@ -901,6 +843,7 @@ AC_ARG_ENABLE(pnic,
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BX_SUPPORT_PCIPNIC, 1)
|
||||
PCI_OBJ="$PCI_OBJ pcipnic.o"
|
||||
networking=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_SUPPORT_PCIPNIC, 0)
|
||||
@ -911,6 +854,70 @@ AC_ARG_ENABLE(pnic,
|
||||
]
|
||||
)
|
||||
|
||||
NETLOW_OBJS=''
|
||||
if test "$networking" = yes; then
|
||||
NETLOW_OBJS='eth.o eth_null.o eth_vnet.o'
|
||||
AC_CHECK_HEADER(net/bpf.h, NETLOW_OBJS="$NETLOW_OBJS eth_fbsd.o")
|
||||
AC_CHECK_HEADER(netpacket/packet.h, NETLOW_OBJS="$NETLOW_OBJS eth_linux.o")
|
||||
case "$target" in
|
||||
*-pc-windows* | *-pc-winnt* | *-pc-cygwin* | *-pc-mingw32*)
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_win32.o"
|
||||
;;
|
||||
*-macosx* | *-darwin*)
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
|
||||
AC_DEFINE(HAVE_TUNTAP, 1)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_HEADER(net/if.h, [
|
||||
use_ethertap=yes
|
||||
], [],
|
||||
[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
AC_CHECK_HEADER(linux/netlink.h, [
|
||||
use_ethertap=yes
|
||||
], [],
|
||||
[
|
||||
#include <asm/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
|
||||
if test "$use_ethertap" = yes; then
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tap.o"
|
||||
AC_DEFINE(HAVE_ETHERTAP, 1)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(net/if_tun.h, [
|
||||
use_tuntap=yes
|
||||
], [],
|
||||
[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
])
|
||||
AC_CHECK_HEADER(linux/if_tun.h, [
|
||||
use_tuntap=yes
|
||||
], [],
|
||||
[
|
||||
#include <asm/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
if test "$use_tuntap" = yes; then
|
||||
NETLOW_OBJS="$NETLOW_OBJS eth_tuntap.o"
|
||||
AC_DEFINE(HAVE_TUNTAP, 1)
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE(BX_NETWORKING, 1)
|
||||
else
|
||||
AC_DEFINE(BX_NETWORKING, 0)
|
||||
fi
|
||||
|
||||
AC_SUBST(NETLOW_OBJS)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for Promise DC2300 VLB-IDE support)
|
||||
AC_ARG_ENABLE(dc2300-vlb-ide,
|
||||
[ --enable-dc2300-vlb-ide enable Promise DC2300 VLB-IDE support],
|
||||
|
@ -146,6 +146,9 @@ libbx_sb16.la: sb16.lo $(SOUNDLOW_OBJS:.o=.lo)
|
||||
libbx_ne2k.la: ne2k.lo $(NETLOW_OBJS:.o=.lo)
|
||||
$(LIBTOOL) --mode=link $(CXX) -module ne2k.lo $(NETLOW_OBJS:.o=.lo) -o libbx_ne2k.la -rpath $(PLUGIN_PATH)
|
||||
|
||||
libbx_pcipnic.la: pcipnic.lo $(NETLOW_OBJS:.o=.lo)
|
||||
$(LIBTOOL) --mode=link $(CXX) -module pcipnic.lo $(NETLOW_OBJS:.o=.lo) -o libbx_pcipnic.la -rpath $(PLUGIN_PATH)
|
||||
|
||||
libbx_serial.la: serial.lo serial_raw.lo
|
||||
$(LIBTOOL) --mode=link $(CXX) -module serial.lo serial_raw.lo -o libbx_serial.la -rpath $(PLUGIN_PATH)
|
||||
|
||||
@ -172,6 +175,9 @@ bx_sb16.dll: sb16.o $(SOUNDLOW_OBJS)
|
||||
bx_ne2k.dll: ne2k.o $(NETLOW_OBJS)
|
||||
$(CXX) $(CXXFLAGS) -shared -o bx_ne2k.dll ne2k.o $(NETLOW_OBJS) $(WIN32_DLL_IMPORT_LIBRARY)
|
||||
|
||||
bx_pcipnic.dll: pcipnic.o $(NETLOW_OBJS)
|
||||
$(CXX) $(CXXFLAGS) -shared -o bx_pcipnic.dll pcipnic.o $(NETLOW_OBJS) $(WIN32_DLL_IMPORT_LIBRARY)
|
||||
|
||||
bx_gameport.dll: gameport.o
|
||||
$(CXX) $(CXXFLAGS) -shared -o bx_gameport.dll gameport.o $(WIN32_DLL_IMPORT_LIBRARY) -lwinmm
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: devices.cc,v 1.75 2004-08-06 15:49:54 vruppert Exp $
|
||||
// $Id: devices.cc,v 1.76 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -106,7 +106,7 @@ bx_devices_c::init(BX_MEM_C *newmem)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
BX_DEBUG(("Init $Id: devices.cc,v 1.75 2004-08-06 15:49:54 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: devices.cc,v 1.76 2004-10-03 20:02:09 vruppert Exp $"));
|
||||
mem = newmem;
|
||||
|
||||
/* set no-default handlers, will be overwritten by the real default handler */
|
||||
@ -187,8 +187,8 @@ bx_devices_c::init(BX_MEM_C *newmem)
|
||||
#if BX_SUPPORT_PCIDEV
|
||||
PLUG_load_plugin(pcidev, PLUGTYPE_OPTIONAL);
|
||||
#endif
|
||||
#if BX_SUPPORT_PCIPNIC && BX_SUPPORT_NE2K
|
||||
if (bx_options.ne2k.Opresent->get ()) {
|
||||
#if BX_SUPPORT_PCIPNIC
|
||||
if (bx_options.pnic.Oenabled->get ()) {
|
||||
PLUG_load_plugin(pcipnic, PLUGTYPE_OPTIONAL);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth.cc,v 1.21 2004-09-05 10:30:18 vruppert Exp $
|
||||
// $Id: eth.cc,v 1.22 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -35,7 +35,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -75,9 +75,6 @@ extern class bx_tuntap_locator_c bx_tuntap_match;
|
||||
#if HAVE_VDE
|
||||
extern class bx_vde_locator_c bx_vde_match;
|
||||
#endif
|
||||
#ifdef ETH_TEST
|
||||
extern bx_test_match;
|
||||
#endif
|
||||
#ifdef ETH_ARPBACK
|
||||
extern class bx_arpback_locator_c bx_arpback_match;
|
||||
#endif
|
||||
@ -147,12 +144,6 @@ eth_locator_c::create(const char *type, const char *netif,
|
||||
if(!strcmp(type, "win32"))
|
||||
ptr = (eth_locator_c *) &bx_win32_match;
|
||||
}
|
||||
#endif
|
||||
#ifdef ETH_TEST
|
||||
{
|
||||
if (!strcmp(type, "test"))
|
||||
ptr = (eth_locator_c *) &bx_test_match;
|
||||
}
|
||||
#endif
|
||||
{
|
||||
if (!strcmp(type, "vnet"))
|
||||
@ -207,4 +198,4 @@ int execute_script( char* scriptname, char* arg1 )
|
||||
|
||||
#endif // (HAVE_ETHERTAP==1) || (HAVE_TUNTAP==1)
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_arpback.cc,v 1.15 2004-09-18 12:35:13 vruppert Exp $
|
||||
// $Id: eth_arpback.cc,v 1.16 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include "iodev.h"
|
||||
|
||||
#if BX_SUPPORT_NE2K && defined(ETH_ARPBACK)
|
||||
#if BX_NETWORKING && defined(ETH_ARPBACK)
|
||||
|
||||
#include "eth.h"
|
||||
#include "crc32.h"
|
||||
@ -210,5 +210,4 @@ void bx_arpback_pktmover_c::rx_timer (void)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K && defined(ETH_ARPBACK) */
|
||||
|
||||
#endif /* if BX_NETWORKING && defined(ETH_ARPBACK) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_fbsd.cc,v 1.29 2004-09-05 10:30:18 vruppert Exp $
|
||||
// $Id: eth_fbsd.cc,v 1.30 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -54,7 +54,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K && defined(ETH_FBSD)
|
||||
#if BX_NETWORKING && defined(ETH_FBSD)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -383,5 +383,5 @@ bx_fbsd_pktmover_c::rx_timer(void)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K && defined(ETH_FBSD) */
|
||||
#endif /* if BX_NETWORKING && defined(ETH_FBSD) */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_linux.cc,v 1.18 2004-09-18 12:35:13 vruppert Exp $
|
||||
// $Id: eth_linux.cc,v 1.19 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -46,7 +46,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K && defined (ETH_LINUX)
|
||||
#if BX_NETWORKING && defined (ETH_LINUX)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -285,4 +285,4 @@ bx_linux_pktmover_c::rx_timer(void)
|
||||
(*rxh)(rxarg, rxbuf, nbytes);
|
||||
// }
|
||||
}
|
||||
#endif /* if BX_SUPPORT_NE2K && defined ETH_LINUX */
|
||||
#endif /* if BX_NETWORKING && defined ETH_LINUX */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_null.cc,v 1.16 2004-09-05 10:30:18 vruppert Exp $
|
||||
// $Id: eth_null.cc,v 1.17 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -37,7 +37,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -163,4 +163,4 @@ void bx_null_pktmover_c::rx_timer_handler (void *this_ptr)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_packetmaker.cc,v 1.12 2004-09-18 12:35:13 vruppert Exp $
|
||||
// $Id: eth_packetmaker.cc,v 1.13 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Define BX_PLUGGABLE in files that can be compiled into plugins. For
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include "iodev.h"
|
||||
|
||||
#if BX_SUPPORT_NE2K && defined(ETH_ARPBACK)
|
||||
#if BX_NETWORKING && defined(ETH_ARPBACK)
|
||||
|
||||
#include "eth_packetmaker.h"
|
||||
|
||||
@ -181,4 +181,4 @@ eth_ARPmaker::sendpacket(const eth_packet& outpacket) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K && defined(ETH_ARPBACK) */
|
||||
#endif /* if BX_NETWORKING && defined(ETH_ARPBACK) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_tap.cc,v 1.22 2004-09-26 15:38:23 vruppert Exp $
|
||||
// $Id: eth_tap.cc,v 1.23 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -85,7 +85,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING && defined(HAVE_ETHERTAP)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -372,4 +372,4 @@ void bx_tap_pktmover_c::rx_timer ()
|
||||
(*rxh)(rxarg, rxbuf, nbytes);
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING && defined HAVE_ETHERTAP */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_tuntap.cc,v 1.17 2004-09-26 15:38:24 vruppert Exp $
|
||||
// $Id: eth_tuntap.cc,v 1.18 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -32,7 +32,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING && defined(HAVE_TUNTAP)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -384,4 +384,4 @@ int tun_alloc(char *dev)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING && defined HAVE_TUNTAP */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_vde.cc,v 1.6 2004-09-26 15:38:24 vruppert Exp $
|
||||
// $Id: eth_vde.cc,v 1.7 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2003 Renzo Davoli
|
||||
@ -27,7 +27,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING && defined(HAVE_VDE)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -337,4 +337,4 @@ int vde_alloc(char *dev, int *fdp, struct sockaddr_un *pdataout)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING && defined HAVE_VDE */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_vnet.cc,v 1.8 2004-10-01 17:14:46 vruppert Exp $
|
||||
// $Id: eth_vnet.cc,v 1.9 2004-10-03 20:02:09 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// virtual Ethernet locator
|
||||
@ -18,7 +18,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -1056,4 +1056,4 @@ bx_vnet_pktmover_c::udpipv4_dhcp_handler_ns(
|
||||
|
||||
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_win32.cc,v 1.22 2004-09-18 14:16:59 sshwarts Exp $
|
||||
// $Id: eth_win32.cc,v 1.23 2004-10-03 20:02:10 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -42,7 +42,7 @@
|
||||
#define BX_PLUGGABLE
|
||||
|
||||
#include "iodev.h"
|
||||
#if BX_SUPPORT_NE2K
|
||||
#if BX_NETWORKING && defined(ETH_WIN32)
|
||||
|
||||
#include "eth.h"
|
||||
|
||||
@ -357,4 +357,4 @@ void bx_win32_pktmover_c::rx_timer_handler (void *this_ptr)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* if BX_SUPPORT_NE2K */
|
||||
#endif /* if BX_NETWORKING && defined ETH_WIN32 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pcipnic.cc,v 1.10 2004-10-03 19:30:36 sshwarts Exp $
|
||||
// $Id: pcipnic.cc,v 1.11 2004-10-03 20:02:10 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2003 Fen Systems Ltd.
|
||||
@ -91,45 +91,21 @@ bx_pcipnic_c::init(void)
|
||||
// FIXME: eth_tuntap.cc rips script straight from ne2k options...
|
||||
//
|
||||
bx_options.ne2k.Oscript->set ( bx_options.pnic.Oscript->getptr() );
|
||||
#if BX_PLUGINS
|
||||
plugin_t *anIter;
|
||||
for (anIter = plugins; (anIter != NULL) && strcmp(anIter->name, "ne2k"); anIter = anIter->next);
|
||||
BX_ASSERT(anIter != NULL);
|
||||
BX_PNIC_THIS ethdev = (*(eth_pktmover_c *(*)
|
||||
(const char *, const char *, const char *, eth_rx_handler_t, void *))
|
||||
lt_dlsym(anIter->handle, "_ZN13eth_locator_c6createEPKcS1_S1_PFvPvPKvjES2_"))
|
||||
(ethmod,
|
||||
bx_options.pnic.Oethdev->getptr (),
|
||||
(const char *) bx_options.pnic.Omacaddr->getptr (),
|
||||
rx_handler,
|
||||
this);
|
||||
#else
|
||||
BX_PNIC_THIS ethdev = eth_locator_c::create(ethmod,
|
||||
bx_options.pnic.Oethdev->getptr (),
|
||||
(const char *) bx_options.pnic.Omacaddr->getptr (),
|
||||
rx_handler,
|
||||
this);
|
||||
#endif
|
||||
|
||||
if (BX_PNIC_THIS ethdev == NULL) {
|
||||
BX_PANIC(("could not find eth module %s", ethmod));
|
||||
// if they continue, use null.
|
||||
BX_INFO(("could not find eth module %s - using null instead", ethmod));
|
||||
|
||||
#if BX_PLUGINS
|
||||
BX_PNIC_THIS ethdev = (*(eth_pktmover_c *(*)
|
||||
(const char *, const char *, const char *, eth_rx_handler_t, void *))
|
||||
lt_dlsym(anIter->handle, "_ZN13eth_locator_c6createEPKcS1_S1_PFvPvPKvjES2_"))
|
||||
("null", NULL,
|
||||
(const char *) bx_options.pnic.Omacaddr->getptr (),
|
||||
rx_handler,
|
||||
this);
|
||||
#else
|
||||
BX_PNIC_THIS ethdev = eth_locator_c::create("null", NULL,
|
||||
(const char *) bx_options.pnic.Omacaddr->getptr (),
|
||||
rx_handler,
|
||||
this);
|
||||
#endif
|
||||
if (BX_PNIC_THIS ethdev == NULL)
|
||||
BX_PANIC(("could not locate null module"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user