Harald Welte | 137c440 | 2018-08-17 21:25:56 +0200 | [diff] [blame] | 1 | #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 |
| 8 | struct 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 | |
| 20 | struct msgb *rspro_msgb_alloc(void); |
| 21 | struct msgb *rspro_enc_msg(RsproPDU_t *pdu); |
| 22 | RsproPDU_t *rspro_dec_msg(struct msgb *msg); |
| 23 | RsproPDU_t *rspro_gen_ConnectBankReq(const struct app_comp_id *a_cid, |
| 24 | uint16_t bank_id, uint16_t num_slots); |
Harald Welte | 57555aa | 2018-08-17 22:05:06 +0200 | [diff] [blame] | 25 | RsproPDU_t *rspro_gen_ConnectClientReq(const struct app_comp_id *a_cid, const ClientSlot_t *client); |
Harald Welte | 10f6c21 | 2018-09-24 14:55:55 +0200 | [diff] [blame] | 26 | RsproPDU_t *rspro_gen_ConnectClientRes(const struct app_comp_id *a_cid, e_ResultCode res); |
Harald Welte | 137c440 | 2018-08-17 21:25:56 +0200 | [diff] [blame] | 27 | RsproPDU_t *rspro_gen_CreateMappingReq(const ClientSlot_t *client, const BankSlot_t *bank); |
| 28 | RsproPDU_t *rspro_gen_ConfigClientReq(const ClientSlot_t *client, uint32_t ip, uint16_t port); |
| 29 | RsproPDU_t *rspro_gen_SetAtrReq(uint16_t client_id, uint16_t slot_nr, const uint8_t *atr, |
| 30 | unsigned int atr_len); |
Harald Welte | 5d16b1c | 2018-09-23 19:25:46 +0200 | [diff] [blame] | 31 | RsproPDU_t *rspro_gen_TpduModem2Card(const ClientSlot_t *client, const BankSlot_t *bank, |
| 32 | const uint8_t *tpdu, unsigned int tpdu_len); |
| 33 | RsproPDU_t *rspro_gen_TpduCard2Modem(const BankSlot_t *bank, const ClientSlot_t *client, |
| 34 | const uint8_t *tpdu, unsigned int tpdu_len); |