2018-08-17 19:25:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <osmocom/core/msgb.h>
|
|
|
|
#include <osmocom/rspro/RsproPDU.h>
|
|
|
|
#include <osmocom/rspro/ComponentType.h>
|
|
|
|
|
|
|
|
#define MAX_NAME_LEN 32
|
|
|
|
struct app_comp_id {
|
|
|
|
enum ComponentType type;
|
|
|
|
char name[MAX_NAME_LEN+1];
|
|
|
|
char software[MAX_NAME_LEN+1];
|
|
|
|
char sw_version[MAX_NAME_LEN+1];
|
|
|
|
char hw_manufacturer[MAX_NAME_LEN+1];
|
|
|
|
char hw_model[MAX_NAME_LEN+1];
|
|
|
|
char hw_serial_nr[MAX_NAME_LEN+1];
|
|
|
|
char hw_version[MAX_NAME_LEN+1];
|
|
|
|
char fw_version[MAX_NAME_LEN+1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msgb *rspro_msgb_alloc(void);
|
|
|
|
struct msgb *rspro_enc_msg(RsproPDU_t *pdu);
|
|
|
|
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);
|
2019-03-03 14:44:18 +00:00
|
|
|
RsproPDU_t *rspro_gen_ConnectBankRes(const struct app_comp_id *a_cid, e_ResultCode res);
|
2018-08-17 20:05:06 +00:00
|
|
|
RsproPDU_t *rspro_gen_ConnectClientReq(const struct app_comp_id *a_cid, const ClientSlot_t *client);
|
2018-09-24 12:55:55 +00:00
|
|
|
RsproPDU_t *rspro_gen_ConnectClientRes(const struct app_comp_id *a_cid, e_ResultCode res);
|
2018-08-17 19:25:56 +00:00
|
|
|
RsproPDU_t *rspro_gen_CreateMappingReq(const ClientSlot_t *client, const BankSlot_t *bank);
|
2018-10-14 22:44:53 +00:00
|
|
|
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);
|
2018-08-17 19:25:56 +00:00
|
|
|
RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port);
|
2019-03-02 13:22:24 +00:00
|
|
|
RsproPDU_t *rspro_gen_ConfigClientRes(e_ResultCode res);
|
2018-08-17 19:25:56 +00:00
|
|
|
RsproPDU_t *rspro_gen_SetAtrReq(uint16_t client_id, uint16_t slot_nr, const uint8_t *atr,
|
|
|
|
unsigned int atr_len);
|
2018-09-23 17:25:46 +00:00
|
|
|
RsproPDU_t *rspro_gen_TpduModem2Card(const ClientSlot_t *client, const BankSlot_t *bank,
|
|
|
|
const uint8_t *tpdu, unsigned int tpdu_len);
|
|
|
|
RsproPDU_t *rspro_gen_TpduCard2Modem(const BankSlot_t *bank, const ClientSlot_t *client,
|
|
|
|
const uint8_t *tpdu, unsigned int tpdu_len);
|
2019-03-02 13:52:17 +00:00
|
|
|
|
|
|
|
void rspro_comp_id_retrieve(struct app_comp_id *out, const ComponentIdentity_t *in);
|
2019-03-02 14:12:42 +00:00
|
|
|
const char *rspro_IpAddr2str(const IpAddress_t *in);
|