nozzle_add_ip(3)

nozzle_add_ip3

Equivalent of ip addr or ifconfig <ipaddress/prefix>

Usage

#include <libnozzle.h>

int nozzle_add_ip(
    nozzle_t      nozzle,
    const char   *ipaddr,
    const char   *prefix
);

Overview

nozzle_add_ip

nozzle - pointer to the nozzle struct

ipaddr - string containing either an IPv4 or an IPv6 address. Please note that Linux will automatically remove any IPv6 addresses from an interface with MTU < 1280. libnozzle will cache those IPs and re-instate them when MTU is > 1280. MTU must be set via nozzle_set_mtu for IPv6 to be re-instated.

prefix - 24, 64 or any valid network prefix for the requested address.

Return value

0 on success -1 on error and errno is set.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

From libknet-doc 1.31-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.