您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数代码示例

51自学网 2021-06-01 20:01:08
  C++
这篇教程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怎么用?C++ CHECK_PDU_POINTER_AND_LENGTH_ENCODER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,


示例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,


示例3: encode_voice_domain_preference_and_ue_usage_setting

intencode_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,


示例4: encode_time_zone

intencode_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,


示例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,


示例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,


示例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,


示例8: encode_nas_security_algorithms

intencode_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,


示例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,


示例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,


示例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,


示例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,


示例13: encode_short_mac

intencode_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,


示例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,


示例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,


示例16: encode_authentication_parameter_autn

intencode_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,


示例17: encode_daylight_saving_time

intencode_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,


示例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,


示例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,


示例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,


示例21: encode_eps_quality_of_service

int encode_eps_quality_of_service(EpsQualityOfService *epsqualityofservice, 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, EPS_QUALITY_OF_SERVICE_MINIMUM_LENGTH, len);#if defined (NAS_DEBUG)  dump_eps_quality_of_service_xml(epsqualityofservice, iei);#endif  if (iei > 0) {    *buffer = iei;    encoded++;  }  lenPtr  = (buffer + encoded);  encoded ++;  *(buffer + encoded) = epsqualityofservice->qci;  encoded++;  if (epsqualityofservice->bitRatesPresent) {    encoded += encode_eps_qos_bit_rates(&epsqualityofservice->bitRates,                                        buffer + encoded);  }  if (epsqualityofservice->bitRatesExtPresent) {    encoded += encode_eps_qos_bit_rates(&epsqualityofservice->bitRatesExt,                                        buffer + encoded);  }  *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);  return encoded;}
开发者ID:ShibinMathew36,项目名称:OAI-step,代码行数:33,


示例22: encode_eps_network_feature_support

intencode_eps_network_feature_support (  EpsNetworkFeatureSupport * epsnetworkfeaturesupport,  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, EPS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH, len);#if NAS_DEBUG  dump_eps_network_feature_support_xml (epsnetworkfeaturesupport, iei);#endif  if (iei > 0) {    *buffer = iei;    encoded++;  }  lenPtr = (buffer + encoded);  encoded++;  *(buffer + encoded) = 0x00 | (*epsnetworkfeaturesupport & 0x1);  encoded++;  *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);  return encoded;}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:30,


示例23: encode_p_tmsi_signature

intencode_p_tmsi_signature (  PTmsiSignature * ptmsisignature,  uint8_t iei,  uint8_t * buffer,  uint32_t len){  uint32_t                                encode_result;  uint32_t                                encoded = 0;  /*   * Checking IEI and pointer   */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, P_TMSI_SIGNATURE_MINIMUM_LENGTH, len);#if NAS_DEBUG  dump_p_tmsi_signature_xml (ptmsisignature, iei);#endif  if (iei > 0) {    *buffer = iei;    encoded++;  }  if ((encode_result = encode_octet_string (&ptmsisignature->ptmsisignaturevalue, buffer + encoded, len - encoded)) < 0)    return encode_result;  else    encoded += encode_result;  return encoded;}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:30,


示例24: encode_ms_network_capability

intencode_ms_network_capability (  MsNetworkCapability * msnetworkcapability,  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, MS_NETWORK_CAPABILITY_MINIMUM_LENGTH, len);#if NAS_DEBUG  dump_ms_network_capability_xml (msnetworkcapability, iei);#endif  if (iei > 0) {    *buffer = iei;    encoded++;  }  lenPtr = (buffer + encoded);  encoded++;  if ((encode_result = encode_octet_string (&msnetworkcapability->msnetworkcapabilityvalue, 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,


示例25: encode_esm_information_request

int encode_esm_information_request(esm_information_request_msg *esm_information_request, uint8_t *buffer, uint32_t len){  int encoded = 0;  /* Checking IEI and pointer */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_INFORMATION_REQUEST_MINIMUM_LENGTH, len);  return encoded;}
开发者ID:awesome-security,项目名称:openairinterface5g,代码行数:9,


示例26: encode_security_mode_command

