pcap

Python and libpcap. find source mac address of packet.

Hello! I'm writing python program to build mac-address cache using pcap. But pcap module for python has no good documentation. I have found this page http://pylibpcap.sourceforge.net/ with code example and it works fine. Can anybody modify this example to make it able to show the source mac-address for each packet? Or point me to the do...

collect packet length in pcap file

hi guys how can i collect the packet length for each packet in the pcap file? thanks a lot ...

PCap performance

Which c-sharp wrapper of Pcap is fastest? How fast is PCap compared to using sockets? ...

How to install WinPCAP from within my MSI installer ?

I am developing a product that will use WinPCAP for ethernet packet capturing. Is it possible to install WinPCAP from my own MSI or it must be installed seperately ? If it is possible to install it from my own MSI, can someone let me know how ? I also have to support silent installation. ...

String search in a packet

Assume we capture packets with the C API of libpcap. Is it efficient to parse some payload strings with string search strstr() in line speed (e.g. Mbps/Gbps)? For example strstr(payload,"User-Agent"); Would it be more efficient to do it with a regular expression pattern matching library, such as libpcre? If we want to do that only for ...

pcap_dump file not opened y Wireshark

I am trying to save the output of this file in libpcap format and although the file does get saved and the right data is written into it, Wireshark is unable to open it. Anyone see what I am missing here ? Thanks. // opening the device here to listen handle = pcap_open_live( dev, BUFSIZ, 1, 1000, errbuf ); unsigned int dlt = DL...

Detecting video bitrates from a PCAP dump of a (progressive download) stream

Hi, I'm trying to write a program that takes in a PCap dump, detects whether there is an flv stream in it, extracts the bitrate, and infers from the packet times the streaming performance (how long it took to download vs how long the video was). Ideally this should be in C on Linux, but I'd be happy if I can get a prototype working in ...

jNetPcap vs Jpcap

Hi all, wondering any of you can give me a bit of comments + insights please. In term of performance, which one should I use, jNetPcap or Jpcap? Thanks! ...

linux editor similar to notepad++ for packet captures

I am looking for a very specific functionality which Notepad++ has in a linux text editor: So you have a spiffy packet from tcpdump. Notepad++ allows you to easily strip away the left hex via alt+select and then delete. Some short replace spaces and line returns and you can end up with... (see below the capture) 21:43:31.790123 IP ...

How to remove Ethernet layer from a pcap file?

I have a pcap captured with Wireshark. Is there any function in Wireshark that will strip Ethernet layer from the result? Or any command line tool to do it? ...

libpcap inter-arrival times and scheduler

I am doing research about network traffic characterization. While processing collected data (captured by tcpdump and saved to a database), I stumbled over the weird phenomenon with packet (or flow) inter-arrival times: Inter-arrival times of 35-170µsec are never observed Of course, without a DAG card (which would do hardware time stamp...

Linking with new version of libpcap library

Hello, I would like to install and use latest version (1.1.1) of the libpcap on CentOS 5.5 machine. I configured, compiled and installed new libpcap library by: [dima@localhost libpcap-1.1.1]$ ./configure [dima@localhost libpcap-1.1.1]$ make [dima@localhost libpcap-1.1.1]$ sudo make install But when I'm trying to link with libpcap sh...

pcap datalink LINUX_SLL

Hi, I'm trying to write a simple packet sniffer using libpcap. The first thing i'm trying to do when i capture a packet is to recognise the datalink protocol used and find the size of the header for that protocol in order to find the ip packet. The problem is that sometimes libpcap returns as datalink layer protocol the LINUX_SLL which ...

Incorrect reference PcapDotNet.?.dll

Hello I try to use PcapDotNet dll but I can't add reference to my project. It doesn't matter which dll it is. PcapDotNet.Core.dll, PcapDotNet.Base.dll etc. I have yellow exclamation mark near this reference and can't use any methods from this dll. Ofc "using PcapDotNet.Core;" is underlined too and compiler shows me: "The type or namespac...

how to determinate destination MAC address

My application is running on CentOS 5.5 I need to send raw packets using libpcap API: pcap_inject() or pcap_sendpacket() To the specific IP address How can I determinate MAC address belongs to a specific target? ...

Capturing and assembling TCP streams with libnids

Hello, I've been writing a simple sniffer tool. I started out with libpcap, but then realized it would be useful to keep track of TCP stream information, so I began reading about and experimenting with libnids. It's a great tool, however it does not create a new record in its internal hash table of streams if it does not witness the T...