Lines Matching defs:tun
253 int tun;
264 tun = a2tun(sp, NULL);
266 return (*remote == SSH_TUNID_ERR ? *remote : tun);
272 tun = strtonum(s, 0, SSH_TUNID_MAX, &errstr);
276 return (tun);
649 tun_open(int tun, int mode)
652 return (sys_tun_open(tun, mode));
659 if (tun <= SSH_TUNID_MAX) {
660 snprintf(name, sizeof(name), "/dev/tun%d", tun);
662 } else if (tun == SSH_TUNID_ANY) {
663 for (tun = 100; tun >= 0; tun--) {
664 snprintf(name, sizeof(name), "/dev/tun%d", tun);
669 debug("%s: invalid tunnel %u", __func__, tun);
681 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "tun%d", tun);