+
+ taptype = 0;
+
+#ifdef HAVE_TUNTAP
+ /* Ok now check if this is an old ethertap or a new tun/tap thingie */
+ memset(&ifr, 0, sizeof(ifr));
+cp
+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+ if (netname)
+ strncpy(ifr.ifr_name, netname, IFNAMSIZ);
+cp
+ if (!ioctl(tap_fd, TUNSETIFF, (void *) &ifr))
+ {
+ syslog(LOG_INFO, _("%s is a new style tun/tap device"), tapfname);
+ taptype = 1;
+ if((cfg = get_config_val(config, tapsubnet)) == NULL)
+ syslog(LOG_INFO, _("tun/tap device will be left unconfigured"));
+ else
+ /* Setup inetaddr/netmask etc */;
+ }
+#endif
+