Lines Matching refs:iphdr
120 next_off = sizeof(struct iphdr) + offsetof(struct iphdr, protocol); in setup_sock_filter()
122 next_off = offsetof(struct iphdr, protocol); in setup_sock_filter()
254 struct iphdr *iph = buf; in fill_networklayer()
275 payload_len + sizeof(struct iphdr)); in fill_networklayer()
281 iph->check = checksum_fold(buf, sizeof(struct iphdr), 0); in fill_networklayer()
325 fill_networklayer(buf + ETH_HLEN, payload_len + sizeof(struct iphdr), in create_packet()
327 fill_networklayer(buf + ETH_HLEN + sizeof(struct iphdr), in create_packet()
420 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in recompute_packet()
432 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in recompute_packet()
438 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in recompute_packet()
605 struct iphdr *iph; in add_ipv4_ts_option()
619 iph = (struct iphdr *)(optpkt + ETH_HLEN); in add_ipv4_ts_option()
623 iph->check = checksum_fold(iph, sizeof(struct iphdr) + optlen, 0); in add_ipv4_ts_option()
645 static void fix_ip4_checksum(struct iphdr *iph) in fix_ip4_checksum()
648 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in fix_ip4_checksum()
657 struct iphdr *iph1; in send_flush_id_case()
658 struct iphdr *iph2; in send_flush_id_case()
659 struct iphdr *iph3; in send_flush_id_case()
661 iph1 = (struct iphdr *)(buf1 + ETH_HLEN); in send_flush_id_case()
662 iph2 = (struct iphdr *)(buf2 + ETH_HLEN); in send_flush_id_case()
663 iph3 = (struct iphdr *)(buf3 + ETH_HLEN); in send_flush_id_case()
789 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in send_fragment4()
806 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in send_fragment4()
815 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in send_changed_ttl()
823 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in send_changed_ttl()
832 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in send_changed_tos()
842 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in send_changed_tos()
854 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in send_changed_ECN()
863 iph->check = checksum_fold(iph, sizeof(struct iphdr), 0); in send_changed_ECN()
933 struct iphdr *iph = (struct iphdr *)(buffer + ETH_HLEN); in check_recv_pkts()
973 - sizeof(struct tcphdr) - sizeof(struct iphdr); in check_recv_pkts()
1345 tcp_offset = ETH_HLEN + sizeof(struct iphdr) * 2; in main()
1348 tcp_offset = ETH_HLEN + sizeof(struct iphdr); in main()