HP-UX Reference (11i v1 05/09) - 4 File Formats (vol 8)

t
tun(4) tun(4)
TUIOGNAME Get the interface name.
FIONBIO Set or clear non-blocking mode for I/O operations.
EXAMPLES
#include <net/tun.h>
int tun_fd = -1, len;
char *packet;
tun_fd = open("/dev/tun0", O_RDWR);
ioctl(tun_fd, TUIOSNAME, "du");
len = read(tun_fd, packet, size);
write(tun_fd, packet, len);
ERRORS
If a packet is delivered to the interface for an address family other than
AF_INET, EAFNOSUPPORT will
be returned.
FILES
/dev/tun0 through /dev/tunM-1 ‘inbound’ tunnel devices
/dev/tunM through /dev/tun2*M-1 ‘outbound’ tunnel devices
AUTHOR
tun was developed by the Progressive Systems.
SEE ALSO
ppp.Auth(4), ppp.Devices(4), ppp.Dialers(4), ppp.Filter(4), ppp.Keys(4), ppp.Systems(4), pppd(1), RFC 1548,
RFC 1332, RFC 1144, RFC 1055, RFC 877, and (for philosophical comparison only) RFC 1241.
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 4365