From 31f55f0b88d4af34a8a36497f5e49c69b88b2fbf Mon Sep 17 00:00:00 2001 From: "linuxrc@163.com" Date: Tue, 2 Nov 2021 12:34:05 +0800 Subject: 创建 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wy_singleflow_keepalive.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/wy_singleflow_keepalive.h (limited to 'src/wy_singleflow_keepalive.h') diff --git a/src/wy_singleflow_keepalive.h b/src/wy_singleflow_keepalive.h new file mode 100644 index 0000000..00937a0 --- /dev/null +++ b/src/wy_singleflow_keepalive.h @@ -0,0 +1,53 @@ +#ifndef __WY_SINGLE_FLOW_KEEPALIVE_H__ +#define __WY_SINGLE_FLOW_KEEPALIVE_H__ + +#include + +#include "nirvana_conhash.h" + +struct time_event +{ + struct event timer_event; + struct consistent_hash *conhash; +}; + +struct function_node +{ + char *dst_ip_str; + int32_t udp_sockfd; + int32_t ip_as_bucketid; + int32_t conhash_inserted; + int32_t retry_times; + struct sockaddr_in sinaddr; + + struct event msgevent; + struct event alive_detect_timer; + struct event send_bfd_timer; + + struct judian_as_group *parent; +}; + +struct forward_nodes +{ + char *dst_ip_str; + int32_t udp_sockfd; + int32_t dst_ip; + struct sockaddr_in sinaddr; + struct judian_as_group *parent; +}; + +struct judian_as_group +{ + char groupname[64]; + struct function_node *func_nodes; + struct forward_nodes *fwd_nodes; + int32_t func_nodes_num; + int32_t fwd_nodes_num; + struct consistent_hash *conhash; +}; + + +void *thread_funcnode_keepalive(void *arg); + +#endif + -- cgit v1.2.3