logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

nozzle_open - create a new tap device on the system.

Description

nozzle_open devname - pointer to device name of at least size IFNAMSIZ. if the dev strlen is 0, then the system will assign a name automatically. if a string is specified, the system will try to create a device with the specified name. NOTE: on FreeBSD the tap device names can only be tapX where X is a number from 0 to 255. On Linux such limitation does not apply. The name must be unique to the system. If an interface with the same name is already configured on the system, an error will be returned. devname_size - length of the buffer provided in dev (has to be at least IFNAMSIZ). updownpath - nozzle supports the typical filesystem structure to execute actions for: down.d post-down.d pre-up.d up.d in the form of: updownpath/<action>/<interface_name> updownpath specifies where to find those directories on the filesystem and it must be an absolute path.

Name

nozzle_open - create a new tap device on the system.

Return Value

nozzle_open returns a pointer to a nozzle struct on success NULL on error and errno is set.

See Also

nozzle_close(3), nozzle_set_mtu(3), nozzle_get_fd(3), nozzle_get_mtu(3), nozzle_reset_mtu(3), nozzle_set_up(3), nozzle_get_ips(3), nozzle_set_down(3), nozzle_reset_mac(3), nozzle_get_handle_by_name(3), nozzle_run_updown(3), nozzle_del_ip(3), nozzle_get_mac(3), nozzle_set_mac(3), nozzle_get_name_by_handle(3), nozzle_add_ip(3)

Synopsis

#include<libnozzle.h>nozzle_tnozzle_open( char*devname, size_tdevname_size, constchar*updownpath );

See Also