Lines Matching refs:iph
52 if (p->iph.protocol && p->iph.protocol != proto) { in set_tunnel_proto()
57 p->iph.protocol = proto; in set_tunnel_proto()
67 p->iph.version = 4; in parse_args()
68 p->iph.ihl = 5; in parse_args()
72 p->iph.frag_off = htons(IP_DF); in parse_args()
125 p->iph.frag_off = 0; in parse_args()
127 p->iph.frag_off = htons(IP_DF); in parse_args()
131 p->iph.daddr = get_addr32(*argv); in parse_args()
133 p->iph.daddr = htonl(INADDR_ANY); in parse_args()
137 p->iph.saddr = get_addr32(*argv); in parse_args()
139 p->iph.saddr = htonl(INADDR_ANY); in parse_args()
152 p->iph.ttl = uval; in parse_args()
165 p->iph.tos = 0; in parse_args()
167 p->iph.tos = 1; in parse_args()
171 p->iph.tos |= uval; in parse_args()
196 if (p->iph.protocol == 0) { in parse_args()
198 p->iph.protocol = IPPROTO_GRE; in parse_args()
200 p->iph.protocol = IPPROTO_IPIP; in parse_args()
202 p->iph.protocol = IPPROTO_IPV6; in parse_args()
204 p->iph.protocol = IPPROTO_IPV6; in parse_args()
207 p->iph.protocol = IPPROTO_IPIP; in parse_args()
214 (p->iph.protocol != IPPROTO_GRE)) { in parse_args()
228 if (p->i_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) { in parse_args()
229 p->i_key = p->iph.daddr; in parse_args()
232 if (p->o_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) { in parse_args()
233 p->o_key = p->iph.daddr; in parse_args()
236 if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) { in parse_args()
248 switch (p->iph.protocol) { in tnl_defname()
270 if (p.iph.ttl && p.iph.frag_off == 0) { in do_add()
306 tnl_strproto(p->iph.protocol), in print_tunnel()
307 p->iph.daddr ? format_host_r(AF_INET, 4, &p->iph.daddr, s1, sizeof(s1)) : "any", in print_tunnel()
308 p->iph.saddr ? rt_addr_n2a_r(AF_INET, 4, &p->iph.saddr, s2, sizeof(s2)) : "any"); in print_tunnel()
310 if (p->iph.protocol == IPPROTO_IPV6 && (p->i_flags & SIT_ISATAP)) { in print_tunnel()
334 if (p->iph.ttl) in print_tunnel()
335 printf(" ttl %d", p->iph.ttl); in print_tunnel()
339 if (p->iph.tos) { in print_tunnel()
342 if (p->iph.tos & 1) in print_tunnel()
344 if (p->iph.tos & ~1) in print_tunnel()
345 printf("%c%s ", p->iph.tos & 1 ? '/' : ' ', in print_tunnel()
346 rtnl_dsfield_n2a(p->iph.tos & ~1, b1, sizeof(b1))); in print_tunnel()
349 if (!(p->iph.frag_off & htons(IP_DF))) in print_tunnel()
352 if (p->iph.protocol == IPPROTO_IPV6 && !tnl_ioctl_get_6rd(p->name, &ip6rd) && ip6rd.prefixlen) { in print_tunnel()
429 (p->iph.daddr && p1.iph.daddr != p->iph.daddr) || in do_tunnels_list()
430 (p->iph.saddr && p1.iph.saddr != p->iph.saddr) || in do_tunnels_list()