aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gtpu/gtpu.h
diff options
context:
space:
mode:
authorAndreas Schultz <andreas.schultz@travelping.com>2018-07-17 11:34:20 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-07-18 04:39:56 +0000
commitd6dfd002328676eddda3b90bf46af0128a119b75 (patch)
treed31469567aa4a7394df630c7490e8b83beda1e44 /src/plugins/gtpu/gtpu.h
parent96cc67dd80e7fbf56071925afff056929965af6d (diff)
Fix GTP-U length header field in encoding
The length in the GTPU header does not specify the length of the payload. It does specify the number of bytes following the fixed part (the first 8 bytes) of the GTPU header (see 3GPP TS 29.060, Sect. 9.3.1). Change-Id: I8ce73df015e1cf1f38d306666962c0058756111c Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Diffstat (limited to 'src/plugins/gtpu/gtpu.h')
-rw-r--r--src/plugins/gtpu/gtpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/gtpu/gtpu.h b/src/plugins/gtpu/gtpu.h
index 6331aa31890..05208755d8c 100644
--- a/src/plugins/gtpu/gtpu.h
+++ b/src/plugins/gtpu/gtpu.h
@@ -55,13 +55,15 @@ typedef struct
{
u8 ver_flags;
u8 type;
- u16 length; /* length in octets of the payload */
+ u16 length; /* length in octets of the data following the fixed part of the header */
u32 teid;
u16 sequence;
u8 pdu_number;
u8 next_ext_type;
} gtpu_header_t;
+#define GTPU_V1_HDR_LEN 8
+
#define GTPU_VER_MASK (7<<5)
#define GTPU_PT_BIT (1<<4)
#define GTPU_E_BIT (1<<2)