Created
June 17, 2017 08:10
-
-
Save slankdev/cfedfbd706970783a0e4a357caf6d40b to your computer and use it in GitHub Desktop.
autotools sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <slankdev/extra/pcap.h> | |
#include <slankdev/hexdump.h> | |
void callback(uint8_t* user, const struct pcap_pkthdr* h, const uint8_t* byte) | |
{ | |
slankdev::hexdump(stdout, byte, h->len); | |
} | |
int main() | |
{ | |
slankdev::pcap pcap; | |
pcap.open_offline("in.pcap"); | |
pcap.loop(0, callback, nullptr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment