• Home
  • Raw
  • Download

Lines Matching refs:iptnl

2396   struct ip_tunnel_parm iptnl;  in read_tunnel()  local
2409 if ((ret = tnl_ioctl(iface, SIOCGIFHWADDR, &iptnl)) < 0) { in read_tunnel()
2416 memset(&iptnl, 0, sizeof(iptnl)); in read_tunnel()
2417 if (tnl_ioctl(iface, SIOCGETTUNNEL, &iptnl) < 0) continue; in read_tunnel()
2418 if ((ptnl->link && iptnl.link != ptnl->link) || (*ptnl->name && in read_tunnel()
2419 strcmp(iptnl.name, ptnl->name)) || (ptnl->iph.daddr && in read_tunnel()
2420 iptnl.iph.daddr != ptnl->iph.daddr) || (ptnl->iph.saddr && in read_tunnel()
2421 iptnl.iph.saddr != ptnl->iph.saddr) || (ptnl->i_key && in read_tunnel()
2422 iptnl.i_key != ptnl->i_key)) continue; in read_tunnel()
2423 display_tunnel(&iptnl); in read_tunnel()
2609 struct ip_tunnel_parm iptnl; in tunnellist() local
2612 memset(&iptnl, 0, sizeof(iptnl)); in tunnellist()
2613 parse_iptunnel_args(&iptnl, argv, 3); in tunnellist()
2615 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnellist()
2616 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "tunl0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2617 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnellist()
2618 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "gre0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2619 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnellist()
2620 ret = tnl_ioctl(*iptnl.name ? iptnl.name : "sit0", SIOCGETTUNNEL, &iptnl); in tunnellist()
2621 else return read_tunnel(&iptnl); in tunnellist()
2626 } else return display_tunnel(&iptnl); in tunnellist()
2632 struct ip_tunnel_parm iptnl; in tunnelupdate() local
2643 memset(&iptnl, 0, sizeof(iptnl)); in tunnelupdate()
2644 parse_iptunnel_args(&iptnl, argv, idx); in tunnelupdate()
2645 if (idx != 2 && iptnl.iph.ttl && !(iptnl.iph.frag_off)) in tunnelupdate()
2647 if (iptnl.iph.protocol == IPPROTO_IPIP) in tunnelupdate()
2648 return (tnl_ioctl("tunl0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2649 else if (iptnl.iph.protocol == IPPROTO_GRE) in tunnelupdate()
2650 return (tnl_ioctl("gre0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2651 else if (iptnl.iph.protocol == IPPROTO_IPV6) in tunnelupdate()
2652 return (tnl_ioctl("sit0", rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()
2655 return (tnl_ioctl(iptnl.name, rtype, &iptnl) < 0) ? 1 : 0; in tunnelupdate()