blob: feef77d16d9eadfff0631f33cd8c5bd8efa65bb9 [file] [log] [blame]
Harald Welte137c4402018-08-17 21:25:56 +02001#pragma once
2
3#include <osmocom/core/msgb.h>
4#include <osmocom/rspro/RsproPDU.h>
5#include <osmocom/rspro/ComponentType.h>
6
7#define MAX_NAME_LEN 32
8struct app_comp_id {
9 enum ComponentType type;
10 char name[MAX_NAME_LEN+1];
11 char software[MAX_NAME_LEN+1];
12 char sw_version[MAX_NAME_LEN+1];
13 char hw_manufacturer[MAX_NAME_LEN+1];
14 char hw_model[MAX_NAME_LEN+1];
15 char hw_serial_nr[MAX_NAME_LEN+1];
16 char hw_version[MAX_NAME_LEN+1];
17 char fw_version[MAX_NAME_LEN+1];
18};
19
20struct msgb *rspro_msgb_alloc(void);
21struct msgb *rspro_enc_msg(RsproPDU_t *pdu);
22RsproPDU_t *rspro_dec_msg(struct msgb *msg);
23RsproPDU_t *rspro_gen_ConnectBankReq(const struct app_comp_id *a_cid,
24 uint16_t bank_id, uint16_t num_slots);
Harald Welte57555aa2018-08-17 22:05:06 +020025RsproPDU_t *rspro_gen_ConnectClientReq(const struct app_comp_id *a_cid, const ClientSlot_t *client);
Harald Welte10f6c212018-09-24 14:55:55 +020026RsproPDU_t *rspro_gen_ConnectClientRes(const struct app_comp_id *a_cid, e_ResultCode res);
Harald Welte137c4402018-08-17 21:25:56 +020027RsproPDU_t *rspro_gen_CreateMappingReq(const ClientSlot_t *client, const BankSlot_t *bank);
28RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port);
Harald Welted08d5052018-10-03 20:43:31 +020029RsproPDU_t *rspro_gen_SetAtrReq(const ClientSlot_t *client, const uint8_t *atr, unsigned int atr_len);
Harald Welte5d16b1c2018-09-23 19:25:46 +020030RsproPDU_t *rspro_gen_TpduModem2Card(const ClientSlot_t *client, const BankSlot_t *bank,
31 const uint8_t *tpdu, unsigned int tpdu_len);
32RsproPDU_t *rspro_gen_TpduCard2Modem(const BankSlot_t *bank, const ClientSlot_t *client,
33 const uint8_t *tpdu, unsigned int tpdu_len);