blob: 00937a06ecca33d5ad69ba3f5e2c7a509ca049a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
|