knet_link_set_config(3)

knet_link_set_config3

Configure the link to a host.

Usage

#include <libknet.h>

int knet_link_set_config(
    knet_handle_t              knet_h,
    knet_node_id_t             host_id,
    uint8_t                    link_id,
    uint8_t                    transport,
    struct sockaddr_storage   *src_addr,
    struct sockaddr_storage   *dst_addr,
    uint64_t                   flags
);

Overview

knet_link_set_config

knet_h - pointer to knet_handle_t

host_id - see knet_host_add(3)

link_id - see knet_link_set_config(3)

transport - one of the KNET_TRANSPORT_xxx constants

src_addr - sockaddr_storage that can be either IPv4 or IPv6

dst_addr - sockaddr_storage that can be either IPv4 or IPv6 this can be null if we don't know the incoming IP address/port and the link will remain quiet till the node on the other end will initiate a connection

flags - KNET_LINK_FLAG_*

Return value

knet_link_set_config returns 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.