Hi Tobias,

Thanks for the quick reply. I have read pcap_mm.c file but cannot understand 
the flow of the code. Can you explain me the flow that once the pcap file is 
open using mmap then how it is further processed to extract packet by packet 
and replay. Is it possible with netsniff-ng to send packet every 5micro secs or 
less. 

Thanks in advance

BR
Ali

-----Original Message-----
From: Tobias Klauser [mailto:[email protected]] 
Sent: January-27-16 2:36 PM
To: [email protected]
Cc: Umair Ali
Subject: Re: [netsniff-ng] Replay pcap file on Xenomai kernel in real time

[resending with Ali in Cc in case he's not subscribed to the list]

Hi Ali

On 2016-01-27 at 13:01:55 +0100, Umair Ali <[email protected]> wrote:
> Hello there,
> 
> I am working on the project of replaying the pcap files in the real time over 
> the network. For this purpose I am using the real time Linux kernel 'Xenomai 
> v 3.0.1'. My idea is to write a code in C which will read the pcap file 
> packet by packet and then send the packet as raw Ethernet packet over the 
> real time interface. When the pcap libraries are used on the xenomai then the 
> process of reading pcap files does not behave in real time any more. Moreover 
> the xenomai uses the mmap for reading the files in real time. I have tried to 
> use the mmap technique to read pcap file but it is not perfect and works for 
> small files. I have read the netsniff.ng tool uses the same mmap technique to 
> read the pcap file for replaying the pcap file. My question is that how mmap 
> is used in netsniff-ng tool to read the pcap file packet by packet. Can you 
> give me the C code as an example to read the pcap file using mmap packet by 
> packet. I shall be highly thankful.

Have a look at pcap_mm.c, the mmap base pcap read/write functions are defined 
there.

Hope that helps
Tobias

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to