update session_manager_stat

This commit is contained in:
luwenpeng
2024-03-11 15:04:18 +08:00
parent 512dfddd03
commit 639614622b
4 changed files with 135 additions and 140 deletions

View File

@@ -1148,6 +1148,7 @@ void packet_print(const struct packet *pkt)
// return -1 : not found
int packet_get_innermost_tuple2(const struct packet *pkt, struct tuple2 *tuple)
{
memset(tuple, 0, sizeof(struct tuple2));
const struct layer *layer = NULL;
for (int8_t i = pkt->layers_used - 1; i >= 0; i--)
@@ -1168,6 +1169,7 @@ int packet_get_innermost_tuple2(const struct packet *pkt, struct tuple2 *tuple)
// return -1 : not found
int packet_get_outermost_tuple2(const struct packet *pkt, struct tuple2 *tuple)
{
memset(tuple, 0, sizeof(struct tuple2));
const struct layer *layer = NULL;
for (int8_t i = 0; i < pkt->layers_used; i++)
@@ -1188,6 +1190,7 @@ int packet_get_outermost_tuple2(const struct packet *pkt, struct tuple2 *tuple)
// return -1 : not found
int packet_get_innermost_tuple4(const struct packet *pkt, struct tuple4 *tuple)
{
memset(tuple, 0, sizeof(struct tuple4));
const struct layer *layer_l3 = NULL;
const struct layer *layer_l4 = NULL;
const struct layer *layer = NULL;
@@ -1227,6 +1230,7 @@ int packet_get_innermost_tuple4(const struct packet *pkt, struct tuple4 *tuple)
// return -1 : not found
int packet_get_outermost_tuple4(const struct packet *pkt, struct tuple4 *tuple)
{
memset(tuple, 0, sizeof(struct tuple4));
const struct layer *layer_l3 = NULL;
const struct layer *layer_l4 = NULL;
const struct layer *layer = NULL;
@@ -1266,6 +1270,7 @@ int packet_get_outermost_tuple4(const struct packet *pkt, struct tuple4 *tuple)
// return -1 : not found
int packet_get_innermost_tuple6(const struct packet *pkt, struct tuple6 *tuple)
{
memset(tuple, 0, sizeof(struct tuple6));
const struct layer *layer_l3 = NULL;
const struct layer *layer_l4 = NULL;
const struct layer *layer = NULL;
@@ -1306,6 +1311,7 @@ int packet_get_innermost_tuple6(const struct packet *pkt, struct tuple6 *tuple)
// return -1 : not found
int packet_get_outermost_tuple6(const struct packet *pkt, struct tuple6 *tuple)
{
memset(tuple, 0, sizeof(struct tuple6));
const struct layer *layer_l3 = NULL;
const struct layer *layer_l4 = NULL;
const struct layer *layer = NULL;