Optimize GTP utility functions
This commit is contained in:
@@ -132,7 +132,7 @@ TEST(GTP1_UTILS, C_GET)
|
||||
EXPECT_TRUE(calc_gtp1_hdr_len((const char *)gtp1_c, sizeof(gtp1_c)) == 12);
|
||||
EXPECT_TRUE(gtp1_hdr_get_flags(hdr) == 0x32);
|
||||
EXPECT_TRUE(gtp1_hdr_get_version(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_protocol(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_proto(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_reserved(hdr) == 0);
|
||||
EXPECT_TRUE(gtp1_hdr_get_ext_flag(hdr) == 0);
|
||||
EXPECT_TRUE(gtp1_hdr_get_seq_flag(hdr) == 1);
|
||||
@@ -156,7 +156,7 @@ TEST(GTP1_UTILS, C_SET)
|
||||
struct gtp1_hdr *hdr = (struct gtp1_hdr *)buff;
|
||||
gtp1_hdr_set_flags(hdr, 0x32);
|
||||
gtp1_hdr_set_version(hdr, 1);
|
||||
gtp1_hdr_set_protocol(hdr, 1);
|
||||
gtp1_hdr_set_proto(hdr, 1);
|
||||
gtp1_hdr_set_reserved(hdr, 0);
|
||||
gtp1_hdr_set_ext_flag(hdr, 0);
|
||||
gtp1_hdr_set_seq_flag(hdr, 1);
|
||||
@@ -197,7 +197,7 @@ TEST(GTP1_UTILS, U_GET)
|
||||
EXPECT_TRUE(calc_gtp1_hdr_len((const char *)gtp1_u, sizeof(gtp1_u)) == 8);
|
||||
EXPECT_TRUE(gtp1_hdr_get_flags(hdr) == 0x30);
|
||||
EXPECT_TRUE(gtp1_hdr_get_version(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_protocol(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_proto(hdr) == 1);
|
||||
EXPECT_TRUE(gtp1_hdr_get_reserved(hdr) == 0);
|
||||
EXPECT_TRUE(gtp1_hdr_get_ext_flag(hdr) == 0);
|
||||
EXPECT_TRUE(gtp1_hdr_get_seq_flag(hdr) == 0);
|
||||
@@ -221,7 +221,7 @@ TEST(GTP1_UTILS, U_SET)
|
||||
struct gtp1_hdr *hdr = (struct gtp1_hdr *)buff;
|
||||
gtp1_hdr_set_flags(hdr, 0x30);
|
||||
gtp1_hdr_set_version(hdr, 1);
|
||||
gtp1_hdr_set_protocol(hdr, 1);
|
||||
gtp1_hdr_set_proto(hdr, 1);
|
||||
gtp1_hdr_set_reserved(hdr, 0);
|
||||
gtp1_hdr_set_ext_flag(hdr, 0);
|
||||
gtp1_hdr_set_seq_flag(hdr, 0);
|
||||
|
||||
Reference in New Issue
Block a user