1nozzle_open(3)           Kronosnet Programmer's Manual          nozzle_open(3)
2
3
4

NAME

6       nozzle_open - create a new tap device on the system.
7

SYNOPSIS

9       #include <libknet.h>
10
11       nozzle_t nozzle_open(
12           char         *devname,
13           size_t        devname_size,
14           const char   *updownpath
15       );
16

DESCRIPTION

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

RETURN VALUE

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

SEE ALSO

42       nozzle_close(3), nozzle_set_mtu(3), nozzle_get_fd(3),
43       nozzle_get_mtu(3), nozzle_reset_mtu(3), nozzle_set_up(3),
44       nozzle_get_ips(3), nozzle_set_down(3), nozzle_reset_mac(3),
45       nozzle_get_handle_by_name(3), nozzle_run_updown(3), nozzle_del_ip(3),
46       nozzle_get_mac(3), nozzle_set_mac(3), nozzle_get_name_by_handle(3),
47       nozzle_add_ip(3)
48
50       Copyright (C) 2010-2019 Red Hat, Inc. All rights reserved.
51
52
53
54kronosnet                         2019-10-16                    nozzle_open(3)
Impressum