nozzle_run_updown(3)

nozzle_run_updown3

Execute updown commands associated with a nozzle device.

Usage

#include <libnozzle.h>

int nozzle_run_updown(
    const nozzle_t  nozzle,
    uint8_t         action,
    char          **exec_string
);

Overview

nozzle_run_updown

nozzle - pointer to the nozzle struct

action - pre-up.d / up.d / down.d / post-down.d (see defines above)

exec_string - pointers to string to record executing action stdout/stderr. The string is malloc'ed, the caller needs to free the buffer. If the script generates no output this string might be NULL.

It is the application responsibility to call helper scripts before or after creating/destroying interfaces or IP addresses.

Return value

0 on success -1 on error and errno is set (sanity checks and internal calls. -2 on error from executing the shell scripts, and no 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.