Optimize GTP utility functions
This commit is contained in:
@@ -242,6 +242,8 @@ static inline void gtp2_hdr_set_spare(struct gtp2_hdr *gtp, uint8_t spare)
|
||||
|
||||
static inline int gtp2_hdr_to_str(const struct gtp2_hdr *gtp, char *buf, size_t len)
|
||||
{
|
||||
memset(buf, 0, len);
|
||||
|
||||
int used = 0;
|
||||
used += snprintf(buf + used, len - used, "GTP: flags=0x%02x (version=%u, piggyback=%u, teid_flag=%u, spare_flag=%u), msg_type=0x%02x, msg_len=%u",
|
||||
gtp2_hdr_get_flags(gtp),
|
||||
|
||||
Reference in New Issue
Block a user