[Winpcap-users] RE: capture AND send packets on same device

Mark Buchanan Mark.Buchanan at giffels.com
Wed Feb 27 16:44:12 GMT 2008

Use 'pcap_loop(adhandle, 0, packet_handler, NULL);' where
'packet_handler' is the call back function that gets called when a
packet comes in. 

The callback function is then:
'void packet_handler(u_char *param, const struct pcap_pkthdr *header,
const u_char *pkt_data)'

You can call the function:
anytime to send out on the wire.

Mark Buchanan

Senior Engineer, Controls Systems
Giffels Associates Limited

Mark.Buchanan at giffels.com |  T 416 675 9750 Ext. 5253  |  F 416 798 5559  |  giffels.com

    This communication is intended solely for the addressee(s) and contains information that is privileged, confidential
    and subject to copyright. Any unauthorized use, copying, review or disclosure is prohibited. If received in error,
    please notify us immediately by return e-mail.


More information about the Winpcap-users mailing list