nozzle_get_ips(3)

nozzle_get_ips3

Retrieve the list of all configured ips for a given interface

Usage

#include <libnozzle.h>

int nozzle_get_ips(
    const nozzle_t       nozzle,
    struct nozzle_ip   **nozzle_ip
);

Overview

nozzle_get_ips

nozzle - pointer to the nozzle struct

nozzle_ip - pointer to the head of a list of nozzle_ip structs. The last IP will have next = NULL. nozzle_ip can be NULL if there are no IP addresses associated with this nozzle device. DO NOT free those structs as they are used internally for IP address tracking.

Structures

Info about an IP address on a nozzle interface as returned from nozzle_get_ips 
struct nozzle_ip {
    char     ipaddr[IPADDR_CHAR_MAX+1];  /* The IP address */
    char     prefix[PREFIX_CHAR_MAX+1];  /* Prefix - eg "24" */
    int      domain;                     /* AF_INET or AF_INET6 */
    struct   next;                       /* Pointer to next struct or NULL */
};

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.