Reading Network Packets Part 1

Posted by jayrfink on May 10, 2008 6:03 PM
By Systhread.net
Mail this story
Web version

Reading network data can be difficult. Tools and utilities such as wireshark, tcpdump and nmap exist that can aide in dealing with networks at multiple levels. What if, however, one needed to integrate packet reading or writing into their own code? The libpcap library exists for the very purpose of dealing with network data a higher level than the raw socket API. In part one of a three part series a look at writing a very simplistic packet reader utility which can easily be used as the basis for integrating the functionality of libpcap into an existing application.

Reading network data can be difficult. Tools and utilities such as wireshark, tcpdump and nmap exist that can aide in dealing with networks at multiple levels. What if, however, one needed to integrate packet reading or writing into their own code? The libpcap library exists for the very purpose of dealing with network data a higher level than the raw socket API. In part one of a three part series a look at writing a very simplistic packet reader utility which can easily be used as the basis for integrating the functionality of libpcap into an existing application.

Full Story

Printed at http://lxer.com/module/newswire/view/102814/index.html