71 return devnode &&
strprefix(devnode,
"unix:");
static bool strprefix(const char *str, const char *prefix)
Return true iff str starts with prefix.
void open_tun_afunix(struct options *o, int mtu, struct tuntap *tt, struct env_set *env)
Opens an AF_UNIX based tun device.
ssize_t read_tun_afunix(struct tuntap *tt, uint8_t *buf, int len)
Reads a packet from a AF_UNIX based tun device.
void close_tun_afunix(struct tuntap *tt)
Closes the socket used for the AF_UNIX based device.
ssize_t write_tun_afunix(struct tuntap *tt, uint8_t *buf, int len)
Writes a packet to a AF_UNIX based tun device.
static bool is_tun_afunix(const char *devnode)
Checks whether a –dev-node parameter specifies a AF_UNIX device.