Lines Matching refs:header
39 /* print ip header */
40 void dump_ip(struct iphdr *header) {
44 frag_flags = ntohs(header->frag_off);
47 printf("header_len = %x\n",header->ihl);
48 printf("version = %x\n",header->version);
49 printf("tos = %x\n",header->tos);
50 printf("tot_len = %x\n",ntohs(header->tot_len));
51 printf("id = %x\n",ntohs(header->id));
63 printf("ttl = %x\n",header->ttl);
64 printf("protocol = %x\n",header->protocol);
65 printf("checksum = %x\n",ntohs(header->check));
66 inet_ntop(AF_INET, &header->saddr, addrstr, sizeof(addrstr));
68 inet_ntop(AF_INET, &header->daddr, addrstr, sizeof(addrstr));
72 /* print ip6 header */
73 void dump_ip6(struct ip6_hdr *header) {
77 printf("version = %x\n",header->ip6_vfc >> 4);
78 printf("traffic class = %x\n",header->ip6_flow >> 20);
79 printf("flow label = %x\n",ntohl(header->ip6_flow & 0x000fffff));
80 printf("payload len = %x\n",ntohs(header->ip6_plen));
81 printf("next header = %x\n",header->ip6_nxt);
82 printf("hop limit = %x\n",header->ip6_hlim);
84 inet_ntop(AF_INET6, &header->ip6_src, addrstr, sizeof(addrstr));
87 inet_ntop(AF_INET6, &header->ip6_dst, addrstr, sizeof(addrstr));
91 /* print icmp header */
112 /* print icmp6 header */
132 /* print udp header */
147 /* print ipv4/udp header */
154 /* print ipv6/udp header */
161 /* print tcp header */
202 /* print ipv4/tcp header */
210 /* print ipv6/tcp header */