« Why do now, what you can do later? | Main | while( updates == 0 ) { progress++; } »

Latest adventures with Libnet

I've recently decided to forgo writing all the low level details of packet creation and manipulation and instead take full advantage of the fantastic libnet library. This has many benefits, including not reinventing the wheel, using a library that's already been debugged and tested through use in many applications, and progress will just be much faster. :) The only reason I wanted to do the low level stuff myself was to learn from it, but I feel I've got a good handle on it already, and having looked through the libnet source code, it's VERY clean and readable. If I wanna know how they did something, I can easily find out. Ya gotta love open source. :)

So having decided this, I started using libnet's packet building functions instead of building the packet myself and just using libnet's libnet_write() function to put it on the wire. After getting by my ignorance, things fell into place. Note to self: when working with libnet, you need to build the packet top down instead of bottom up, (TCP header, then the IP header, then the ethernet header). So at the moment, I'm sending probe packets on ranges of IP addresses, however I still need to add the code to get the replies or lack thereof back.

I also found a link to a really good Powerpoint presentation about the latest incarnation of the libnet library that can be found here.

TrackBack

TrackBack URL for this entry:
http://www.aviditysoftware.com/cgi-bin/mt/mt-tb.cgi/7

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on October 27, 2005 11:37 AM.

The previous post in this blog was Why do now, what you can do later?.

The next post in this blog is while( updates == 0 ) { progress++; }.

Many more can be found on the main index page or by looking through the archives.