refactor: move packet_layer / packet_tunnel to packet.cpp

This commit is contained in:
luwenpeng
2024-08-16 16:58:06 +08:00
parent a2d68bb853
commit 60a4666427
28 changed files with 257 additions and 289 deletions

View File

@@ -5,6 +5,7 @@ extern "C"
{
#endif
#include "stellar/tunnel.h"
#include "stellar/layer.h"
#include "stellar/packet.h"
@@ -107,6 +108,14 @@ int packet_get_outermost_tuple4(const struct packet *pkt, struct tuple4 *tuple);
int packet_get_innermost_tuple6(const struct packet *pkt, struct tuple6 *tuple);
int packet_get_outermost_tuple6(const struct packet *pkt, struct tuple6 *tuple);
/******************************************************************************
* layer uitls
******************************************************************************/
const struct raw_layer *packet_get_raw_layer(const struct packet *pkt, int idx);
const struct raw_layer *packet_get_innermost_raw_layer(const struct packet *pkt, enum layer_proto proto);
const struct raw_layer *packet_get_outermost_raw_layer(const struct packet *pkt, enum layer_proto proto);
/******************************************************************************
* other uitls
******************************************************************************/