Lines Matching refs:header
42 void dump_ip(struct iphdr *header) { in dump_ip() argument
46 frag_flags = ntohs(header->frag_off); in dump_ip()
49 printf("header_len = %x\n", header->ihl); in dump_ip()
50 printf("version = %x\n", header->version); in dump_ip()
51 printf("tos = %x\n", header->tos); in dump_ip()
52 printf("tot_len = %x\n", ntohs(header->tot_len)); in dump_ip()
53 printf("id = %x\n", ntohs(header->id)); in dump_ip()
65 printf("ttl = %x\n", header->ttl); in dump_ip()
66 printf("protocol = %x\n", header->protocol); in dump_ip()
67 printf("checksum = %x\n", ntohs(header->check)); in dump_ip()
68 inet_ntop(AF_INET, &header->saddr, addrstr, sizeof(addrstr)); in dump_ip()
70 inet_ntop(AF_INET, &header->daddr, addrstr, sizeof(addrstr)); in dump_ip()
75 void dump_ip6(struct ip6_hdr *header) { in dump_ip6() argument
79 printf("version = %x\n", header->ip6_vfc >> 4); in dump_ip6()
80 printf("traffic class = %x\n", header->ip6_flow >> 20); in dump_ip6()
81 printf("flow label = %x\n", ntohl(header->ip6_flow & 0x000fffff)); in dump_ip6()
82 printf("payload len = %x\n", ntohs(header->ip6_plen)); in dump_ip6()
83 printf("next header = %x\n", header->ip6_nxt); in dump_ip6()
84 printf("hop limit = %x\n", header->ip6_hlim); in dump_ip6()
86 inet_ntop(AF_INET6, &header->ip6_src, addrstr, sizeof(addrstr)); in dump_ip6()
89 inet_ntop(AF_INET6, &header->ip6_dst, addrstr, sizeof(addrstr)); in dump_ip6()