Home | History | Annotate | Download | only in jni

Lines Matching refs:tun

58     int tun = open("/dev/tun", O_RDWR | O_NONBLOCK);
65 if (ioctl(tun, TUNSETIFF, &ifr4)) {
66 ALOGE("Cannot allocate TUN: %s", strerror(errno));
84 return tun;
87 close(tun);
91 static int get_interface_name(char *name, int tun)
94 if (ioctl(tun, TUNGETIFF, &ifr4)) {
327 int tun = create_interface(mtu);
328 if (tun < 0) {
329 throwException(env, tun, "Cannot create interface");
332 return tun;
335 static jstring getName(JNIEnv *env, jobject thiz, jint tun)
338 if (get_interface_name(name, tun) < 0) {