[robocup-small] Referee Box Proposed Patch

Christopher Head chead at interchange.ubc.ca
Fri Apr 2 18:01:41 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
I'd like to propose the attached patch to be applied to the referee box
source code (it's based on the 2009-10-19 release tarball). The purpose
of this patch is as follows:

At initialization time, the refbox examines the list of network
interfaces on the machine and records the addresses of all interfaces
other than "lo" (the loopback interface is excluded because it does not
support multicast). When the refbox needs to send a packet, it iterates
through the network interfaces and sends the packet out on each
interface.

Corollary: if no network interfaces other than "lo" are found, no
packet is ever sent.

This patch adds a clause which, if no non-lo interfaces were found,
simply sends the packet out arbitrarily, without trying to set the
multicast interface address at all.

This allows one to do tests on a machine without a network connection
by simply running the refbox and the target software (which intends to
receive packets) on the same machine, as long as one sets the
MULTICASTADDRESS parameter in referee.conf to 127.0.0.1 and as long as
the receiving software treats the failure of the IP_ADD_MEMBERSHIP call
as nonfatal.

Thanks for your consideration,
Christopher Head
Software Lead
UBC Thunderbots
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GnuPT 2.7.2

iEYEARECAAYFAku2aUUACgkQXUF6hOTGP7e1gQCeNdUyMGoS7l0Z7Tj2vxbj41Nj
hkcAn2gZkcjotZnM52mqvNQwkDm3M+vX
=CaPi
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-network-support
Type: application/octet-stream
Size: 746 bytes
Desc: not available
Url : http://lists.cc.gatech.edu/pipermail/robocup-small/attachments/20100402/c4defd18/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-network-support.sig
Type: application/octet-stream
Size: 72 bytes
Desc: not available
Url : http://lists.cc.gatech.edu/pipermail/robocup-small/attachments/20100402/c4defd18/attachment-0001.obj 


More information about the robocup-small mailing list