Skip to content

Commit

Permalink
Add comments to knet_link and re-arrange
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Dec 18, 2012
1 parent c626dac commit 1702020
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions libknet/internals.h
Expand Up @@ -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
Expand Down

0 comments on commit 1702020

Please sign in to comment.