1nozzle_add_ip(3) Kronosnet Programmer's Manual nozzle_add_ip(3)
2
3
4
6 nozzle_add_ip - equivalent of ip addr or ifconfig <ipaddress/prefix>
7
9 #include <libknet.h>
10
11 int nozzle_add_ip(
12 nozzle_t nozzle,
13 const char *ipaddr,
14 const char *prefix
15 );
16
18 nozzle_add_ip
19
20 nozzle - pointer to the nozzle struct
21
22 ipaddr - string containing either an IPv4 or an IPv6 address. Please
23 note that Linux will automatically remove any IPv6 addresses from an
24 interface with MTU < 1280. libnozzle will cache those IPs and re-
25 instate them when MTU is > 1280. MTU must be set via nozzle_set_mtu for
26 IPv6 to be re-instated.
27
28 prefix - 24, 64 or any valid network prefix for the requested address.
29
31 0 on success -1 on error and errno is set.
32
34 nozzle_close(3), nozzle_set_mtu(3), nozzle_get_fd(3),
35 nozzle_get_mtu(3), nozzle_reset_mtu(3), nozzle_set_up(3),
36 nozzle_get_ips(3), nozzle_set_down(3), nozzle_reset_mac(3),
37 nozzle_get_handle_by_name(3), nozzle_run_updown(3), nozzle_open(3),
38 nozzle_del_ip(3), nozzle_get_mac(3), nozzle_set_mac(3),
39 nozzle_get_name_by_handle(3),
40
42 Copyright (C) 2010-2020 Red Hat, Inc. All rights reserved.
43
44
45
46kronosnet 2020-04-23 nozzle_add_ip(3)