On Wed, Jan 27, 2016 at 5:02 PM, Tobias Klauser <[email protected]> wrote:
> On 2016-01-27 at 15:15:01 +0100, Umair Ali <[email protected]> wrote:
>> 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.
>
> The mmap pcap functions (like the scatter-gather and the standard file
> i/o functions) are wired up in struct pcap_file_ops *pcap_ops and then
> used by the respective functions in netsniff-ng.cx according to the pcap
> access method is set in ctx->pcap (PCAP_OPS_MM in case of mmap).
> read_pcap in netsniff-ng.c is probably most interesting to you.
>
> HTH
> 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.

I was thinking that may be if trafgen's proto header crafting patches
will be applied then may be it will allow to
use same syntax to change only-specified proto params for incoming
packets - from ingress pcap/device
and send them changed via specified output device like:

{
    ip(saddr=2.2.2.2)
}

should change each packet with only IPv4 src address with checksum
re-calculation. Not sure if it might be really useful.

Regards,
Vadim Kochan

-- 
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