Lines Matching defs:iph
2559 struct iphdr *iph;
2585 iph = ip_hdr(skb);
2586 iph->tot_len = htons(skb->len - ETH_HLEN);
2587 ip_send_check(iph);
2726 struct iphdr *iph;
2782 iph = skb_put(skb, sizeof(struct iphdr));
2803 iph->ihl = 5;
2804 iph->version = 4;
2805 iph->ttl = 32;
2806 iph->tos = pkt_dev->tos;
2807 iph->protocol = IPPROTO_UDP; /* UDP */
2808 iph->saddr = pkt_dev->cur_saddr;
2809 iph->daddr = pkt_dev->cur_daddr;
2810 iph->id = htons(pkt_dev->ip_id);
2812 iph->frag_off = 0;
2814 iph->tot_len = htons(iplen);
2815 ip_send_check(iph);
2827 udp4_hwcsum(skb, iph->saddr, iph->daddr);
2832 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr,
2854 struct ipv6hdr *iph;
2910 iph = skb_put(skb, sizeof(struct ipv6hdr));
2936 *(__be32 *) iph = htonl(0x60000000); /* Version + flow */
2940 *(__be32 *)iph |= htonl(0x60000000 | (pkt_dev->traffic_class << 20));
2943 iph->hop_limit = 32;
2945 iph->payload_len = htons(udplen);
2946 iph->nexthdr = IPPROTO_UDP;
2948 iph->daddr = pkt_dev->cur_in6_daddr;
2949 iph->saddr = pkt_dev->cur_in6_saddr;
2963 udph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, udplen, IPPROTO_UDP, 0);
2968 udph->check = csum_ipv6_magic(&iph->saddr, &iph->daddr, udplen, IPPROTO_UDP, csum);