• Home
  • Raw
  • Download

Lines Matching refs:iph

2454   printf("%s: %s/ip", ptnl->name, ptnl->iph.protocol == IPPROTO_IPIP ? "ip" :  in display_tunnel()
2455 (ptnl->iph.protocol == IPPROTO_GRE ? "gre" : in display_tunnel()
2456 (ptnl->iph.protocol == IPPROTO_IPV6 ? "ipv6" : "unknown"))); in display_tunnel()
2457 printf(" remote %s local %s ", ptnl->iph.daddr ? in display_tunnel()
2458 inet_ntop(AF_INET, &ptnl->iph.daddr, rmt_addr, sizeof(rmt_addr)) : "any", in display_tunnel()
2459 ptnl->iph.saddr ? inet_ntop(AF_INET, &ptnl->iph.saddr, lcl_addr, in display_tunnel()
2471 if (ptnl->iph.ttl) printf(" ttl %d ", ptnl->iph.ttl); in display_tunnel()
2474 if (ptnl->iph.tos) { in display_tunnel()
2476 if (ptnl->iph.tos & 1) printf(" inherit"); in display_tunnel()
2477 if (ptnl->iph.tos & ~1) printf("%c%s ", ptnl->iph.tos & 1 ? '/' : ' ', in display_tunnel()
2478 namefromRPDB((ptnl->iph.tos & ~1), RPDB_rtdsfield)); in display_tunnel()
2480 if (!(ptnl->iph.frag_off & htons(IP_DF))) printf(" nopmtudisc"); in display_tunnel()
2525 strcmp(iptnl.name, ptnl->name)) || (ptnl->iph.daddr && in read_tunnel()
2526 iptnl.iph.daddr != ptnl->iph.daddr) || (ptnl->iph.saddr && in read_tunnel()
2527 iptnl.iph.saddr != ptnl->iph.saddr) || (ptnl->i_key && in read_tunnel()
2548 ptnl->iph.version = 4; // The value indicates the version of IP (4 or 6) in parse_iptunnel_args()
2549 ptnl->iph.ihl = 5; // Minimum Internet Header Length in parse_iptunnel_args()
2551 ptnl->iph.frag_off = htons(IP_DF); in parse_iptunnel_args()
2568 ptnl->iph.protocol = IPPROTO_IPIP; in parse_iptunnel_args()
2570 ptnl->iph.protocol = IPPROTO_GRE; in parse_iptunnel_args()
2572 ptnl->iph.protocol = IPPROTO_IPV6; in parse_iptunnel_args()
2632 ptnl->iph.frag_off = 0; in parse_iptunnel_args()
2635 ptnl->iph.frag_off = htons(IP_DF); in parse_iptunnel_args()
2642 (idx == 12) ? (ptnl->iph.daddr = addr) : (ptnl->iph.saddr = addr); in parse_iptunnel_args()
2660 ptnl->iph.ttl = atolx_range(*argv, 0, 255); in parse_iptunnel_args()
2675 ptnl->iph.tos = ret; in parse_iptunnel_args()
2676 } else ptnl->iph.tos = tval; in parse_iptunnel_args()
2677 } else ptnl->iph.tos = 1; in parse_iptunnel_args()
2692 if (ptnl->iph.protocol == IPPROTO_IPIP || in parse_iptunnel_args()
2693 ptnl->iph.protocol == IPPROTO_IPV6) { in parse_iptunnel_args()
2701 if (!ptnl->i_key && IN_MULTICAST(ntohl(ptnl->iph.daddr))) { in parse_iptunnel_args()
2702 ptnl->i_key = ptnl->iph.daddr; in parse_iptunnel_args()
2705 if (!ptnl->o_key && IN_MULTICAST(ntohl(ptnl->iph.daddr))) { in parse_iptunnel_args()
2706 ptnl->o_key = ptnl->iph.daddr; in parse_iptunnel_args()
2709 if (IN_MULTICAST(ntohl(ptnl->iph.daddr)) && !ptnl->iph.saddr) in parse_iptunnel_args()
2721 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnellist()
2723 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnellist()
2725 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnellist()
2751 if (idx != 2 && iptnl.iph.ttl && !(iptnl.iph.frag_off)) in tunnelupdate()
2753 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnelupdate()
2755 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnelupdate()
2757 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnelupdate()