This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/835 RAB Assign for voice: heed the x213 nsap flag Add use_x213_nsap arg to ranap_new_msg_rab_assign_voice() and new_transp_info_rtp(). Pass this to new_transp_layer_addr() to compose 32bit addresses when use_x213_nsap == false. This is analogous to ranap_new_msg_rab_assign_data(). Particularly, the ip.access nano3G does not accept x213 NSAP 56bit addresses, so we want to send 32bit addresses there. Change-Id: I0c3c95d709c8a2b1c48d7a187faca34102226329 --- M include/osmocom/ranap/ranap_msg_factory.h M src/ranap_msg_factory.c M src/tests/test-ranap.c 3 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/35/835/1 diff --git a/include/osmocom/ranap/ranap_msg_factory.h b/include/osmocom/ranap/ranap_msg_factory.h index 9639881..120c6e6 100644 --- a/include/osmocom/ranap/ranap_msg_factory.h +++ b/include/osmocom/ranap/ranap_msg_factory.h @@ -32,7 +32,9 @@ struct msgb *ranap_new_msg_paging_cmd(const char *imsi, const uint32_t *tmsi, int is_ps, uint32_t cause); /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice) */ -struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port); +struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for PS (data) */ struct msgb *ranap_new_msg_rab_assign_data(uint8_t rab_id, uint32_t gtp_ip, diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 401ef4e..695a6be 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -647,7 +647,8 @@ out->bits_unused = 0; } -static RANAP_TransportLayerInformation_t *new_transp_info_rtp(uint32_t ip, uint16_t port) +static RANAP_TransportLayerInformation_t *new_transp_info_rtp(uint32_t ip, uint16_t port, + bool use_x213_nsap) { RANAP_TransportLayerInformation_t *tli = CALLOC(1, sizeof(*tli)); uint8_t binding_id[4]; @@ -661,7 +662,7 @@ binding_id[3] = 1; #endif - new_transp_layer_addr(&tli->transportLayerAddress, ip, 1); + new_transp_layer_addr(&tli->transportLayerAddress, ip, use_x213_nsap); tli->iuTransportAssociation.present = RANAP_IuTransportAssociation_PR_bindingID; OCTET_STRING_fromBuf(&tli->iuTransportAssociation.choice.bindingID, (const char *) binding_id, sizeof(binding_id)); @@ -710,7 +711,9 @@ } /*! \brief generate RANAP RAB ASSIGNMENT REQUEST message for CS (voice) */ -struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, uint16_t rtp_port) +struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap) { RANAP_ProtocolIE_FieldPair_t *pair; RANAP_RAB_AssignmentRequestIEs_t ies; @@ -731,7 +734,8 @@ //first.nAS_SynchronisationIndicator = FIXME; first.rAB_Parameters = new_rab_par_voice(); first.userPlaneInformation = new_upi(RANAP_UserPlaneMode_support_mode_for_predefined_SDU_sizes, 1); /* 2? */ - first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port); + first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port, + use_x213_nsap); /* put together the 'Second' part */ RANAP_RAB_SetupOrModifyItemSecond_t second; diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index 7b1f3bf..ce01b96 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -148,7 +148,7 @@ msgb_free(msg); printf("\n==> RAB ASSIGNMENT COMMAND (VOICE)\n"); - msg = ranap_new_msg_rab_assign_voice(1, rtp_ip, rtp_port); + msg = ranap_new_msg_rab_assign_voice(1, rtp_ip, rtp_port, 1); if (msg) printf("%s\n", msgb_hexdump(msg)); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/835 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c3c95d709c8a2b1c48d7a187faca34102226329 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>