]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/if_tun.c
xnu-344.tar.gz
[apple/xnu.git] / bsd / net / if_tun.c
index 81eafd18ebce1b1016b62e0d79bf9e116937a10e..8ed3afd27f11d66c491004be2ba2bd2a31025912 100644 (file)
 #include <netinet6/in6_ifattach.h>
 #endif /* INET6 */
 
-#if NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
 #include "bpfilter.h"
 #if NBPFILTER > 0
 #include <net/bpf.h>
@@ -304,6 +299,12 @@ tunifioctl(ifp, cmd, data)
 
        s = splimp();
        switch(cmd) {
+       case SIOCGIFSTATUS:
+               ifs = (struct ifstat *)data;
+               if (tp->tun_pid)
+                       sprintf(ifs->ascii + strlen(ifs->ascii),
+                           "\tOpened by PID %d\n", tp->tun_pid);
+               break;
        case SIOCSIFADDR:
                tuninit(ifp->if_unit);
                TUNDEBUG("%s%d: address set\n",