From 7bc88bbd7ea43082fec181c6892259218ce198a0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 15 Apr 2017 19:05:33 +0200 Subject: ipa: Introduce helpers to encode IPA CCM ID RESPONSE The ipa.c file already contained code to parse an ID RESPONSE into the 'struct ipaccess_unit', but it didn't so far contain code to put together an ID RESPONSE packet based on that structure. Let's change that with ipa_ccm_make_id_resp() and a helper wrapper ipa_ccm_make_id_resp_from_req(). Change-Id: Icbcd8827a75fd5f3393351c1ca372de85275ad35 --- include/osmocom/gsm/ipa.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/osmocom/gsm/ipa.h') diff --git a/include/osmocom/gsm/ipa.h b/include/osmocom/gsm/ipa.h index 0bb01c59..cabee139 100644 --- a/include/osmocom/gsm/ipa.h +++ b/include/osmocom/gsm/ipa.h @@ -37,6 +37,13 @@ int ipa_parse_unitid(const char *str, struct ipaccess_unit *unit_data); int ipa_ccm_tlv_to_unitdata(struct ipaccess_unit *ud, const struct tlv_parsed *tp); + +struct msgb *ipa_ccm_make_id_resp(const struct ipaccess_unit *dev, + const uint8_t *ies_req, unsigned int num_ies_req); + +struct msgb *ipa_ccm_make_id_resp_from_req(const struct ipaccess_unit *dev, + const uint8_t *data, unsigned int len); + /* Send an IPA message to the given FD */ int ipa_send(int fd, const void *msg, size_t msglen); -- cgit v1.2.3