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

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 14 23:53:09 UTC 2018


Harald Welte has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/53/11353/1

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: newchange
Gerrit-Change-Id: If86d34a1e723b7202b5fa2c40ea1d0b152381773
Gerrit-Change-Number: 11353
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181014/6d084dae/attachment.htm>


More information about the gerrit-log mailing list