Lines Matching refs:ip_hdr
745 struct iphdr *ip_hdr = (struct iphdr *)(pkt_data +
755 ip_hdr->version = IPVERSION;
756 ip_hdr->ihl = 0x5; /* 20 byte header */
757 ip_hdr->tos = 0x0;
758 ip_hdr->tot_len = htons(IP_PKT_SIZE);
759 ip_hdr->id = 0;
760 ip_hdr->frag_off = 0;
761 ip_hdr->ttl = IPDEFTTL;
762 ip_hdr->protocol = IPPROTO_UDP;
763 ip_hdr->saddr = htonl(0x0a0a0a10);
764 ip_hdr->daddr = htonl(0x0a0a0a20);
767 ip_hdr->check = 0;
768 ip_hdr->check = ip_fast_csum((const void *)ip_hdr, ip_hdr->ihl);
781 udp_hdr->check = udp_csum(ip_hdr->saddr, ip_hdr->daddr, UDP_PKT_SIZE,