The Sequence Toolkit
www.sequence-toolkit.com
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
stk_name_service.h
Go to the documentation of this file.
1 
11 #ifndef STK_NAME_SERVICE
12 #define STK_NAME_SERVICE
13 #include "stk_common.h"
14 #include "stk_sequence.h"
15 #include "netinet/in.h"
16 
21 typedef struct stk_name_service_stct stk_name_service_t;
22 
23 #define STK_MAX_NAME_LEN 96
24 #define STK_MAX_GROUP_NAME_LEN 48
25 #define STK_NAME_MAX_PROTOCOL_LEN 16
31 typedef struct stk_name_ip_stct {
32  struct sockaddr_in sockaddr;
33  char protocol[STK_NAME_MAX_PROTOCOL_LEN];
34  char ipstr[INET_ADDRSTRLEN];
35  char portstr[6];
37 
42 typedef enum stk_name_ft_state_enum {
43  STK_NAME_STANDBY, STK_NAME_ACTIVE
45 
46 #define STK_NAME_MAX_IPS 5
52 typedef struct stk_name_info_stct {
53  char name[STK_MAX_NAME_LEN];
58 
63 typedef enum {
67 
71 typedef void (*stk_name_info_cb_t)(stk_name_info_t *name_info,int name_count,void *server_info,void *app_info,stk_name_info_cb_type cb_type);
72 
73 #define STK_NAME_REQUEST_SEQUENCE_NAME "name request"
74 #define STK_NAME_REQUEST_SEQUENCE_ID 0x9a3e07e9
76 #define STK_NS_SEQ_NAME 1
77 #define STK_NS_SEQ_CONNECT_IPV4 2
78 #define STK_NS_SEQ_GROUP_NAME 3
79 #define STK_NS_SEQ_LINGER 4
80 #define STK_NS_SEQ_REQUEST_ID 5
81 #define STK_NS_SEQ_PROTOCOL 6
82 #define STK_NS_SEQ_FT_STATE 7
83 #define STK_NS_SEQ_ID 8
85 /* Well known Meta Data IDs and identifiers */
86 #define STK_MD_HTTPD_TCP_ID 0x1000
87 #define STK_MD_HTTPD_UDP_ID 0x1001
88 #define STK_MD_HTTPD_MCAST_ID 0x1002
89 #define STK_HTTPD_DF_META_IDS "monitor"
91 /* Recommended Meta Data IDs */
92 #define STK_MD_IPV4 0x8000
93 #define STK_MD_IPV6 0x8001
94 #define STK_MD_Port 0x8002
95 #define STK_MD_DATA_FLOW_TYPE 0x8003
97 #define STK_MD_SEQUENCE_ID 0x8100
98 #define STK_MD_DATA_FLOW_ID 0x8101
99 #define STK_MD_SERVICE_ID 0x8102
100 #define STK_MD_SERVICE_GROUP_ID 0x8103
102 #endif