diff --git a/lib/nas/nas_decoder.c b/lib/nas/nas_decoder.c index 414a49093..79181391b 100644 --- a/lib/nas/nas_decoder.c +++ b/lib/nas/nas_decoder.c @@ -26,8 +26,8 @@ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2017-04-09 15:56:04.989465 by acetcom - * from ../../../../../24301-d80.docx + * Created on: 2017-04-09 17:14:05.528536 by acetcom + * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nasdec diff --git a/lib/nas/nas_encoder.c b/lib/nas/nas_encoder.c index c86192f2f..bef2ea7bc 100644 --- a/lib/nas/nas_encoder.c +++ b/lib/nas/nas_encoder.c @@ -26,8 +26,8 @@ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2017-04-09 15:56:04.996022 by acetcom - * from ../../../../../24301-d80.docx + * Created on: 2017-04-09 17:14:05.534968 by acetcom + * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nasenc diff --git a/lib/nas/nas_ies.c b/lib/nas/nas_ies.c index ca683723f..bf96069ff 100644 --- a/lib/nas/nas_ies.c +++ b/lib/nas/nas_ies.c @@ -26,8 +26,8 @@ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2017-04-09 15:56:04.973586 by acetcom - * from ../../../../../24301-d80.docx + * Created on: 2017-04-09 17:14:05.514413 by acetcom + * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nasies @@ -1326,6 +1326,8 @@ c_int16_t nas_decode_header_compression_configuration(nas_header_compression_con d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(header_compression_configuration, pkbuf->payload - size, size); + header_compression_configuration->max_cid = ntohs(header_compression_configuration->max_cid); + return size; } @@ -1335,6 +1337,8 @@ c_int16_t nas_encode_header_compression_configuration(pkbuf_t *pkbuf, nas_header nas_header_compression_configuration_t target; memcpy(&target, header_compression_configuration, sizeof(nas_header_compression_configuration_t)); + target.max_cid = htons(header_compression_configuration->max_cid); + d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); diff --git a/lib/nas/nas_ies.h b/lib/nas/nas_ies.h index ce89de9ff..5977971ca 100644 --- a/lib/nas/nas_ies.h +++ b/lib/nas/nas_ies.h @@ -26,8 +26,8 @@ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2017-04-09 15:56:04.968190 by acetcom - * from ../../../../../24301-d80.docx + * Created on: 2017-04-09 17:14:05.511441 by acetcom + * from 24301-d80.docx ******************************************************************************/ #ifndef __NAS_IES_H__ diff --git a/lib/nas/nas_message.h b/lib/nas/nas_message.h index aff4096bc..d15dd4ca8 100644 --- a/lib/nas/nas_message.h +++ b/lib/nas/nas_message.h @@ -26,8 +26,8 @@ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2017-04-09 15:56:04.983439 by acetcom - * from ../../../../../24301-d80.docx + * Created on: 2017-04-09 17:14:05.521137 by acetcom + * from 24301-d80.docx ******************************************************************************/ #ifndef __NAS_MESSAGE_H__ diff --git a/lib/nas/support/type_list.py b/lib/nas/support/type_list.py index 4e70e4ef3..903e72829 100644 --- a/lib/nas/support/type_list.py +++ b/lib/nas/support/type_list.py @@ -76,3 +76,8 @@ type_list["Nonce"]["decode"] = \ " *nonce = ntohl(*nonce);\n\n" type_list["Nonce"]["encode"] = \ " target = htonl(*nonce);\n\n" + +type_list["Header compression configuration"]["decode"] = \ +" header_compression_configuration->max_cid = ntohs(header_compression_configuration->max_cid);\n\n" +type_list["Header compression configuration"]["encode"] = \ +" target.max_cid = htons(header_compression_configuration->max_cid);\n\n"