Home | History | Annotate | Download | only in ip

Lines Matching refs:iph

59 	p->iph.version = 4;
60 p->iph.ihl = 5;
64 p->iph.frag_off = htons(IP_DF);
71 if (p->iph.protocol && p->iph.protocol != IPPROTO_IPIP) {
75 p->iph.protocol = IPPROTO_IPIP;
78 if (p->iph.protocol && p->iph.protocol != IPPROTO_GRE) {
82 p->iph.protocol = IPPROTO_GRE;
85 if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) {
89 p->iph.protocol = IPPROTO_IPV6;
91 if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) {
95 p->iph.protocol = IPPROTO_IPV6;
156 p->iph.frag_off = 0;
158 p->iph.frag_off = htons(IP_DF);
162 p->iph.daddr = get_addr32(*argv);
166 p->iph.saddr = get_addr32(*argv);
179 p->iph.ttl = uval;
189 p->iph.tos = uval;
191 p->iph.tos = 1;
213 if (p->iph.protocol == 0) {
215 p->iph.protocol = IPPROTO_GRE;
217 p->iph.protocol = IPPROTO_IPIP;
219 p->iph.protocol = IPPROTO_IPV6;
221 p->iph.protocol = IPPROTO_IPV6;
226 if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) {
239 if (p->i_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) {
240 p->i_key = p->iph.daddr;
243 if (p->o_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) {
244 p->o_key = p->iph.daddr;
247 if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) {
265 if (p.iph.ttl && p.iph.frag_off == 0) {
270 switch (p.iph.protocol) {
291 switch (p.iph.protocol) {
321 tnl_strproto(p->iph.protocol),
322 p->iph.daddr ? format_host(AF_INET, 4, &p->iph.daddr, s1, sizeof(s1)) : "any",
323 p->iph.saddr ? rt_addr_n2a(AF_INET, 4, &p->iph.saddr, s2, sizeof(s2)) : "any");
350 if (p->iph.ttl)
351 printf(" ttl %d ", p->iph.ttl);
355 if (p->iph.tos) {
358 if (p->iph.tos&1)
360 if (p->iph.tos&~1)
361 printf("%c%s ", p->iph.tos&1 ? '/' : ' ',
362 rtnl_dsfield_n2a(p->iph.tos&~1, b1, sizeof(b1)));
365 if (!(p->iph.frag_off&htons(IP_DF)))
368 if (p->iph.protocol == IPPROTO_IPV6 && !tnl_ioctl_get_6rd(p->name, &ip6rd) && ip6rd.prefixlen) {
447 (p->iph.daddr && p1.iph.daddr != p->iph.daddr) ||
448 (p->iph.saddr && p1.iph.saddr != p->iph.saddr) ||
475 switch (p.iph.protocol) {