Searched refs:tun (Results 1 - 2 of 2) sorted by relevance

/frameworks/base/services/core/jni/
H A Dcom_android_server_connectivity_Vpn.cpp59 int tun = open("/dev/tun", O_RDWR | O_NONBLOCK); local
66 if (ioctl(tun, TUNSETIFF, &ifr4)) {
85 return tun;
88 close(tun);
92 static int get_interface_name(char *name, int tun) argument
95 if (ioctl(tun, TUNGETIFF, &ifr4)) {
263 int tun = create_interface(mtu); local
264 if (tun < 0) {
265 throwException(env, tun, "Canno
271 getName(JNIEnv *env, jobject thiz, jint tun) argument
[all...]
/frameworks/base/services/core/java/com/android/server/connectivity/
H A DVpn.java513 ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu));
516 String interfaze = jniGetName(tun.getFd());
549 // Remove the old tun's user forwarding rules
550 // The new tun's user rules have already been added so they will take over
558 IoUtils.setBlocking(tun.getFileDescriptor(), config.blocking);
564 IoUtils.closeQuietly(tun);
575 return tun;
828 private native String jniGetName(int tun); argument

Completed in 59 milliseconds