The Sequence Toolkit
www.sequence-toolkit.com
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
stk_data_flow.h
Go to the documentation of this file.
1 
10 #ifndef STK_DATA_FLOW_H
11 #define STK_DATA_FLOW_H
12 #include "stk_env.h"
13 #include "stk_common.h"
14 #include "stk_sequence.h"
15 #include <sys/types.h>
16 #include <sys/socket.h>
17 #include <arpa/inet.h>
18 #include <netinet/in.h>
19 #include <netinet/tcp.h>
20 
25 typedef struct stk_data_flow_stct stk_data_flow_t;
32 
34 typedef stk_data_flow_t *(*stk_create_data_flow_t)(stk_env_t *env,char *name,stk_uint64 id,stk_options_t *options);
38 typedef stk_ret (*stk_data_flow_send_t)(stk_data_flow_t *flow,stk_sequence_t *data_sequence,stk_uint64 flags);
40 typedef stk_sequence_t *(*stk_data_flow_rcv_t)(stk_data_flow_t *df,stk_sequence_t *data_sequence,stk_uint64 flags);
42 typedef stk_ret (*stk_data_flow_identifying_ip_t)(stk_data_flow_t *flow,struct sockaddr *data_flow_id,socklen_t addrlen);
46 typedef char * (*stk_data_flow_protocol_t)(stk_data_flow_t *flow);
47 
53 typedef struct stk_data_flow_module_stct {
62 
63 
76 
77 /* Passed to stk_alloc_data_flow() and returned by stk_get_data_flow_type() */
78 #define STK_TCP_SERVER_FLOW 1
79 #define STK_TCP_CLIENT_FLOW 2
80 #define STK_RAWUDP_LISTENER_FLOW 3
81 #define STK_RAWUDP_CLIENT_FLOW 4
82 #define STK_UDP_LISTENER_FLOW 5
83 #define STK_UDP_CLIENT_FLOW 6
84 #define STK_TCP_ACCEPTED_FLOW 7
86 typedef struct stk_protocol_def_stct
87 {
88  char protocol[16];
89  char ip[64];
90  char port[6];
91  char name[64]; /* name of IP/Port info - TBD */
93 #endif
94