Menu

TCP/IP services are in

The previously-mentioned networking support code has been written and committed. Libvirt is used on the native side to allocate a LXC virtual network interface with a private IP and MAC address for each control, and each control runs as a separate process inside it's own LXC container. An ultra-simple TCP interface (send(destination_address, message) and recieve(source_address)) is used by a common network interface control which is instantiated inside each "standard" control and delivers messages to in- and out-message strings in the containing parent control for further processing. Presto! Controlix now has a client-server process management and IPC system.

Current issues:

  • The whole thing (may be? is?) not too portable - LXC is Linux-only, AFAIK. Libvirt itself has been ported to several other platforms, but without LXC container support on the back-end it will be necessary to use Xen or QEMU or suchlike and run a whole disk image, boot an OS, etc etc instead of being able to simply kick off a single ELF executable. All a lot of work and hassle in order to get a virtual network interface provider... I guess I will need to explicitly specify Linux as the only supported simulation target for the Controlix build system for now. Hopefully LXC will end up being ported to Windows, Mac OS, etc at some point.

  • The TCP interface is pretty primitive at present - it really should work as a real hardware interface does, with Ethernet frame handling and segmentation/bridging, routing of TCP/IP packets between subnets with NAT, IPv6 support should be used instead of IPv4, the whole thing should be clocked synchronous so it can be synthesized properly, and many other issues as well remain. It is good enough now to provide IPC, so it may remain simple for a little while until Controlix as a whole gels a bit more, but I anticipate it growing a lot in the future.

Posted by Jon Taylor 2013-05-14

Log in to post a comment.