The original patch for the 'socket' networking module has been written by Mariusz Matuszek in 2003. It supported interconnecting two Bochs sessions running on the same machine via UDP using an external program called 'bxhub'.
The 'socket' networking module is now integrated in the Bochs code with these extensions:
Integrated 'vnet' server features (ARP, ICMP-echo, DHCP, DNS, FTP and TFTP)
Limited DNS server for 'vnet' and connected clients
Command line options for 'bxhub' added for base UDP port and 'vnet' server features
Support for connects from up to 6 Bochs sessions
Support for connecting 'bxhub' on other machine
The 'socket' networking module uses two UDP ports per Bochs session. By default the first session receives packets from port 40000 and sends packets to port 40001. The second session uses then the ports 40002 and 40003. For further sessions the port numbers are incremented accordingly. The port number for receiving packets is specified with the 'ethdev' parameter of the bochsrc line for the network adapter. The format is host:port for connecting the 'bxhub' utility. If it runs on the same machine ('localhost') the host name can be omitted.
These examples show how to use the 'socket' module with the NE2000 adapter. The line is very similar for the E1000 or PCI Pseudo NIC.
ne2k: mac=52:54:00:12:34:56, ethmod=socket, ethdev=mymachine:40000, script="" ne2k: mac=52:54:00:12:34:56, ethmod=socket, ethdev=40000, script=""
If bxhub is started without command line options, these default values are used:
UDP base port 40000
2 client connections
Server MAC address b0:c4:20:00:00:0f
FTP / TFTP support disabled
To change the default settings, these parameters are supported:
Usage: bxhub [options] Supported options: -ports=... number of virtual ethernet ports (2 - 6) -base=... base UDP port (bxhub uses 2 ports per Bochs session) -mac=... host MAC address (default is b0:c4:20:00:00:0f) -tftp=... enable FTP and TFTP support using specified directory as root -bootfile=... network bootfile reported by DHCP - located on TFTP server -loglev=... set log level (0 - 3, default 1) -logfile=... send log output to file --help display this help and exit
The 'vnet' server now provides passive FTP support also using the TFTP directory as root. The FTP server name is vnet-ftp. For read only access the user name must be set to anonymous with any password. This mode supports browing the directory subtree and downloading files. For read/write access, the user must be set to bochs with password bochs. This enables support for uploading, renaming and deleting files, creating and removing directories.