Lines Matching refs:iph
143 const struct iphdr *iph;
181 iph = (const struct iphdr *)(icmp_hdr(skb) + 1);
183 iph->daddr, iph->saddr, tpi->key);
188 if (t->parms.iph.daddr == 0 ||
189 ipv4_is_multicast(t->parms.iph.daddr))
192 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)
207 const struct iphdr *iph;
215 iph = ip_hdr(skb);
217 iph->saddr, iph->daddr, tpi->key);
275 tnl_params = &tunnel->parms.iph;
301 __gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB));
321 if (p.iph.version != 4 || p.iph.protocol != IPPROTO_GRE ||
322 p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) ||
373 struct iphdr *iph;
376 iph = (struct iphdr *)skb_push(skb, t->hlen + sizeof(*iph));
377 greh = (struct gre_base_hdr *)(iph+1);
381 memcpy(iph, &t->parms.iph, sizeof(struct iphdr));
385 memcpy(&iph->saddr, saddr, 4);
387 memcpy(&iph->daddr, daddr, 4);
388 if (iph->daddr)
389 return t->hlen + sizeof(*iph);
391 return -(t->hlen + sizeof(*iph));
396 const struct iphdr *iph = (const struct iphdr *) skb_mac_header(skb);
397 memcpy(haddr, &iph->saddr, 4);
411 if (ipv4_is_multicast(t->parms.iph.daddr)) {
416 t->parms.iph.daddr,
417 t->parms.iph.saddr,
419 RT_TOS(t->parms.iph.tos),
428 ip_mc_inc_group(__in_dev_get_rtnl(dev), t->parms.iph.daddr);
437 if (ipv4_is_multicast(t->parms.iph.daddr) && t->mlink) {
441 ip_mc_dec_group(in_dev, t->parms.iph.daddr);
479 tunnel->parms.iph.protocol = IPPROTO_GRE;
505 struct iphdr *iph = &tunnel->parms.iph;
509 memcpy(dev->dev_addr, &iph->saddr, 4);
510 memcpy(dev->broadcast, &iph->daddr, 4);
516 if (iph->daddr) {
518 if (ipv4_is_multicast(iph->daddr)) {
519 if (!iph->saddr)
602 parms->iph.protocol = IPPROTO_GRE;
623 parms->iph.saddr = nla_get_be32(data[IFLA_GRE_LOCAL]);
626 parms->iph.daddr = nla_get_be32(data[IFLA_GRE_REMOTE]);
629 parms->iph.ttl = nla_get_u8(data[IFLA_GRE_TTL]);
632 parms->iph.tos = nla_get_u8(data[IFLA_GRE_TOS]);
635 parms->iph.frag_off = htons(IP_DF);
777 nla_put_be32(skb, IFLA_GRE_LOCAL, p->iph.saddr) ||
778 nla_put_be32(skb, IFLA_GRE_REMOTE, p->iph.daddr) ||
779 nla_put_u8(skb, IFLA_GRE_TTL, p->iph.ttl) ||
780 nla_put_u8(skb, IFLA_GRE_TOS, p->iph.tos) ||
782 !!(p->iph.frag_off & htons(IP_DF))))