Refactored packet API to support struct layer (using union to contain different types of encapsulation headers)
This commit is contained in:
@@ -8,6 +8,7 @@ extern "C"
|
||||
|
||||
#include "list.h"
|
||||
#include "packet_priv.h"
|
||||
#include "packet_utils.h"
|
||||
#include "timeout.h"
|
||||
#include "uthash.h"
|
||||
#include "tuple.h"
|
||||
@@ -62,7 +63,7 @@ struct session
|
||||
UT_hash_handle hh3;
|
||||
struct tuple6 tuple;
|
||||
char tuple_str[TUPLE6_STR_SIZE];
|
||||
struct sid_list sids[MAX_FLOW_DIRECTION];
|
||||
struct sids sids[MAX_FLOW_DIRECTION];
|
||||
struct route_ctx route_ctx[MAX_FLOW_DIRECTION];
|
||||
const struct packet *first_pkt[MAX_FLOW_DIRECTION];
|
||||
const struct packet *curr_pkt;
|
||||
@@ -98,13 +99,13 @@ void session_set_closing_reason(struct session *sess, enum closing_reason reason
|
||||
void session_inc_stat(struct session *sess, enum flow_direction dir, enum session_stat stat, uint64_t val);
|
||||
void session_set_timestamp(struct session *sess, enum session_timestamp type, uint64_t value);
|
||||
|
||||
void session_clear_sid_list(struct session *sess, enum flow_direction dir);
|
||||
void session_set_sid_list(struct session *sess, enum flow_direction dir, const struct sid_list *list);
|
||||
void session_get_sid_list(const struct session *sess, enum flow_direction dir, struct sid_list *list);
|
||||
void session_clear_sids(struct session *sess, enum flow_direction dir);
|
||||
void session_set_sids(struct session *sess, enum flow_direction dir, const struct sids *sids);
|
||||
const struct sids *session_get_sids(const struct session *sess, enum flow_direction dir);
|
||||
|
||||
void session_clear_route_ctx(struct session *sess, enum flow_direction dir);
|
||||
void session_set_route_ctx(struct session *sess, enum flow_direction dir, const struct route_ctx *ctx);
|
||||
void session_get_route_ctx(const struct session *sess, enum flow_direction dir, struct route_ctx *ctx);
|
||||
const struct route_ctx *session_get_route_ctx(const struct session *sess, enum flow_direction dir);
|
||||
|
||||
void session_set_first_packet(struct session *sess, enum flow_direction dir, const struct packet *pkt);
|
||||
void session_set_current_packet(struct session *sess, const struct packet *pkt);
|
||||
|
||||
Reference in New Issue
Block a user