intencode_security_mode_command (  security_mode_command_msg * security_mode_command,  uint8_t * buffer,  uint32_t len){  int                                     encoded = 0;  int                                     encode_result = 0;  /*   * Checking IEI and pointer   */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer, SECURITY_MODE_COMMAND_MINIMUM_LENGTH, len);  if ((encode_result = encode_nas_security_algorithms (&security_mode_command->selectednassecurityalgorithms, 0, buffer + encoded, len - encoded)) < 0) //Return in case of error    return encode_result;  else    encoded += encode_result;  *(buffer + encoded) = (encode_u8_nas_key_set_identifier (&security_mode_command->naskeysetidentifier) & 0x0f);  encoded++;  if ((encode_result = encode_ue_security_capability (&security_mode_command->replayeduesecuritycapabilities, 0, buffer + encoded, len - encoded)) < 0) //Return in case of error    return encode_result;  else    encoded += encode_result;  if ((security_mode_command->presencemask & SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT)      == SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT) {    if ((encode_result = encode_imeisv_request (&security_mode_command->imeisvrequest, SECURITY_MODE_COMMAND_IMEISV_REQUEST_IEI, buffer + encoded, len - encoded)) < 0)      // Return in case of error      return encode_result;    else      encoded += encode_result;  }  if ((security_mode_command->presencemask & SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT)      == SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT) {    if ((encode_result = encode_nonce (&security_mode_command->replayednonceue, SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_IEI, buffer + encoded, len - encoded)) < 0)      // Return in case of error      return encode_result;    else      encoded += encode_result;  }  if ((security_mode_command->presencemask & SECURITY_MODE_COMMAND_NONCEMME_PRESENT)      == SECURITY_MODE_COMMAND_NONCEMME_PRESENT) {    if ((encode_result = encode_nonce (&security_mode_command->noncemme, SECURITY_MODE_COMMAND_NONCEMME_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,代码行数:56,


示例27: encode_quality_of_service

int encode_quality_of_service(QualityOfService *qualityofservice, 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, QUALITY_OF_SERVICE_MINIMUM_LENGTH, len);#if defined (NAS_DEBUG)    dump_quality_of_service_xml(qualityofservice, iei);#endif    if (iei > 0)    {        *buffer = iei;        encoded++;    }    lenPtr  = (buffer + encoded);    encoded ++;    *(buffer + encoded) = 0x00 |    ((qualityofservice->delayclass & 0x7) << 3) |    (qualityofservice->reliabilityclass & 0x7);    encoded++;    *(buffer + encoded) = 0x00 | ((qualityofservice->peakthroughput & 0xf) << 4) |    (qualityofservice->precedenceclass & 0x7);    encoded++;    *(buffer + encoded) = 0x00 |    (qualityofservice->meanthroughput & 0x1f);    encoded++;    *(buffer + encoded) = 0x00 | ((qualityofservice->trafficclass & 0x7) << 5) |    ((qualityofservice->deliveryorder & 0x3) << 3) |    (qualityofservice->deliveryoferroneoussdu & 0x7);    encoded++;    *(buffer + encoded) = qualityofservice->maximumsdusize;    encoded++;    *(buffer + encoded) = qualityofservice->maximumbitrateuplink;    encoded++;    *(buffer + encoded) = qualityofservice->maximumbitratedownlink;    encoded++;    *(buffer + encoded) = 0x00 | ((qualityofservice->residualber & 0xf) << 4) |    (qualityofservice->sduratioerror & 0xf);    encoded++;    *(buffer + encoded) = 0x00 | ((qualityofservice->transferdelay & 0x3f) << 2) |    (qualityofservice->traffichandlingpriority & 0x3);    encoded++;    *(buffer + encoded) = qualityofservice->guaranteedbitrateuplink;    encoded++;    *(buffer + encoded) = qualityofservice->guaranteedbitratedownlink;    encoded++;    *(buffer + encoded) = 0x00 |    ((qualityofservice->signalingindication & 0x1) << 4) |    (qualityofservice->sourcestatisticsdescriptor & 0xf);    encoded++;    *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0);    return encoded;}
开发者ID:mspublic,项目名称:openair4G-mirror,代码行数:53,


示例28: encode_imeisv_request

int encode_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t *buffer, uint32_t len){  uint8_t encoded = 0;  /* Checking length and pointer */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IMEISV_REQUEST_MINIMUM_LENGTH, len);#if defined (NAS_DEBUG)  dump_imeisv_request_xml(imeisvrequest, iei);#endif  *(buffer + encoded) = 0x00 | (iei & 0xf0) |                        (*imeisvrequest & 0x7);  encoded++;  return encoded;}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:13,


示例29: encode_ue_radio_capability_information_update_needed

int encode_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t *buffer, uint32_t len){  uint8_t encoded = 0;  /* Checking length and pointer */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_MINIMUM_LENGTH, len);#if defined (NAS_DEBUG)  dump_ue_radio_capability_information_update_needed_xml(ueradiocapabilityinformationupdateneeded, iei);#endif  *(buffer + encoded) = 0x00 | (iei & 0xf0) |                        (*ueradiocapabilityinformationupdateneeded & 0x1);  encoded++;  return encoded;}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:13,


示例30: encode_identity_type_2

int encode_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t *buffer, uint32_t len){  uint8_t encoded = 0;  /* Checking length and pointer */  CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IDENTITY_TYPE_2_MINIMUM_LENGTH, len);#if defined (NAS_DEBUG)  dump_identity_type_2_xml(identitytype2, iei);#endif  *(buffer + encoded) = 0x00 | (iei & 0xf0) |                        (*identitytype2 & 0x7);  encoded++;  return encoded;}
开发者ID:debashish216,项目名称:lte-testbed-news,代码行数:13,



注:本文中的CHECK_PDU_POINTER_AND_LENGTH_ENCODER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CHECK_POINTER函数代码示例
C++ CHECK_PARAMS函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。