blob: d3a78494e330b5366beef2a8975e21f61f73d63d [file] [log] [blame]
Neels Hofmeyre9920f22017-07-10 15:07:22 +02001#pragma once
2
3#define MSGB_CB_MGCP_TRANS_ID 0
4
5struct mgcpgw_client {
6 struct mgcpgw_client_conf actual;
7 uint32_t remote_addr;
8 struct osmo_wqueue wq;
9 mgcp_trans_id_t next_trans_id;
10 struct llist_head responses_pending;
11 struct llist_head inuse_endpoints;
12};
13
14struct mgcp_inuse_endpoint {
15 struct llist_head entry;
16 uint16_t id;
17};
18
19struct mgcp_response_pending {
20 struct llist_head entry;
21
22 mgcp_trans_id_t trans_id;
23 mgcp_response_cb_t response_cb;
24 void *priv;
25};
26
27int mgcpgw_client_rx(struct mgcpgw_client *mgcp, struct msgb *msg);
28
29struct mgcp_response_pending * mgcpgw_client_pending_add(
30 struct mgcpgw_client *mgcp,
31 mgcp_trans_id_t trans_id,
32 mgcp_response_cb_t response_cb,
33 void *priv);