[Planetlab-users] Safe Raw Packet Sockets
Mark Huang
mlhuang at CS.Princeton.EDU
Thu May 27 17:45:41 EDT 2004
The new packages have been pushed to all of the nodes I mentioned except for
the Uppsala node, which is currently unavailable:
> planetlab-2.cs.princeton.edu
> planetlab2.postel.org
> planetlab2.cs-ipv6.lancs.ac.uk
> vn2.cs.wustl.edu
> planetlab2.flux.utah.edu
If you want to start exercising the new support, the most obvious caveat is
that only one slice user at a time can bind() to the dummy0 device. Someone
please double-check this for me. The next most obvious caveat is that if you
try to send a malformed or raw IP packet with a source address not in the
reserved range, it will be silently discarded (no error from sendmsg()).
Again, someone please double-check this for me.
To view the IP addresses available to you, look at all the static host routes
bound to dummy0:
/sbin/route -n | grep dummy0
The easiest way to test read support is to run stock tcpdump (in your slice):
/usr/sbin/tcpdump -i dummy0 -p
The easiest way to test write support is to run my toy rawping program:
./rawping -i dummy0 -s <IP address in the reserved range> -d <destination>
You can download the source to rawping at
http://www.cs.princeton.edu/~mlhuang/rawping.c
It's very interesting to watch the kinds of traffic sent to supposedly unused
address space.
If you find a bug or manage to crash any of the machines, please e-mail me or
support at planet-lab.org. If you are interested in the internals, check out the
"sys-v3" module in the "silk" repository at cvs.planet-lab.org.
--Mark
PlanetLab Operations
More information about the Users
mailing list