Home | History | Annotate | Download | only in pending

Lines Matching refs:iph

2348   printf("%s: %s/ip", ptnl->name, ptnl->iph.protocol == IPPROTO_IPIP ? "ip" :
2349 (ptnl->iph.protocol == IPPROTO_GRE ? "gre" :
2350 (ptnl->iph.protocol == IPPROTO_IPV6 ? "ipv6" : "unknown")));
2351 printf(" remote %s local %s ", ptnl->iph.daddr ?
2352 inet_ntop(AF_INET, &ptnl->iph.daddr, rmt_addr, sizeof(rmt_addr)) : "any",
2353 ptnl->iph.saddr ? inet_ntop(AF_INET, &ptnl->iph.saddr, lcl_addr,
2365 if (ptnl->iph.ttl) printf(" ttl %d ", ptnl->iph.ttl);
2368 if (ptnl->iph.tos) {
2370 if (ptnl->iph.tos & 1) printf(" inherit");
2371 if (ptnl->iph.tos & ~1) printf("%c%s ", ptnl->iph.tos & 1 ? '/' : ' ',
2372 namefromRPDB((ptnl->iph.tos & ~1), RPDB_rtdsfield));
2374 if (!(ptnl->iph.frag_off & htons(IP_DF))) printf(" nopmtudisc");
2419 strcmp(iptnl.name, ptnl->name)) || (ptnl->iph.daddr &&
2420 iptnl.iph.daddr != ptnl->iph.daddr) || (ptnl->iph.saddr &&
2421 iptnl.iph.saddr != ptnl->iph.saddr) || (ptnl->i_key &&
2442 ptnl->iph.version = 4; // The value indicates the version of IP (4 or 6)
2443 ptnl->iph.ihl = 5; // Minimum Internet Header Length
2445 ptnl->iph.frag_off = htons(IP_DF);
2462 ptnl->iph.protocol = IPPROTO_IPIP;
2464 ptnl->iph.protocol = IPPROTO_GRE;
2466 ptnl->iph.protocol = IPPROTO_IPV6;
2526 ptnl->iph.frag_off = 0;
2529 ptnl->iph.frag_off = htons(IP_DF);
2536 (idx == 12) ? (ptnl->iph.daddr = addr) : (ptnl->iph.saddr = addr);
2554 ptnl->iph.ttl = atolx_range(*argv, 0, 255);
2569 ptnl->iph.tos = ret;
2570 } else ptnl->iph.tos = tval;
2571 } else ptnl->iph.tos = 1;
2586 if (ptnl->iph.protocol == IPPROTO_IPIP ||
2587 ptnl->iph.protocol == IPPROTO_IPV6) {
2595 if (!ptnl->i_key && IN_MULTICAST(ntohl(ptnl->iph.daddr))) {
2596 ptnl->i_key = ptnl->iph.daddr;
2599 if (!ptnl->o_key && IN_MULTICAST(ntohl(ptnl->iph.daddr))) {
2600 ptnl->o_key = ptnl->iph.daddr;
2603 if (IN_MULTICAST(ntohl(ptnl->iph.daddr)) && !ptnl->iph.saddr)
2615 if (iptnl.iph.protocol == IPPROTO_IPIP)
2617 else if (iptnl.iph.protocol == IPPROTO_GRE)
2619 else if (iptnl.iph.protocol == IPPROTO_IPV6)
2645 if (idx != 2 && iptnl.iph.ttl && !(iptnl.iph.frag_off))
2647 if (iptnl.iph.protocol == IPPROTO_IPIP)
2649 else if (iptnl.iph.protocol == IPPROTO_GRE)
2651 else if (iptnl.iph.protocol == IPPROTO_IPV6)