Created
August 29, 2019 09:36
-
-
Save strizhechenko/f9f3eb0d03d11f64267b9ea1f65dd837 to your computer and use it in GitHub Desktop.
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
static void print_skb_stuff(const struct sk_buff *skb) | |
{ | |
struct tcphdr _tcph; | |
const struct tcphdr *tcph; | |
tcph = skb_header_pointer(skb, ip_hdrlen(skb), | |
sizeof(_tcph), &_tcph); | |
printk("syn=%u ack=%u psh=%u fin=%u seq=%u ack_seq=%u skb->len %u csum=%x\n", | |
tcph->syn, | |
tcph->ack, | |
tcph->psh, | |
tcph->fin, | |
ntohl(tcph->ack_seq), | |
ntohl(tcph->seq), | |
skb->len, | |
tcph->check | |
); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment