Lines Matching refs:iphdr
46 struct ip_hdr* iphdr;
63 iphdr = p->payload;
65 iphdr->dest.addr = dst_ip->addr;
66 iphdr->src.addr = src_ip->addr;
67 IPH_VHL_SET(iphdr, 4, IP_HLEN / 4);
68 IPH_TOS_SET(iphdr, 0);
69 IPH_LEN_SET(iphdr, htons(p->tot_len));
70 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));
240 struct ip_hdr *iphdr = (struct ip_hdr*)p->payload;
241 ip_addr_copy(current_iphdr_dest, iphdr->dest);
242 ip_addr_copy(current_iphdr_src, iphdr->src);
244 current_header = iphdr;