tcpdump mailing list archives

Re: Need Ur Help - Source Code Structure


From: Maciej Grela <maciej.grela () gmail com>
Date: Wed, 6 May 2009 00:13:50 +0159

2009/5/5 Pattabi Prasanna <escort146 () gmail com>:
Hi,
       I want to develop a capture engine, which captures all the packets
passing through the interface.  I am analyzing the tcpdump source code, can
anyone tell me the flow of the source code or how it is structured.  I want
to store the packet details in a database, and analysis the bandwidth usage
by IP's.  Waiting for your positive reply.   Thanks in advance.


You should focus on the libpcap library documentation and examples:
http://www.tcpdump.org/#documentation.
However, have you considered using iptables to count data flowing
between the IPs you want to monitor ? Check out iptables -v -L, it
gives you a counter of packets and bytes for each rule you define.

Best regards,
Maciej Grela
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: