Okay, I know I promised to write some stories to the pictures in Pictures tell stories, but that will either happen later or never…
Here is a feel-good episode from work – or at least related to work.
A guy asks on the channel #bsd-dk on EFnet for a piece of software to receive UDP packets and forward them to a number of hosts:
09:28:46 <some_guy> hmm, can anybody recommend something from /usr/ports that can receive udp packets and forward them to multiple hosts?
Nobody suggests anything, and some people, myself included, jokes that it will only take a “few” lines of Perl, Python or C to do the trick.
While waiting – at work – for nodes to be drained in our loadbalancer and Tomcats to deploy, I read up on sockets, putting sockets (and file handles) in an array/hash and registering a signal handler, and I write this proof of concept UDP forwarder:
11:49:19 <some_guy> toft: perfect, it works just fine. directly into production it goes. thanks :-)
Of course, in retrospect, the operating system’s kernel does housekeeping of sockets when a process dies, so the lines 6, 15-23 and 31-33 are not strictly necessary. In conclusion, a “few” lines of Perl in this case is equal to 31.
The forwarder in action: