annotate include/rtp_alloc_if.h @ 5:4a5560ef0807

include/rtp_defs.h: #include <stdint.h> dependency
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 27 May 2024 20:50:51 +0000
parents 764bbf72392f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file defines the ad hoc control interface
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * to themwi-rtp-mgr over a dedicated local socket.
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #pragma once
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
4
764bbf72392f include/rtp_alloc_if.h: #include system headers for used types
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
8 #include <stdint.h>
764bbf72392f include/rtp_alloc_if.h: #include system headers for used types
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
9 #include <sys/socket.h>
764bbf72392f include/rtp_alloc_if.h: #include system headers for used types
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
10
0
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 struct rtp_alloc_req {
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 uint32_t transact_ref;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 uint32_t ep_type;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 };
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #define RTP_ALLOC_DO_GSM1 1
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #define RTP_ALLOC_DO_PSTN 2
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #define RTP_ALLOC_DO_GSM2 4
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #define RTP_ALLOC_TYPE_GSM RTP_ALLOC_DO_GSM1
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #define RTP_ALLOC_TYPE_PSTN RTP_ALLOC_DO_PSTN
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #define RTP_ALLOC_TYPE_GSM2PSTN (RTP_ALLOC_DO_GSM1 | RTP_ALLOC_DO_PSTN)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #define RTP_ALLOC_TYPE_GSM2GSM (RTP_ALLOC_DO_GSM1 | RTP_ALLOC_DO_GSM2)
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 struct rtp_alloc_resp {
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 uint32_t transact_ref;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 uint32_t res;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 struct sockaddr_storage gsm_addr;
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 struct sockaddr_storage pstn_addr; /* also used for 2nd GSM */
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 };
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #define RTP_ALLOC_OK 0
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #define RTP_ALLOC_ERR_PARAM 1
9e7e9ba22e42 starting project with public header files
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #define RTP_ALLOC_ERR_RSRC 2