From 170202076eb9f7e9e260cfe88b07116d0aa24df1 Mon Sep 17 00:00:00 2001 From: "Fabio M. Di Nitto" Date: Tue, 18 Dec 2012 11:17:52 +0100 Subject: [PATCH] Add comments to knet_link and re-arrange Signed-off-by: Fabio M. Di Nitto --- libknet/internals.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libknet/internals.h b/libknet/internals.h index 19c719b71..6cf1e1e03 100644 --- a/libknet/internals.h +++ b/libknet/internals.h @@ -36,21 +36,25 @@ struct knet_listener { struct knet_link { - uint8_t link_id; - int listener_sock; + /* required */ struct sockaddr_storage src_addr; struct sockaddr_storage dst_addr; - unsigned int remoteconnected:1; /* link is enabled for data (peer view) */ - unsigned int donnotremoteupdate:1; /* define source of the update */ + /* configurable */ unsigned int dynamic; /* see KNET_LINK_DYN_ define above */ uint8_t priority; /* higher priority == preferred for A/P */ + unsigned long long ping_interval; /* interval */ + unsigned long long pong_timeout; /* timeout */ + unsigned int latency_fix; /* precision */ + /* status */ + struct knet_link_status status; + /* internals */ + uint8_t link_id; + int listener_sock; + unsigned int remoteconnected:1; /* link is enabled for data (peer view) */ + unsigned int donnotremoteupdate:1; /* define source of the update */ unsigned int host_info_up_sent:1; /* 0 if we need to notify remote that link is up */ unsigned int latency_exp; - unsigned int latency_fix; - unsigned long long ping_interval; - unsigned long long pong_timeout; struct timespec ping_last; - struct knet_link_status status; }; #define KNET_CBUFFER_SIZE 4096