Lines Matching refs:iptnl
2400 struct ip_tunnel_parm iptnl; in read_tunnel() local
2413 if ((ret = tnl_ioctl(iface, SIOCGIFHWADDR, &iptnl)) < 0) { in read_tunnel()
2420 memset(&iptnl, 0, sizeof(iptnl)); in read_tunnel()
2421 if (tnl_ioctl(iface, SIOCGETTUNNEL, &iptnl) < 0) continue; in read_tunnel()
2422 if ((ptnl->link && iptnl.link != ptnl->link) || (*ptnl->name && in read_tunnel()
2423 strcmp(iptnl.name, ptnl->name)) || (ptnl->iph.daddr && in read_tunnel()
2424 iptnl.iph.daddr != ptnl->iph.daddr) || (ptnl->iph.saddr && in read_tunnel()
2425 iptnl.iph.saddr != ptnl->iph.saddr) || (ptnl->i_key && in read_tunnel()
2426 iptnl.i_key != ptnl->i_key)) continue; in read_tunnel()
2427 display_tunnel(&iptnl); in read_tunnel()
2613 struct ip_tunnel_parm iptnl; in tunnellist() local
2616 memset(&iptnl, 0, sizeof(iptnl)); in tunnellist()
2617 parse_iptunnel_args(&iptnl, argv, 3); in tunnellist()
2619 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnellist()
2620 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "tunl0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2621 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnellist()
2622 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "gre0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2623 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnellist()
2624 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "sit0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2625 else return read_tunnel(&iptnl); in tunnellist()
2630 } else return display_tunnel(&iptnl); in tunnellist()
2636 struct ip_tunnel_parm iptnl; in tunnelupdate() local
2647 memset(&iptnl, 0, sizeof(iptnl)); in tunnelupdate()
2648 parse_iptunnel_args(&iptnl, argv, idx); in tunnelupdate()
2649 if (idx != 2 && iptnl.iph.ttl && !(iptnl.iph.frag_off)) in tunnelupdate()
2651 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnelupdate()
2652 return (tnl_ioctl("tunl0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2653 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnelupdate()
2654 return (tnl_ioctl("gre0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2655 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnelupdate()
2656 return (tnl_ioctl("sit0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2659 return (tnl_ioctl(iptnl.name, rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()