diff --git a/src/ip_reassembly/test/gtest_utils.h b/src/ip_reassembly/test/gtest_utils.h index a7177d0..ba77eb0 100644 --- a/src/ip_reassembly/test/gtest_utils.h +++ b/src/ip_reassembly/test/gtest_utils.h @@ -12,7 +12,6 @@ extern "C" #include "packet_private.h" #include "packet_dump.h" #include "packet_parser.h" -#include "packet_layer.h" static inline void packet_set_ipv4_src_addr(struct packet *pkt, uint32_t saddr) { diff --git a/src/packet/CMakeLists.txt b/src/packet/CMakeLists.txt index ce1d71f..b910682 100644 --- a/src/packet/CMakeLists.txt +++ b/src/packet/CMakeLists.txt @@ -5,8 +5,6 @@ add_library(packet packet_filter.cpp packet_dump.cpp packet_ldbc.cpp - packet_layer.cpp - packet_tunnel.cpp checksum.cpp) target_include_directories(packet PUBLIC ${CMAKE_CURRENT_LIST_DIR}) target_include_directories(packet PUBLIC ${CMAKE_SOURCE_DIR}/deps/uthash) diff --git a/src/packet/packet.cpp b/src/packet/packet.cpp index 75583be..0c716fa 100644 --- a/src/packet/packet.cpp +++ b/src/packet/packet.cpp @@ -122,6 +122,16 @@ enum packet_action packet_get_action(const struct packet *pkt) return pkt->meta.action; } +void packet_set_user_data(struct packet *pkt, void *data) +{ + pkt->user_data = data; +} + +void *packet_get_user_data(struct packet *pkt) +{ + return pkt->user_data; +} + /****************************************************************************** * tuple uitls ******************************************************************************/ @@ -444,6 +454,244 @@ int packet_get_outermost_tuple6(const struct packet *pkt, struct tuple6 *tuple) } } +/****************************************************************************** + * layer layer + ******************************************************************************/ + +int packet_get_layer_count(const struct packet *pkt) +{ + return pkt->layers_used; +} + +int packet_get_layer_by_idx(const struct packet *pkt, int idx, struct layer *out) +{ + const struct raw_layer *raw = packet_get_raw_layer(pkt, idx); + if (raw == NULL) + { + return -1; + } + else + { + layer_convert(raw, out); + return 0; + } +} + +const struct raw_layer *packet_get_raw_layer(const struct packet *pkt, int idx) +{ + if (idx < 0 || idx >= pkt->layers_used) + { + return NULL; + } + return &pkt->layers[idx]; +} + +const struct raw_layer *packet_get_innermost_raw_layer(const struct packet *pkt, enum layer_proto proto) +{ + const struct raw_layer *layer = NULL; + + for (int8_t i = pkt->layers_used - 1; i >= 0; i--) + { + layer = &pkt->layers[i]; + if (layer->proto == proto) + { + return layer; + } + } + + return NULL; +} + +const struct raw_layer *packet_get_outermost_raw_layer(const struct packet *pkt, enum layer_proto proto) +{ + const struct raw_layer *layer = NULL; + + for (int8_t i = 0; i < pkt->layers_used; i++) + { + layer = &pkt->layers[i]; + if (layer->proto == proto) + { + return layer; + } + } + + return NULL; +} + +/****************************************************************************** + * tunnel uitls + ******************************************************************************/ + +struct tunnel_detector +{ + enum tunnel_type type; + int contain_layers; + int (*identify_func)(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2); +}; + +static int is_ipv4_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) +{ + if (curr && curr->proto == LAYER_PROTO_IPV4 && + next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6)) + { + return 1; + } + + return 0; +} + +static int is_ipv6_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) +{ + if (curr && curr->proto == LAYER_PROTO_IPV6 && + next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6)) + { + return 1; + } + + return 0; +} + +static int is_gre_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) +{ + if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && + next1 && next1->proto == LAYER_PROTO_GRE) + { + return 1; + } + + return 0; +} + +static int is_gtp_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) +{ + if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && + next1 && next1->proto == LAYER_PROTO_UDP && + next2 && next2->proto == LAYER_PROTO_GTP_U) + { + return 1; + } + + return 0; +} + +static int is_vxlan_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) +{ + if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && + next1 && next1->proto == LAYER_PROTO_UDP && + next2 && next2->proto == LAYER_PROTO_VXLAN) + { + return 1; + } + + return 0; +} + +static int is_l2tp_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) +{ + if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && + next1 && next1->proto == LAYER_PROTO_UDP && + next2 && next2->proto == LAYER_PROTO_L2TP) + { + return 1; + } + + return 0; +} + +static int is_teredo_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) +{ + if (curr && curr->proto == LAYER_PROTO_IPV4 && + next1 && next1->proto == LAYER_PROTO_UDP && + next2 && next2->proto == LAYER_PROTO_IPV6) + { + return 1; + } + + return 0; +} + +static struct tunnel_detector detectors[] = { + {TUNNEL_IPV4, 1, is_ipv4_tunnel}, + {TUNNEL_IPV6, 1, is_ipv6_tunnel}, + {TUNNEL_GRE, 2, is_gre_tunnel}, + {TUNNEL_GTP, 3, is_gtp_tunnel}, + {TUNNEL_VXLAN, 3, is_vxlan_tunnel}, + {TUNNEL_L2TP, 3, is_l2tp_tunnel}, + {TUNNEL_TEREDO, 2, is_teredo_tunnel}, +}; + +// return index of detectors +static int detect_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) +{ + for (int i = 0; i < (int)(sizeof(detectors) / sizeof(detectors[0])); i++) + { + if (detectors[i].identify_func(curr, next1, next2)) + { + return i; + } + } + + return -1; +} + +int packet_get_tunnel_count(const struct packet *pkt) +{ + int count = 0; + int used = packet_get_layer_count(pkt); + const struct raw_layer *curr = NULL; + const struct raw_layer *next1 = NULL; + const struct raw_layer *next2 = NULL; + + for (int i = 0; i < used; i++) + { + curr = packet_get_raw_layer(pkt, i); + next1 = packet_get_raw_layer(pkt, i + 1); + next2 = packet_get_raw_layer(pkt, i + 2); + if (detect_tunnel(curr, next1, next2) >= 0) + { + count++; + } + } + + return count; +} + +// return 0: success  +// return -1: failed +int packet_get_tunnel_by_idx(const struct packet *pkt, int idx, struct tunnel *out) +{ + int ret = -1; + int count = 0; + int used = packet_get_layer_count(pkt); + const struct raw_layer *curr = NULL; + const struct raw_layer *next1 = NULL; + const struct raw_layer *next2 = NULL; + memset(out, 0, sizeof(struct tunnel)); + + for (int i = 0; i < used; i++) + { + curr = packet_get_raw_layer(pkt, i); + next1 = packet_get_raw_layer(pkt, i + 1); + next2 = packet_get_raw_layer(pkt, i + 2); + ret = detect_tunnel(curr, next1, next2); + if (ret >= 0 && count++ == idx) + { + struct tunnel_detector *hit = &detectors[ret]; + out->type = hit->type; + out->layer_count = hit->contain_layers; + if (out->layer_count >= 1) + layer_convert(curr, &out->layers[0]); + if (out->layer_count >= 2) + layer_convert(next1, &out->layers[1]); + if (out->layer_count >= 3) + layer_convert(next2, &out->layers[2]); + return 0; + } + } + + return -1; +} + /****************************************************************************** * other uitls ******************************************************************************/ @@ -561,13 +809,3 @@ void layer_convert(const struct raw_layer *in, struct layer *out) out->hdr_len = in->hdr_len; out->hdr.raw = (char *)in->hdr_ptr; } - -void packet_set_user_data(struct packet *pkt, void *data) -{ - pkt->user_data = data; -} - -void *packet_get_user_data(struct packet *pkt) -{ - return pkt->user_data; -} \ No newline at end of file diff --git a/src/packet/packet_builder.cpp b/src/packet/packet_builder.cpp index 27be1ef..2df0aee 100644 --- a/src/packet/packet_builder.cpp +++ b/src/packet/packet_builder.cpp @@ -4,7 +4,6 @@ #include "checksum.h" #include "packet_private.h" #include "packet_helper.h" -#include "packet_layer.h" #include "packet_parser.h" #include "packet_builder.h" diff --git a/src/packet/packet_filter.cpp b/src/packet/packet_filter.cpp index b33aaf9..5fe0bb2 100644 --- a/src/packet/packet_filter.cpp +++ b/src/packet/packet_filter.cpp @@ -2,7 +2,6 @@ #include "dablooms.h" #include "packet_private.h" -#include "packet_layer.h" #include "packet_filter.h" struct packet_key diff --git a/src/packet/packet_layer.cpp b/src/packet/packet_layer.cpp deleted file mode 100644 index ac7a267..0000000 --- a/src/packet/packet_layer.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "packet_private.h" -#include "packet_layer.h" - -int packet_get_layer_count(const struct packet *pkt) -{ - return pkt->layers_used; -} - -int packet_get_layer_by_idx(const struct packet *pkt, int idx, struct layer *out) -{ - const struct raw_layer *raw = packet_get_raw_layer(pkt, idx); - if (raw == NULL) - { - return -1; - } - else - { - layer_convert(raw, out); - return 0; - } -} - -const struct raw_layer *packet_get_raw_layer(const struct packet *pkt, int idx) -{ - if (idx < 0 || idx >= pkt->layers_used) - { - return NULL; - } - return &pkt->layers[idx]; -} - -const struct raw_layer *packet_get_innermost_raw_layer(const struct packet *pkt, enum layer_proto proto) -{ - const struct raw_layer *layer = NULL; - - for (int8_t i = pkt->layers_used - 1; i >= 0; i--) - { - layer = &pkt->layers[i]; - if (layer->proto == proto) - { - return layer; - } - } - - return NULL; -} - -const struct raw_layer *packet_get_outermost_raw_layer(const struct packet *pkt, enum layer_proto proto) -{ - const struct raw_layer *layer = NULL; - - for (int8_t i = 0; i < pkt->layers_used; i++) - { - layer = &pkt->layers[i]; - if (layer->proto == proto) - { - return layer; - } - } - - return NULL; -} diff --git a/src/packet/packet_layer.h b/src/packet/packet_layer.h deleted file mode 100644 index 8121ea5..0000000 --- a/src/packet/packet_layer.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "stellar/layer.h" - -int packet_get_layer_count(const struct packet *pkt); -int packet_get_layer_by_idx(const struct packet *pkt, int idx, struct layer *out); -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); - -#ifdef __cplusplus -} -#endif diff --git a/src/packet/packet_private.h b/src/packet/packet_private.h index 6cbf2c7..460c451 100644 --- a/src/packet/packet_private.h +++ b/src/packet/packet_private.h @@ -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 ******************************************************************************/ diff --git a/src/packet/packet_tunnel.cpp b/src/packet/packet_tunnel.cpp deleted file mode 100644 index c6edc21..0000000 --- a/src/packet/packet_tunnel.cpp +++ /dev/null @@ -1,175 +0,0 @@ -#include - -#include "stellar/tunnel.h" -#include "packet_private.h" -#include "packet_layer.h" - -struct tunnel_detector -{ - enum tunnel_type type; - int contain_layers; - int (*identify_func)(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2); -}; - -static int is_ipv4_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) -{ - if (curr && curr->proto == LAYER_PROTO_IPV4 && - next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6)) - { - return 1; - } - - return 0; -} - -static int is_ipv6_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) -{ - if (curr && curr->proto == LAYER_PROTO_IPV6 && - next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6)) - { - return 1; - } - - return 0; -} - -static int is_gre_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused))) -{ - if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && - next1 && next1->proto == LAYER_PROTO_GRE) - { - return 1; - } - - return 0; -} - -static int is_gtp_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) -{ - if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && - next1 && next1->proto == LAYER_PROTO_UDP && - next2 && next2->proto == LAYER_PROTO_GTP_U) - { - return 1; - } - - return 0; -} - -static int is_vxlan_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) -{ - if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && - next1 && next1->proto == LAYER_PROTO_UDP && - next2 && next2->proto == LAYER_PROTO_VXLAN) - { - return 1; - } - - return 0; -} - -static int is_l2tp_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) -{ - if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) && - next1 && next1->proto == LAYER_PROTO_UDP && - next2 && next2->proto == LAYER_PROTO_L2TP) - { - return 1; - } - - return 0; -} - -static int is_teredo_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) -{ - if (curr && curr->proto == LAYER_PROTO_IPV4 && - next1 && next1->proto == LAYER_PROTO_UDP && - next2 && next2->proto == LAYER_PROTO_IPV6) - { - return 1; - } - - return 0; -} - -static struct tunnel_detector detectors[] = { - {TUNNEL_IPV4, 1, is_ipv4_tunnel}, - {TUNNEL_IPV6, 1, is_ipv6_tunnel}, - {TUNNEL_GRE, 2, is_gre_tunnel}, - {TUNNEL_GTP, 3, is_gtp_tunnel}, - {TUNNEL_VXLAN, 3, is_vxlan_tunnel}, - {TUNNEL_L2TP, 3, is_l2tp_tunnel}, - {TUNNEL_TEREDO, 2, is_teredo_tunnel}, -}; - -// return index of detectors -static int detect_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2) -{ - for (int i = 0; i < (int)(sizeof(detectors) / sizeof(detectors[0])); i++) - { - if (detectors[i].identify_func(curr, next1, next2)) - { - return i; - } - } - - return -1; -} - -int packet_get_tunnel_count(const struct packet *pkt) -{ - int count = 0; - int used = packet_get_layer_count(pkt); - const struct raw_layer *curr = NULL; - const struct raw_layer *next1 = NULL; - const struct raw_layer *next2 = NULL; - - for (int i = 0; i < used; i++) - { - curr = packet_get_raw_layer(pkt, i); - next1 = packet_get_raw_layer(pkt, i + 1); - next2 = packet_get_raw_layer(pkt, i + 2); - if (detect_tunnel(curr, next1, next2) >= 0) - { - count++; - } - } - - return count; -} - -// return 0: success  -// return -1: failed -int packet_get_tunnel_by_idx(const struct packet *pkt, int idx, struct tunnel *out) -{ - int ret = -1; - int count = 0; - int used = packet_get_layer_count(pkt); - const struct raw_layer *curr = NULL; - const struct raw_layer *next1 = NULL; - const struct raw_layer *next2 = NULL; - memset(out, 0, sizeof(struct tunnel)); - - for (int i = 0; i < used; i++) - { - curr = packet_get_raw_layer(pkt, i); - next1 = packet_get_raw_layer(pkt, i + 1); - next2 = packet_get_raw_layer(pkt, i + 2); - ret = detect_tunnel(curr, next1, next2); - if (ret >= 0 && count++ == idx) - { - struct tunnel_detector *hit = &detectors[ret]; - out->type = hit->type; - out->layer_count = hit->contain_layers; - if (out->layer_count >= 1) - layer_convert(curr, &out->layers[0]); - if (out->layer_count >= 2) - layer_convert(next1, &out->layers[1]); - if (out->layer_count >= 3) - layer_convert(next2, &out->layers[2]); - return 0; - } - } - - return -1; -} \ No newline at end of file diff --git a/src/packet/test/gtest_packet_builder.cpp b/src/packet/test/gtest_packet_builder.cpp index 223f586..ad780b6 100644 --- a/src/packet/test/gtest_packet_builder.cpp +++ b/src/packet/test/gtest_packet_builder.cpp @@ -5,7 +5,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_dump.h" -#include "packet_layer.h" #include "packet_parser.h" #include "packet_builder.h" diff --git a/src/packet/test/gtest_packet_parser.cpp b/src/packet/test/gtest_packet_parser.cpp index 2bd3bb2..3a0a526 100644 --- a/src/packet/test/gtest_packet_parser.cpp +++ b/src/packet/test/gtest_packet_parser.cpp @@ -4,7 +4,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "packet_dump.h" /****************************************************************************** diff --git a/src/session/session_manager.cpp b/src/session/session_manager.cpp index e56d113..3249d81 100644 --- a/src/session/session_manager.cpp +++ b/src/session/session_manager.cpp @@ -5,7 +5,6 @@ #include "log.h" #include "utils.h" #include "packet_helper.h" -#include "packet_layer.h" #include "packet_filter.h" #include "snowflake.h" #include "session_def.h" diff --git a/src/session/test/gtest_filter_tcp_dupkt.cpp b/src/session/test/gtest_filter_tcp_dupkt.cpp index 3e4bf1d..182f6d0 100644 --- a/src/session/test/gtest_filter_tcp_dupkt.cpp +++ b/src/session/test/gtest_filter_tcp_dupkt.cpp @@ -3,7 +3,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_overload_evict_tcp_sess.cpp b/src/session/test/gtest_overload_evict_tcp_sess.cpp index 4f3f5a7..5449646 100644 --- a/src/session/test/gtest_overload_evict_tcp_sess.cpp +++ b/src/session/test/gtest_overload_evict_tcp_sess.cpp @@ -4,7 +4,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_overload_evict_udp_sess.cpp b/src/session/test/gtest_overload_evict_udp_sess.cpp index ecc98e4..f02e78c 100644 --- a/src/session/test/gtest_overload_evict_udp_sess.cpp +++ b/src/session/test/gtest_overload_evict_udp_sess.cpp @@ -4,7 +4,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_sess_mgr_tcp_reassembly.cpp b/src/session/test/gtest_sess_mgr_tcp_reassembly.cpp index 439fd72..612b2d5 100644 --- a/src/session/test/gtest_sess_mgr_tcp_reassembly.cpp +++ b/src/session/test/gtest_sess_mgr_tcp_reassembly.cpp @@ -3,7 +3,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "tcp_reassembly.h" diff --git a/src/session/test/gtest_state_tcp_active_to_closing.cpp b/src/session/test/gtest_state_tcp_active_to_closing.cpp index 8c874e5..7e7b8a6 100644 --- a/src/session/test/gtest_state_tcp_active_to_closing.cpp +++ b/src/session/test/gtest_state_tcp_active_to_closing.cpp @@ -5,7 +5,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_tcp_init_to_opening.cpp b/src/session/test/gtest_state_tcp_init_to_opening.cpp index 66949ed..4b80710 100644 --- a/src/session/test/gtest_state_tcp_init_to_opening.cpp +++ b/src/session/test/gtest_state_tcp_init_to_opening.cpp @@ -5,7 +5,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_tcp_init_to_opening_to_active_to_closing_to_closed.cpp b/src/session/test/gtest_state_tcp_init_to_opening_to_active_to_closing_to_closed.cpp index 702280c..9b46856 100644 --- a/src/session/test/gtest_state_tcp_init_to_opening_to_active_to_closing_to_closed.cpp +++ b/src/session/test/gtest_state_tcp_init_to_opening_to_active_to_closing_to_closed.cpp @@ -4,7 +4,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_tcp_opening_to_active.cpp b/src/session/test/gtest_state_tcp_opening_to_active.cpp index 7ceee44..0f3c8a3 100644 --- a/src/session/test/gtest_state_tcp_opening_to_active.cpp +++ b/src/session/test/gtest_state_tcp_opening_to_active.cpp @@ -4,7 +4,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_tcp_opening_to_closing.cpp b/src/session/test/gtest_state_tcp_opening_to_closing.cpp index 5ca5023..43ee635 100644 --- a/src/session/test/gtest_state_tcp_opening_to_closing.cpp +++ b/src/session/test/gtest_state_tcp_opening_to_closing.cpp @@ -5,7 +5,6 @@ #include "packet_helper.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_udp_init_to_opening_to_active_to_closing.cpp b/src/session/test/gtest_state_udp_init_to_opening_to_active_to_closing.cpp index 5dc54df..43e287a 100644 --- a/src/session/test/gtest_state_udp_init_to_opening_to_active_to_closing.cpp +++ b/src/session/test/gtest_state_udp_init_to_opening_to_active_to_closing.cpp @@ -4,7 +4,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_state_udp_init_to_opening_to_closing.cpp b/src/session/test/gtest_state_udp_init_to_opening_to_closing.cpp index 5bbfc5b..a667e0e 100644 --- a/src/session/test/gtest_state_udp_init_to_opening_to_closing.cpp +++ b/src/session/test/gtest_state_udp_init_to_opening_to_closing.cpp @@ -4,7 +4,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "snowflake.h" #include "session_utils.h" #include "session_manager.h" diff --git a/src/session/test/gtest_timeout_tcp_data.cpp b/src/session/test/gtest_timeout_tcp_data.cpp index 4832fde..83638b8 100644 --- a/src/session/test/gtest_timeout_tcp_data.cpp +++ b/src/session/test/gtest_timeout_tcp_data.cpp @@ -3,7 +3,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_timeout_tcp_handshake.cpp b/src/session/test/gtest_timeout_tcp_handshake.cpp index 2df83fa..a14cedd 100644 --- a/src/session/test/gtest_timeout_tcp_handshake.cpp +++ b/src/session/test/gtest_timeout_tcp_handshake.cpp @@ -3,7 +3,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_timeout_tcp_init.cpp b/src/session/test/gtest_timeout_tcp_init.cpp index cb12afb..d4eb05f 100644 --- a/src/session/test/gtest_timeout_tcp_init.cpp +++ b/src/session/test/gtest_timeout_tcp_init.cpp @@ -3,7 +3,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/src/session/test/gtest_timeout_udp_data.cpp b/src/session/test/gtest_timeout_udp_data.cpp index ff52cc5..3ce5d1c 100644 --- a/src/session/test/gtest_timeout_udp_data.cpp +++ b/src/session/test/gtest_timeout_udp_data.cpp @@ -3,7 +3,6 @@ #include "tuple.h" #include "packet_private.h" #include "packet_parser.h" -#include "packet_layer.h" #include "session_utils.h" #include "session_manager.h" #include "test_packets.h" diff --git a/test/packet_tool/packet_tool.cpp b/test/packet_tool/packet_tool.cpp index c6b5982..0272a90 100644 --- a/test/packet_tool/packet_tool.cpp +++ b/test/packet_tool/packet_tool.cpp @@ -3,7 +3,6 @@ #include "packet_helper.h" #include "packet_private.h" -#include "packet_layer.h" #include "packet_parser.h" #include "packet_dump.h"