Home
last modified time | relevance | path

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

/frameworks/base/services/core/jni/
Dcom_android_server_connectivity_Vpn.cpp60 int tun = open("/dev/tun", O_RDWR | O_NONBLOCK); in create_interface() local
67 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() argument
96 if (ioctl(tun, TUNGETIFF, &ifr4)) { in get_interface_name()
264 int tun = create_interface(mtu); in create() local
265 if (tun < 0) { in create()
266 throwException(env, tun, "Cannot create interface"); in create()
269 return tun; in create()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java1046 ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu)); in establish() local
1048 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