feature: add GTP utils, support overwrite message length of GTP header
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "tuple.h"
|
||||
#include "times.h"
|
||||
#include "ipv4_utils.h"
|
||||
#include "ip4_utils.h"
|
||||
#include "packet_def.h"
|
||||
#include "packet_parse.h"
|
||||
#include "packet_layer.h"
|
||||
@@ -441,7 +441,7 @@ TEST(TCP_INIT_TO_OPENING, BY_SYN_RETRANSMISSION)
|
||||
packet_parse(&pkt, (const char *)syn_retransmission, sizeof(tcp_pkt1_c2s_syn));
|
||||
const struct raw_layer *ipv4_layer = packet_get_innermost_raw_layer(&pkt, LAYER_PROTO_IPV4);
|
||||
struct ip *hdr = (struct ip *)ipv4_layer->hdr_ptr;
|
||||
ipv4_hdr_set_ipid(hdr, 0x1234);
|
||||
ip4_hdr_set_ipid(hdr, 0x1234);
|
||||
printf("<= Packet Parse: done\n\n");
|
||||
|
||||
// lookup session
|
||||
@@ -540,7 +540,7 @@ TEST(TCP_INIT_TO_OPENING, BY_SYNACK_RETRANSMISSION)
|
||||
const struct raw_layer *ipv4_layer = packet_get_innermost_raw_layer(&pkt, LAYER_PROTO_IPV4);
|
||||
EXPECT_TRUE(ipv4_layer);
|
||||
struct ip *hdr = (struct ip *)ipv4_layer->hdr_ptr;
|
||||
ipv4_hdr_set_ipid(hdr, 0x1234);
|
||||
ip4_hdr_set_ipid(hdr, 0x1234);
|
||||
printf("<= Packet Parse: done\n\n");
|
||||
|
||||
// lookup session
|
||||
|
||||
Reference in New Issue
Block a user