Your patch is good but a bit incomplete. For example eth_linux.cc won't compile after your patch is applied - you need to add teh same LOG_THIS change as you did in ne2k.cc:
Also instead of using ne2k2 name, which is ugly I suggest to go to another format, like in another already posted patcj in SF tracker. The format uses the same ne2k option in .bochsrc with card=N parameter (with default of 0 of course):
Both patches require setting BX_USE_NE2K_SMF to 0. According to our coding guidelines we should prefer static member functions for Bochs devices. The parallel and serial port emulation can handle multiple port without setting the SMF to 0. For other devices we should find a similar way. The configuration option should use the zero-based card index you described below.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
source files
Hello,
Your patch is good but a bit incomplete. For example eth_linux.cc won't compile after your patch is applied - you need to add teh same LOG_THIS change as you did in ne2k.cc:
-#define LOG_THIS theNE2kDevice->
+#define LOG_THIS theNE2kDevice[0]->
Also instead of using ne2k2 name, which is ugly I suggest to go to another format, like in another already posted patcj in SF tracker. The format uses the same ne2k option in .bochsrc with card=N parameter (with default of 0 of course):
ne2k: card=0, ioaddr=0x240, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, \
ethdev=/dev/net/tun, script=/home/tt/working/21x/knoppix-2card-setup/tuntapnetwork.sh
ne2k: card=1, ioaddr=0x280, irq=10, mac=fe:fd:00:00:00:03, ethmod=linux, \
ethdev=eth0
ne2k: card=2, ioaddr=0x2c0, irq=11, mac=fe:fd:00:00:00:07, ethmod=linux, \
ethdev=eth1
The another patch I mean is:
[931627] up to 4 Network-Interface-Cards for Bochs instead of only 1
http://bochs.sourceforge.net/cgi-bin/topper.pl?name=Patches&url=http://sourceforge.net/tracker/qmrkatideq312580ampgroup_ideq12580ampfunceqbrowse
Your patch is good but that we actually need is some merge between two - the best things between two. Did you take a look on another patch exists ?
Thanks,
Stanislav
Both patches require setting BX_USE_NE2K_SMF to 0. According to our coding guidelines we should prefer static member functions for Bochs devices. The parallel and serial port emulation can handle multiple port without setting the SMF to 0. For other devices we should find a similar way. The configuration option should use the zero-based card index you described below.
Removed outdated patch. New code applied to SVN now-