Searched refs:tun (Results 1 – 2 of 2) sorted by relevance
60 int tun = open("/dev/tun", O_RDWR | O_NONBLOCK); in create_interface() local67 if (ioctl(tun, TUNSETIFF, &ifr4)) { in create_interface()86 return tun; in create_interface()89 close(tun); in create_interface()93 static int get_interface_name(char *name, int tun) in get_interface_name() argument96 if (ioctl(tun, TUNGETIFF, &ifr4)) { in get_interface_name()264 int tun = create_interface(mtu); in create() local265 if (tun < 0) { in create()266 throwException(env, tun, "Cannot create interface"); in create()269 return tun; in create()[all …]
1046 ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu)); in establish() local1048 String interfaze = jniGetName(tun.getFd()); in establish()1100 IoUtils.setBlocking(tun.getFileDescriptor(), config.blocking); in establish()1106 IoUtils.closeQuietly(tun); in establish()1117 return tun; in establish()1635 private native String jniGetName(int tun); in jniGetName() argument