Home
last modified time | relevance | path

Searched refs:tun_fd (Results 1 – 25 of 38) sorted by relevance

12

/dports/security/openconnect/openconnect-8.10/
H A Dtun.c133 int tun_fd = -1; in os_setup_tun() local
146 close(tun_fd); in os_setup_tun()
152 close(tun_fd); in os_setup_tun()
161 close(tun_fd); in os_setup_tun()
176 return tun_fd; in os_setup_tun()
260 close(tun_fd); in os_setup_tun()
269 return tun_fd; in os_setup_tun()
371 close(tun_fd); in os_setup_tun()
378 tun_fd = -1; in os_setup_tun()
446 return tun_fd; in os_setup_tun()
[all …]
H A Dtun-win32.c416 int openconnect_setup_tun_fd(struct openconnect_info *vpninfo, intptr_t tun_fd) in openconnect_setup_tun_fd() argument
425 if (!DeviceIoControl((HANDLE)tun_fd, TAP_IOCTL_SET_MEDIA_STATUS, in openconnect_setup_tun_fd()
436 vpninfo->tun_fh = (HANDLE)tun_fd; in openconnect_setup_tun_fd()
H A Dopenconnect.h590 int openconnect_setup_tun_fd(struct openconnect_info *vpninfo, intptr_t tun_fd);
593 int openconnect_setup_tun_fd(struct openconnect_info *vpninfo, int tun_fd);
H A Dlibrary.c70 vpninfo->tun_fd = -1; in openconnect_vpninfo_new()
974 intptr_t tun_fd; in openconnect_setup_tun_device() local
986 tun_fd = os_setup_tun(vpninfo); in openconnect_setup_tun_device()
987 if (tun_fd < 0) in openconnect_setup_tun_device()
988 return tun_fd; in openconnect_setup_tun_device()
1000 return openconnect_setup_tun_fd(vpninfo, tun_fd); in openconnect_setup_tun_device()
/dports/net/iodine/iodine-0.7.0/src/
H A Dtun.c75 int tun_fd; in open_tun() local
100 fd_set_close_on_exec(tun_fd); in open_tun()
101 return tun_fd; in open_tun()
116 return tun_fd; in open_tun()
322 int tun_fd; in open_tun() local
336 fd_set_close_on_exec(tun_fd); in open_tun()
337 return tun_fd; in open_tun()
346 return tun_fd; in open_tun()
362 close_tun(int tun_fd) in close_tun() argument
364 if (tun_fd >= 0) in close_tun()
[all …]
H A Diodine.c136 int tun_fd; in main() local
346 if ((tun_fd = open_tun(device)) == -1) { in main()
400 client_tunnel(tun_fd, dns_fd); in main()
404 close_tun(tun_fd); in main()
H A Diodined.c618 tunnel_tun(int tun_fd, int dns_fd) in tunnel_tun() argument
1752 FD_SET(tun_fd, &fds); in tunnel()
1753 maxfd = MAX(tun_fd, maxfd); in tunnel()
1779 if (FD_ISSET(tun_fd, &fds)) { in tunnel()
1780 tunnel_tun(tun_fd, dns_fd); in tunnel()
1783 tunnel_dns(tun_fd, dns_fd, bind_fd); in tunnel()
1823 write_tun(tun_fd, out, outlen); in handle_full_packet()
1923 handle_full_packet(tun_fd, dns_fd, userid); in handle_raw_data()
2271 int tun_fd; in main() local
2521 if ((tun_fd = open_tun(device)) == -1) { in main()
[all …]
H A Dclient.c659 write_tun(tun_fd, buf, datalen); in read_dns_withq()
751 tunnel_tun(int tun_fd, int dns_fd) in tunnel_tun() argument
759 if ((read = read_tun(tun_fd, in, sizeof(in))) <= 0) in tunnel_tun()
791 tunnel_dns(int tun_fd, int dns_fd) in tunnel_dns() argument
807 read = read_dns_withq(dns_fd, tun_fd, buf, sizeof(buf), &q); in tunnel_dns()
1013 write_tun(tun_fd, buf, datalen); in tunnel_dns()
1096 client_tunnel(int tun_fd, int dns_fd) in client_tunnel() argument
1130 FD_SET(tun_fd, &fds); in client_tunnel()
1176 if (FD_ISSET(tun_fd, &fds)) { in client_tunnel()
1177 if (tunnel_tun(tun_fd, dns_fd) <= 0) in client_tunnel()
[all …]
H A Dclient.h38 int client_tunnel(int tun_fd, int dns_fd);
/dports/devel/libtuntap/libtuntap-libtuntap-0.4/
H A Dtuntap-unix.c54 if (dev->tun_fd != -1) { in tuntap_start()
74 dev->tun_fd = fd; in tuntap_start()
90 (void)close(dev->tun_fd); in tuntap_release()
223 if (dev->tun_fd == -1) { in tuntap_get_mtu()
243 if (dev->tun_fd == -1) { in tuntap_set_mtu()
264 if (dev->tun_fd == -1) { in tuntap_read()
269 n = read(dev->tun_fd, buf, size); in tuntap_read()
282 if (dev->tun_fd == -1) { in tuntap_write()
287 n = write(dev->tun_fd, buf, size); in tuntap_write()
300 if (ioctl(dev->tun_fd, FIONREAD, &n) == -1) { in tuntap_get_readable()
[all …]
H A Dtuntap-windows.c152 HANDLE tun_fd; in tuntap_start() local
157 if (dev->tun_fd != TUNFD_INVALID_VALUE) { in tuntap_start()
177tun_fd = CreateFile(buf, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM|… in tuntap_start()
178 if (tun_fd == TUNFD_INVALID_VALUE) { in tuntap_start()
185 dev->tun_fd = tun_fd; in tuntap_start()
191 (void)CloseHandle(dev->tun_fd); in tuntap_release()
200 …if (DeviceIoControl(dev->tun_fd, TAP_IOCTL_GET_MAC, &hwaddr, sizeof(hwaddr), &hwaddr, sizeof(hwadd… in tuntap_get_hwaddr()
225 …if (DeviceIoControl(dev->tun_fd, TAP_IOCTL_SET_MEDIA_STATUS, &flag, sizeof(flag), &flag, sizeof(fl… in tuntap_sys_set_updown()
260 …if (DeviceIoControl(dev->tun_fd, TAP_IOCTL_GET_MTU, &mtu, sizeof(mtu), &mtu, sizeof(mtu), &len, NU… in tuntap_get_mtu()
312 if (ReadFile(dev->tun_fd, buf, (DWORD)size, &len, NULL) == 0) { in tuntap_read()
[all …]
H A Dtuntap.c47 dev->tun_fd = TUNFD_INVALID_VALUE; in tuntap_init()
79 if (dev->tun_fd == TUNFD_INVALID_VALUE) { in tuntap_set_ip()
126 return dev->tun_fd; in tuntap_get_fd()
H A Dprivate.h91 t_tun tun_fd; member
/dports/net/hanstunnel/hans-1.0/src/
H A Dtun_dev_svr4.c72 int tun_fd, if_fd, muxid, ppa = -1; in tun_open() local
87 if( (tun_fd = open("/dev/tun", O_RDWR, 0)) < 0){ in tun_open()
93 if( (ppa = ioctl(tun_fd, TUNNEWPPA, ppa)) < 0){ in tun_open()
130 return tun_fd; in tun_open()
/dports/net/vtun/vtun-3.0.4/svr4/
H A Dtun_dev.c72 int tun_fd, if_fd, muxid, ppa = -1; in tun_open() local
87 if( (tun_fd = open("/dev/tun", O_RDWR, 0)) < 0){ in tun_open()
93 if( (ppa = ioctl(tun_fd, TUNNEWPPA, ppa)) < 0){ in tun_open()
130 return tun_fd; in tun_open()
/dports/security/softether-devel/v4.36-9754/src/Cedar/
H A DVLanUnix.c564 int tun_fd; in UnixCreateTapDeviceEx() local
567 tun_fd = open(tap_name, O_RDWR); in UnixCreateTapDeviceEx()
568 if (tun_fd == -1) in UnixCreateTapDeviceEx()
579 close(tun_fd); in UnixCreateTapDeviceEx()
585 ppa = ioctl(tun_fd, TUNNEWPPA, ppa); in UnixCreateTapDeviceEx()
589 close(tun_fd); in UnixCreateTapDeviceEx()
598 close(tun_fd); in UnixCreateTapDeviceEx()
607 close(tun_fd); in UnixCreateTapDeviceEx()
616 close(tun_fd); in UnixCreateTapDeviceEx()
622 close(tun_fd); in UnixCreateTapDeviceEx()
/dports/security/softether/v4.38-9760/src/Cedar/
H A DVLanUnix.c564 int tun_fd; in UnixCreateTapDeviceEx() local
567 tun_fd = open(tap_name, O_RDWR); in UnixCreateTapDeviceEx()
568 if (tun_fd == -1) in UnixCreateTapDeviceEx()
579 close(tun_fd); in UnixCreateTapDeviceEx()
585 ppa = ioctl(tun_fd, TUNNEWPPA, ppa); in UnixCreateTapDeviceEx()
589 close(tun_fd); in UnixCreateTapDeviceEx()
598 close(tun_fd); in UnixCreateTapDeviceEx()
607 close(tun_fd); in UnixCreateTapDeviceEx()
616 close(tun_fd); in UnixCreateTapDeviceEx()
622 close(tun_fd); in UnixCreateTapDeviceEx()
/dports/security/softether5/SoftEtherVPN-5.02.5180/src/Cedar/
H A DVLanUnix.c490 int tun_fd; in UnixCreateTapDeviceEx() local
493 tun_fd = open(tap_name, O_RDWR); in UnixCreateTapDeviceEx()
494 if (tun_fd == -1) in UnixCreateTapDeviceEx()
505 close(tun_fd); in UnixCreateTapDeviceEx()
511 ppa = ioctl(tun_fd, TUNNEWPPA, ppa); in UnixCreateTapDeviceEx()
515 close(tun_fd); in UnixCreateTapDeviceEx()
524 close(tun_fd); in UnixCreateTapDeviceEx()
533 close(tun_fd); in UnixCreateTapDeviceEx()
542 close(tun_fd); in UnixCreateTapDeviceEx()
548 close(tun_fd); in UnixCreateTapDeviceEx()
/dports/security/dsvpn/dsvpn-0.1.4/src/
H A Dvpn.c32 int tun_fd; member
387 len = tun_read(context->tun_fd, tun_buf.data, sizeof tun_buf.data); in event_loop()
448 if (tun_write(context->tun_fd, client_buf->data, len) != len) { in event_loop()
469 (struct pollfd){ .fd = context->tun_fd, .events = POLLIN, .revents = 0 }; in doit()
595 context.tun_fd = tun_create(context.if_name, context.wanted_if_name); in main()
596 if (context.tun_fd == -1) { in main()
/dports/net/axa/axa-2.2.0/sratool/
H A Dio.c148 if (client.io.tun_fd >= 0) { in io_wait()
149 pollfds[nfds].fd = client.io.tun_fd; in io_wait()
/dports/emulators/dps8m/dps8m-572f79bb4f0f84a8b16c3892c894c2b9ed64b458/src/dps8/
H A Dfnpuv.c991 if (linep->tun_fd <= 0) in fnpuv_dial_out()
994 linep->tun_fd = tun_alloc (a_name); in fnpuv_dial_out()
995 if (linep->tun_fd < 0) in fnpuv_dial_out()
997 …sim_printf ("[FNP emulation: dialout TUN tun_alloc returned %d errno %d]\n", linep->tun_fd, errno); in fnpuv_dial_out()
1000 int flags = fcntl (linep->tun_fd, F_GETFL, 0); in fnpuv_dial_out()
1007 int ret = fcntl (linep->tun_fd, F_SETFL, flags); in fnpuv_dial_out()
1241 ssize_t nread = read (linep->tun_fd, buffer, sizeof (buffer)); in fnoTUNProcessLine()
/dports/security/vpnc/vpnc-0.5.3/
H A Dsysdep.c115 int tun_fd, if_fd, ppa = -1; in tun_open() local
131 if ((tun_fd = open(((mode == IF_MODE_TUN) ? "/dev/tun" : "/dev/tap"), O_RDWR, 0)) < 0) { in tun_open()
137 if ((ppa = ioctl(tun_fd, TUNNEWPPA, ppa)) < 0) { in tun_open()
174 return tun_fd; in tun_open()
H A Dtunip.c274 sent = tun_write(s->tun_fd, start, len); in tun_send_ip()
639 tun_write(s->tun_fd, frame, frame_size); in process_arp()
681 pack = tun_read(s->tun_fd, start, size); in process_tun()
802 FD_SET(s->tun_fd, &rfds); in vpnc_main_loop()
803 nfds = MAX(nfds, s->tun_fd +1); in vpnc_main_loop()
896 if (FD_ISSET(s->tun_fd, &refds)) { in vpnc_main_loop()
1061 tun_claim(s->tun_fd); in vpnc_doit()
H A Dtunip.h64 int tun_fd; /* fd to host via tun/tap */ member
/dports/net/axa/axa-2.2.0/axalib/
H A Dwire.c1701 io->tun_fd = -1; in axa_io_init()
1764 if (io->tun_fd >= 0) in axa_io_close()
1765 ck_close(io->tun_fd, "io->tun_fd"); in axa_io_close()
1990 if (tun && io->tun_fd >= 0) { in axa_io_wait()
1991 pollfds[nfds].fd = io->tun_fd; in axa_io_wait()
2313 if (i > 0 && io->tun_fd >= 0) { in axa_io_tunerr()
2314 i = read(io->tun_fd, in axa_io_tunerr()
2332 close(io->tun_fd); in axa_io_tunerr()
2333 io->tun_fd = -1; in axa_io_tunerr()
2336 close(io->tun_fd); in axa_io_tunerr()
[all …]

12