Lines Matching defs:iph
2695 struct iphdr *iph;
2721 iph = ip_hdr(skb);
2722 iph->tot_len = htons(skb->len - ETH_HLEN);
2723 ip_send_check(iph);
2865 struct iphdr *iph;
2921 iph = skb_put(skb, sizeof(struct iphdr));
2942 iph->ihl = 5;
2943 iph->version = 4;
2944 iph->ttl = 32;
2945 iph->tos = pkt_dev->tos;
2946 iph->protocol = IPPROTO_UDP; /* UDP */
2947 iph->saddr = pkt_dev->cur_saddr;
2948 iph->daddr = pkt_dev->cur_daddr;
2949 iph->id = htons(pkt_dev->ip_id);
2951 iph->frag_off = 0;
2953 iph->tot_len = htons(iplen);
2954 ip_send_check(iph);
2966 udp4_hwcsum(skb, iph->saddr, iph->daddr);
2971 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr,
2993 struct ipv6hdr *iph;
3049 iph = skb_put(skb, sizeof(struct ipv6hdr));
3075 *(__be32 *) iph = htonl(0x60000000); /* Version + flow */
3079 *(__be32 *)iph |= htonl(0x60000000 | (pkt_dev->traffic_class << 20));
3082 iph->hop_limit = 32;
3084 iph->payload_len = htons(udplen);
3085 iph->nexthdr = IPPROTO_UDP;
3087 iph->daddr = pkt_dev->cur_in6_daddr;
3088 iph->saddr = pkt_dev->cur_in6_saddr;
3102 udph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, udplen, IPPROTO_UDP, 0);
3107 udph->check = csum_ipv6_magic(&iph->saddr, &iph->daddr, udplen, IPPROTO_UDP, csum);