rspro_util: Add rspro_gen_ConnectClientRes() function

Change-Id: I32fe32b24c87e20c57a2e448c2b183050b84adaf
This commit is contained in:
Harald Welte 2018-09-24 14:55:55 +02:00
parent 7585286466
commit 10f6c21736
2 changed files with 15 additions and 0 deletions

View File

@ -122,6 +122,20 @@ RsproPDU_t *rspro_gen_ConnectClientReq(const struct app_comp_id *a_cid, const Cl
return pdu;
}
RsproPDU_t *rspro_gen_ConnectClientRes(const struct app_comp_id *a_cid, e_ResultCode res)
{
RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));
if (!pdu)
return NULL;
pdu->version = 2;
pdu->tag = 2342;
pdu->msg.present = RsproPDUchoice_PR_connectClientRes;
fill_comp_id(&pdu->msg.choice.connectClientRes.identity, a_cid);
pdu->msg.choice.connectClientRes.result = res;
return pdu;
}
RsproPDU_t *rspro_gen_CreateMappingReq(const ClientSlot_t *client, const BankSlot_t *bank)
{
RsproPDU_t *pdu = CALLOC(1, sizeof(*pdu));

View File

@ -23,6 +23,7 @@ RsproPDU_t *rspro_dec_msg(struct msgb *msg);
RsproPDU_t *rspro_gen_ConnectBankReq(const struct app_comp_id *a_cid,
uint16_t bank_id, uint16_t num_slots);
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_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,