Back to index

natlog  0.91.0
callback.cc
Go to the documentation of this file.
00001 #include "pcapfilter.ih"
00002 
00003 void PcapFilter::callback(PcapFilter *pf, struct pcap_pkthdr const *hdr,
00004                           u_char const *packetBytes)
00005 {
00006     PcapPacket packet(*hdr, packetBytes - pf->shiftPacketBegin());
00007 
00008     if (pf->d_type == PcapRecord::IN)
00009         pf->inDevice(packet);
00010     else 
00011         pf->outDevice(packet);
00012 }