dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/26792 )
Change subject: ranap_rab_ass: add decoder and rewrite functions for RAB-AssignmentRequest/Response ......................................................................
Patch Set 13:
(1 comment)
https://gerrit.osmocom.org/c/osmo-hnbgw/+/26792/11/src/osmo-hnbgw/ranap_rab_... File src/osmo-hnbgw/ranap_rab_ass.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/26792/11/src/osmo-hnbgw/ranap_rab_... PS11, Line 34: int ranap_rab_ass_req_decode(RANAP_RAB_AssignmentRequestIEs_t *rab_assignment_request_ies, const uint8_t *data,
I'm a bit surprised that we pass the binary PDU in here and then deocde it, but only return a very s […]
My main concern here was to lower the risk to introduce memory leaks. So I wanted to keep only the binary representations and not the ASN.1 decoded representations which are nested multiple times and therefore have a lot of memory to manage.
However, I also think its better to do the aper_decode() outside of these helper functions to get the procedure code first. I have changed the functions now so that they take a RANAP_RANAP_PDU_t. I still think that it is the best when all the remaining nested encoding/decoding happens inside of those helper functions.