summaryrefslogtreecommitdiff
path: root/src/wy_singleflow_keepalive.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wy_singleflow_keepalive.h')
-rw-r--r--src/wy_singleflow_keepalive.h53
1 files changed, 53 insertions, 0 deletions
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 <event.h>
+
+#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
+