9.13. Using the 'socket' networking module

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:

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=""

9.13.1. Using the 'bxhub' utility

If bxhub is started without command line options, these default values are used:

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

9.13.2. The vnet FTP service

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 username must be set to anonymous with any password. This mode supports browsing 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.