feature: add GTP utils, support overwrite message length of GTP header
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "ipv4_utils.h"
|
||||
#include "ip4_utils.h"
|
||||
#include "packet_def.h"
|
||||
#include "packet_parse.h"
|
||||
#include "packet_layer.h"
|
||||
@@ -54,7 +54,7 @@ static void packet_set_ip_src_addr(struct packet *pkt, uint32_t addr)
|
||||
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_src_addr(hdr, addr);
|
||||
ip4_hdr_set_src_addr(hdr, addr);
|
||||
}
|
||||
|
||||
#if 1
|
||||
|
||||
Reference in New Issue
Block a user