]> git.proxmox.com Git - mirror_kronosnet.git/blob - libknet/links.h
e14958deef9ad9a2d3fc47cc98e147fdd7e5086c
[mirror_kronosnet.git] / libknet / links.h
1 /*
2 * Copyright (C) 2012-2019 Red Hat, Inc. All rights reserved.
3 *
4 * Authors: Fabio M. Di Nitto <fabbione@kronosnet.org>
5 * Federico Simoncelli <fsimon@kronosnet.org>
6 *
7 * This software licensed under LGPL-2.0+
8 */
9
10 #ifndef __KNET_LINK_H__
11 #define __KNET_LINK_H__
12
13 #include "internals.h"
14
15 #define KNET_LINK_STATIC 0 /* link has static ip on both ends */
16 #define KNET_LINK_DYNIP 1 /* link has dynamic destination ip */
17
18 /*
19 * number of iterations to reduce pong_timeout_adj
20 * from configured(pong_timeout * KNET_LINK_PONG_TIMEOUT_BACKOFF
21 * to pong_timeout
22 */
23 #define KNET_LINK_PONG_TIMEOUT_BACKOFF 10
24
25 /*
26 * when adjusting link pong_timeout for latency,
27 * multiply the max recorded latency by this number.
28 * Yes it's a bit of magic, fairy dust and unicorn farts
29 * mixed together.
30 */
31 #define KNET_LINK_PONG_TIMEOUT_LAT_MUL 2
32
33 int _link_updown(knet_handle_t knet_h, knet_node_id_t node_id, uint8_t link_id,
34 unsigned int enabled, unsigned int connected);
35
36 void _link_clear_stats(knet_handle_t knet_h);
37
38 #endif