Created
January 30, 2015 12:48
-
-
Save smihir/b67abc4299c888a31c34 to your computer and use it in GitHub Desktop.
code to dump a skb, so that with minimum postprocessing it can be fed to text2pcap for converting into a pcap
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
// This code snippet can be used to dump a skb, so that with minimum postprocessing | |
// it can be fed to text2pcap for converting into a pcap file which can be analyzed | |
// in wireshark | |
do { | |
int i; | |
printk("\n"); | |
printk("000000 "); | |
for (i = 0 ; i < skb->len; i++) { | |
printk("%02x ", ((u8*)skb->data)[i]); | |
if (15 == i%16) | |
printk("\n%06x ", (i + 1)); | |
} | |
printk("\n"); | |
}while(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment