mozilla/rust — pull request #11410 by mrmonday (2014-01-08 20:56:34+00:00)
Title: Raw socket support

This pull request adds raw socket support to rust using libuv.

Some notes:
* It only supports the libuv backend - the native backend is stubbed out.
* Tests are not included
* Documentation follows that of the surrounding code (I can add some if you prefer)
* Windows does not support raw sockets

Using raw sockets requires root access on the machine, which I assume the test suite does not have (and will not have) access to. The way around this would be to create a dummy library which exposes all the C functions used without actually implementing the functionality - I don't know how best to go about this or how to integrate it with the test-suite, guidance would be helpful.

I can add support for the native backend if required - there's no reason it can't be there, it just didn't exist while I was writing support. I have tested this on all the platforms I have available to me under various scenarios (transport layer/ipv4/ipv6 and network layer).