Change in osmo-remsim[master]: add rspro_gen_{Remove, Create}Mapping{Req, Res}()

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Mar 4 16:26:20 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11353 )

Change subject: add rspro_gen_{Remove,Create}Mapping{Req,Res}()
......................................................................

add rspro_gen_{Remove,Create}Mapping{Req,Res}()

Change-Id: If86d34a1e723b7202b5fa2c40ea1d0b152381773
---
M src/rspro_util.c
M src/rspro_util.h
2 files changed, 40 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/rspro_util.c b/src/rspro_util.c
index 970aca5..c8f4589 100644
--- a/src/rspro_util.c
+++ b/src/rspro_util.c
@@ -153,6 +153,43 @@
 	return pdu;
 }
 
+RsproPDU_t *rspro_gen_CreateMappingRes(e_ResultCode res)
+{
+	RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
+	if (!pdu)
+		return NULL;
+	pdu->version = 2;
+	pdu->msg.present = RsproPDUchoice_PR_createMappingRes;
+	pdu->msg.choice.createMappingRes.result = res;
+
+	return pdu;
+}
+
+RsproPDU_t *rspro_gen_RemoveMappingReq(const ClientSlot_t *client, const BankSlot_t *bank)
+{
+	RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
+	if (!pdu)
+		return NULL;
+	pdu->version = 2;
+	pdu->msg.present = RsproPDUchoice_PR_removeMappingReq;
+	pdu->msg.choice.removeMappingReq.client = *client;
+	pdu->msg.choice.removeMappingReq.bank = *bank;
+
+	return pdu;
+}
+
+RsproPDU_t *rspro_gen_RemoveMappingRes(e_ResultCode res)
+{
+	RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
+	if (!pdu)
+		return NULL;
+	pdu->version = 2;
+	pdu->msg.present = RsproPDUchoice_PR_removeMappingRes;
+	pdu->msg.choice.removeMappingRes.result = res;
+
+	return pdu;
+}
+
 RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port)
 {
 	RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
diff --git a/src/rspro_util.h b/src/rspro_util.h
index 5411a48..bb2cf00 100644
--- a/src/rspro_util.h
+++ b/src/rspro_util.h
@@ -25,6 +25,9 @@
 RsproPDU_t *rspro_gen_ConnectClientReq(const struct app_comp_id *a_cid, const ClientSlot_t *client);
 RsproPDU_t *rspro_gen_ConnectClientRes(const struct app_comp_id *a_cid, e_ResultCode res);
 RsproPDU_t *rspro_gen_CreateMappingReq(const ClientSlot_t *client, const BankSlot_t *bank);
+RsproPDU_t *rspro_gen_CreateMappingRes(e_ResultCode res);
+RsproPDU_t *rspro_gen_RemoveMappingReq(const ClientSlot_t *client, const BankSlot_t *bank);
+RsproPDU_t *rspro_gen_RemoveMappingRes(e_ResultCode res);
 RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port);
 RsproPDU_t *rspro_gen_SetAtrReq(uint16_t client_id, uint16_t slot_nr, const uint8_t *atr,
 				unsigned int atr_len);

-- 
To view, visit https://gerrit.osmocom.org/11353
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If86d34a1e723b7202b5fa2c40ea1d0b152381773
Gerrit-Change-Number: 11353
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190304/70c6fb1a/attachment.html>


More information about the gerrit-log mailing list