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

8.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 TFTP support using specified directory
  --help        display this help and exit