knet_host_set_policy(3)

knet_host_set_policy3

Set the switching policy for a host's links.

Usage

#include <libknet.h>

int knet_host_set_policy(
    knet_handle_t   knet_h,
    knet_node_id_t  host_id,
    uint8_t         policy
);

Overview

knet_host_set_policy

knet_h - pointer to knet_handle_t

host_id - see knet_host_add(3)

policy - there are currently 3 kind of simple switching policies based on link configuration. KNET_LINK_POLICY_PASSIVE - the active link with the highest priority (highest number) will be used. if one or more active links share the same priority, the one with lowest link_id will be used.

KNET_LINK_POLICY_ACTIVE - all active links will be used simultaneously to send traffic. link priority is ignored.

KNET_LINK_POLICY_RR - round-robin policy, every packet will be send on a different active link.

Return value

knet_host_set_policy 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.