Lines Matching refs:iphdr
52 struct ip_hdr* iphdr; in tcp_create_segment_wnd() local
70 iphdr = (struct ip_hdr*)p->payload; in tcp_create_segment_wnd()
72 iphdr->dest.addr = ip_2_ip4(dst_ip)->addr; in tcp_create_segment_wnd()
73 iphdr->src.addr = ip_2_ip4(src_ip)->addr; in tcp_create_segment_wnd()
74 IPH_VHL_SET(iphdr, 4, IP_HLEN / 4); in tcp_create_segment_wnd()
75 IPH_TOS_SET(iphdr, 0); in tcp_create_segment_wnd()
76 IPH_LEN_SET(iphdr, htons(p->tot_len)); in tcp_create_segment_wnd()
77 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); in tcp_create_segment_wnd()
256 struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; in test_tcp_input() local
258 ip_addr_copy_from_ip4(*ip_current_dest_addr(), iphdr->dest); in test_tcp_input()
259 ip_addr_copy_from_ip4(*ip_current_src_addr(), iphdr->src); in test_tcp_input()
261 ip_data.current_ip4_header = iphdr; in test_tcp_input()