Add new pcap io API to make pcap read/write accesses more
simpler and generic. Added pcap_io & pcap_packet struct's to
keep some internal pcap state like magic, link type & packet header
instead of to pass them like parameters and keep it all within netsniff-ng.c.

Also such approach might be used to unify sniffing from ring buffer via
pcap io API similary as it is done with regular files.

Some fast-path sensitive or setter/getter functions were inlined in pcap_io.h.

Vadim Kochan (4):
  pcap io: Introduce new pcap io API to simplify pcap access
  netsniff-ng: Use new pcap io API for read_pcap(...) function
  netsniff-ng: Use new pcap io API for packets dump
  netsniff-ng: Use new pcap io API for pcap to xmit case

 netsniff-ng.c        | 345 +++++++++++++++++----------------------------------
 netsniff-ng/Makefile |   1 +
 pcap_io.c            | 190 ++++++++++++++++++++++++++++
 pcap_io.h            | 143 +++++++++++++++++++++
 4 files changed, 450 insertions(+), 229 deletions(-)
 create mode 100644 pcap_io.c


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 
For more options, visit

Reply via email to