本文整理汇总了C++中CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数的典型用法代码示例。如果您正苦于以下问题:C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数的具体用法?C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER怎么用?C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: encode_bearer_resource_allocation_reject
int encode_bearer_resource_allocation_reject(bearer_resource_allocation_reject_msg *bearer_resource_allocation_reject, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, BEARER_RESOURCE_ALLOCATION_REJECT_MINIMUM_LENGTH, len);
if ((encode_result =
encode_esm_cause(&bearer_resource_allocation_reject->esmcause, 0,
buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
if ((bearer_resource_allocation_reject->presencemask & BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT)
== BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
if ((encode_result =
encode_protocol_configuration_options(&bearer_resource_allocation_reject->protocolconfigurationoptions,
BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_IEI,
buffer + encoded, len - encoded)) < 0)
// Return in case of error
return encode_result;
else
encoded += encode_result;
}
return encoded;
}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:29,代码来源:BearerResourceAllocationReject.c
示例2: encode_tracking_area_identity
int encode_tracking_area_identity(TrackingAreaIdentity *trackingareaidentity, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint32_t encoded = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_IDENTITY_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_tracking_area_identity_xml(trackingareaidentity, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
*(buffer + encoded) = 0x00 | ((trackingareaidentity->mccdigit2 & 0xf) << 4) |
(trackingareaidentity->mccdigit1 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((trackingareaidentity->mncdigit3 & 0xf) << 4) |
(trackingareaidentity->mccdigit3 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((trackingareaidentity->mncdigit2 & 0xf) << 4) |
(trackingareaidentity->mncdigit1 & 0xf);
encoded++;
IES_ENCODE_U16(buffer, encoded, trackingareaidentity->tac);
return encoded;
}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:26,代码来源:TrackingAreaIdentity.c
示例3: encode_voice_domain_preference_and_ue_usage_setting
int
encode_voice_domain_preference_and_ue_usage_setting (
VoiceDomainPreferenceAndUeUsageSetting * voicedomainpreferenceandueusagesetting,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_voice_domain_preference_and_ue_usage_setting_xml (voicedomainpreferenceandueusagesetting, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded++;
*(buffer + encoded) = 0x00 | (voicedomainpreferenceandueusagesetting->ue_usage_setting << 2) | voicedomainpreferenceandueusagesetting->voice_domain_for_eutran;
encoded++;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:30,代码来源:VoiceDomainPreferenceAndUeUsageSetting.c
示例4: encode_time_zone
int
encode_time_zone (
TimeZone * timezone,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, TIME_ZONE_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_time_zone_xml (timezone, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
*(buffer + encoded) = *timezone;
encoded++;
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:26,代码来源:TimeZone.c
示例5: encode_nas_message_container
int encode_nas_message_container(NasMessageContainer *nasmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
int encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_nas_message_container_xml(nasmessagecontainer, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded ++;
if ((encode_result = encode_octet_string(&nasmessagecontainer->nasmessagecontainercontents, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:27,代码来源:NasMessageContainer.c
示例6: encode_lcs_client_identity
int encode_lcs_client_identity(LcsClientIdentity *lcsclientidentity, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
int encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, LCS_CLIENT_IDENTITY_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_lcs_client_identity_xml(lcsclientidentity, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded ++;
if ((encode_result = encode_octet_string(&lcsclientidentity->lcsclientidentityvalue, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:27,代码来源:LcsClientIdentity.c
示例7: encode_authentication_failure_parameter
int encode_authentication_failure_parameter(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
int encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_FAILURE_PARAMETER_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_authentication_failure_parameter_xml(authenticationfailureparameter, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded ++;
if ((encode_result = encode_octet_string(&authenticationfailureparameter->auts, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:27,代码来源:AuthenticationFailureParameter.c
示例8: encode_nas_security_algorithms
int
encode_nas_security_algorithms (
NasSecurityAlgorithms * nassecurityalgorithms,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, NAS_SECURITY_ALGORITHMS_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_nas_security_algorithms_xml (nassecurityalgorithms, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
*(buffer + encoded) = 0x00 | ((nassecurityalgorithms->typeofcipheringalgorithm & 0x7) << 4) | (nassecurityalgorithms->typeofintegrityalgorithm & 0x7);
encoded++;
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:26,代码来源:NasSecurityAlgorithms.c
示例9: encode_tracking_area_identity_list
int encode_tracking_area_identity_list(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_tracking_area_identity_list_xml(trackingareaidentitylist, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded ++;
*(buffer + encoded) = 0x00 |
((trackingareaidentitylist->typeoflist & 0x3) << 5) |
(trackingareaidentitylist->numberofelements & 0x1f);
encoded++;
*(buffer + encoded) = 0x00 | ((trackingareaidentitylist->mccdigit2 & 0xf) << 4) |
(trackingareaidentitylist->mccdigit1 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((trackingareaidentitylist->mncdigit3 & 0xf) << 4) |
(trackingareaidentitylist->mccdigit3 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((trackingareaidentitylist->mncdigit2 & 0xf) << 4) |
(trackingareaidentitylist->mncdigit1 & 0xf);
encoded++;
IES_ENCODE_U16(buffer, encoded, trackingareaidentitylist->tac);
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:34,代码来源:TrackingAreaIdentityList.c
示例10: encode_location_area_identification
int encode_location_area_identification(LocationAreaIdentification *locationareaidentification, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint32_t encoded = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, LOCATION_AREA_IDENTIFICATION_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_location_area_identification_xml(locationareaidentification, iei);
#endif
if (iei > 0)
{
*buffer = iei;
encoded++;
}
*(buffer + encoded) = 0x00 | ((locationareaidentification->mccdigit2 & 0xf) << 4) |
(locationareaidentification->mccdigit1 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((locationareaidentification->mncdigit3 & 0xf) << 4) |
(locationareaidentification->mccdigit3 & 0xf);
encoded++;
*(buffer + encoded) = 0x00 | ((locationareaidentification->mncdigit2 & 0xf) << 4) |
(locationareaidentification->mncdigit1 & 0xf);
encoded++;
IES_ENCODE_U16(buffer, encoded, locationareaidentification->lac);
return encoded;
}
开发者ID:mspublic,项目名称:openair4G-mirror,代码行数:25,代码来源:LocationAreaIdentification.c
示例11: encode_authentication_failure
int encode_authentication_failure(authentication_failure_msg *authentication_failure, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_FAILURE_MINIMUM_LENGTH, len);
if ((encode_result = encode_emm_cause(&authentication_failure->emmcause, 0,
buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
if ((authentication_failure->presencemask & AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT)
== AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT) {
if ((encode_result =
encode_authentication_failure_parameter(&authentication_failure->authenticationfailureparameter,
AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_IEI,
buffer + encoded, len - encoded)) < 0)
// Return in case of error
return encode_result;
else
encoded += encode_result;
}
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:28,代码来源:AuthenticationFailure.c
示例12: encode_pdn_address
int encode_pdn_address(PdnAddress *pdnaddress, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
int encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, PDN_ADDRESS_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_pdn_address_xml(pdnaddress, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded ++;
*(buffer + encoded) = 0x00 |
(pdnaddress->pdntypevalue & 0x7);
encoded++;
if ((encode_result = encode_octet_string(&pdnaddress->pdnaddressinformation, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:30,代码来源:PdnAddress.c
示例13: encode_short_mac
int
encode_short_mac (
ShortMac * shortmac,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, SHORT_MAC_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_short_mac_xml (shortmac, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
IES_ENCODE_U16 (buffer, encoded, *shortmac);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:25,代码来源:ShortMac.c
示例14: encode_authentication_request
int encode_authentication_request(authentication_request_msg *authentication_request, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_REQUEST_MINIMUM_LENGTH, len);
*(buffer + encoded) = ((encode_u8_nas_key_set_identifier(&authentication_request->naskeysetidentifierasme) & 0x0f) << 4) | 0x00;
encoded++;
if ((encode_result =
encode_authentication_parameter_rand(&authentication_request->authenticationparameterrand,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
if ((encode_result =
encode_authentication_parameter_autn(&authentication_request->authenticationparameterautn,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
return encoded;
}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:27,代码来源:AuthenticationRequest.c
示例15: encode_pdn_disconnect_reject
int encode_pdn_disconnect_reject(pdn_disconnect_reject_msg *pdn_disconnect_reject, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, PDN_DISCONNECT_REJECT_MINIMUM_LENGTH, len);
if ((encode_result = encode_esm_cause(&pdn_disconnect_reject->esmcause, 0,
buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
if ((pdn_disconnect_reject->presencemask & PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT)
== PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
if ((encode_result =
encode_protocol_configuration_options(&pdn_disconnect_reject->protocolconfigurationoptions,
PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_IEI, buffer +
encoded, len - encoded)) < 0)
// Return in case of error
return encode_result;
else
encoded += encode_result;
}
return encoded;
}
开发者ID:sdnnfv,项目名称:openair4G,代码行数:28,代码来源:PdnDisconnectReject.c
示例16: encode_authentication_parameter_autn
int
encode_authentication_parameter_autn (
AuthenticationParameterAutn * authenticationparameterautn,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint8_t *lenPtr;
int encode_result;
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, AUTHENTICATION_PARAMETER_AUTN_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_authentication_parameter_autn_xml (authenticationparameterautn, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded++;
if ((encode_result = encode_octet_string (&authenticationparameterautn->autn, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:35,代码来源:AuthenticationParameterAutn.c
示例17: encode_daylight_saving_time
int
encode_daylight_saving_time (
DaylightSavingTime * daylightsavingtime,
uint8_t iei,
uint8_t * buffer,
uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
/*
* Checking IEI and pointer
*/
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, DAYLIGHT_SAVING_TIME_MINIMUM_LENGTH, len);
#if NAS_DEBUG
dump_daylight_saving_time_xml (daylightsavingtime, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
encoded++;
*(buffer + encoded) = 0x00 | (*daylightsavingtime & 0x3);
encoded++;
*lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:30,代码来源:DaylightSavingTime.c
示例18: encode_activate_default_eps_bearer_context_reject
int encode_activate_default_eps_bearer_context_reject(activate_default_eps_bearer_context_reject_msg *activate_default_eps_bearer_context_reject, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_MINIMUM_LENGTH, len);
if ((encode_result =
encode_esm_cause(&activate_default_eps_bearer_context_reject->esmcause,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error
return encode_result;
else
encoded += encode_result;
if ((activate_default_eps_bearer_context_reject->presencemask & ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT)
== ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
if ((encode_result =
encode_protocol_configuration_options(&activate_default_eps_bearer_context_reject->protocolconfigurationoptions,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_IEI,
buffer + encoded, len - encoded)) < 0)
// Return in case of error
return encode_result;
else
encoded += encode_result;
}
return encoded;
}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:29,代码来源:ActivateDefaultEpsBearerContextReject.c
示例19: encode_service_request
int encode_service_request(service_request_msg *service_request, uint8_t *buffer, uint32_t len)
{
int encoded = 0;
int encode_result = 0;
LOG_FUNC_IN;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SERVICE_REQUEST_MINIMUM_LENGTH, len);
if ((encode_result =
encode_ksi_and_sequence_number(&service_request->ksiandsequencenumber,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error
LOG_FUNC_RETURN(encode_result);
else
encoded += encode_result;
if ((encode_result =
encode_short_mac(&service_request->messageauthenticationcode, 0,
buffer + encoded, len - encoded)) < 0) //Return in case of error
LOG_FUNC_RETURN(encode_result);
else
encoded += encode_result;
LOG_FUNC_RETURN(encoded);
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:25,代码来源:ServiceRequest.c
示例20: encode_esm_message_container
int encode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len)
{
uint8_t *lenPtr;
uint32_t encoded = 0;
int32_t encode_result;
/* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH, len);
#if defined (NAS_DEBUG)
dump_esm_message_container_xml(esmmessagecontainer, iei);
#endif
if (iei > 0) {
*buffer = iei;
encoded++;
}
lenPtr = (buffer + encoded);
//encoded += 2;
//if ((encode_result = encode_octet_string(&esmmessagecontainer->esmmessagecontainercontents, buffer + sizeof(uint16_t), len - sizeof(uint16_t))) < 0)
if ((encode_result = encode_octet_string(&esmmessagecontainer->esmmessagecontainercontents, lenPtr + sizeof(uint16_t), len - sizeof(uint16_t))) < 0)
return encode_result;
else
encoded += encode_result;
ENCODE_U16(lenPtr, encode_result, encoded);
#if 0
lenPtr[1] = (((encoded - 2 - ((iei > 0) ? 1: 0))) & 0x0000ff00) >> 8;
lenPtr[0] = ((encoded - 2 - ((iei > 0) ? 1: 0))) & 0x000000ff;
#endif
return encoded;
}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:32,代码来源:EsmMessageContainer.c
注:本文中的CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论