annotate include/tmgw_ctrl.h @ 30:496f359226ab

include: constant and interface headers for themwi-mgw
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 06 Jul 2022 22:26:09 -0800
parents
children 7dae2bae56a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file defines the ad hoc control interface
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * to themwi-mgw over a dedicated local socket.
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 struct tmgw_ctrl_req {
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 uint32_t opcode;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 uint32_t transact_ref;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 uint32_t ep_id;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 uint32_t setup_mask;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 struct sockaddr_storage gsm_addr;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 uint32_t gsm_payload_type;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 uint32_t gsm_payload_msg_type;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 struct sockaddr_storage pstn_addr;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 uint32_t pstn_payload_type;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 uint32_t fwd_mode;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 };
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #define TMGW_CTRL_OP_CRCX 1
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #define TMGW_CTRL_OP_MDCX 2
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #define TMGW_CTRL_OP_DLCX 3
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #define TMGW_CTRL_MASK_GSM_CONN 0x0001
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #define TMGW_CTRL_MASK_PSTN_CONN 0x0002
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #define TMGW_CTRL_MASK_FWD_MODE 0x0004
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 struct tmgw_ctrl_resp {
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 uint32_t transact_ref;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 uint32_t res;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 uint32_t ep_id;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 struct sockaddr_storage gsm_addr;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 struct sockaddr_storage pstn_addr;
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 };
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #define TMGW_RESP_OK 0
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #define TMGW_RESP_ERR_PROT 1
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #define TMGW_RESP_ERR_RSRC 2
496f359226ab include: constant and interface headers for themwi-mgw
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define TMGW_RESP_ERR_UNKNOWN 3