Neels Hofmeyr | e9920f2 | 2017-07-10 15:07:22 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #define MSGB_CB_MGCP_TRANS_ID 0 |
| 4 | |
| 5 | struct 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 | |
| 14 | struct mgcp_inuse_endpoint { |
| 15 | struct llist_head entry; |
| 16 | uint16_t id; |
| 17 | }; |
| 18 | |
| 19 | struct 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 | |
| 27 | int mgcpgw_client_rx(struct mgcpgw_client *mgcp, struct msgb *msg); |
| 28 | |
| 29 | struct 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); |