blob: 726eea135c5908948ad0d2e1e8fcacae1eff5d68 [file] [log] [blame]
Philipp Maier3f4a4cb2021-07-26 13:20:05 +02001#pragma once
2
Oliver Smithcb922b62022-10-14 16:42:03 +02003#include <stdbool.h>
4
Pau Espin Pedrolc415ed52023-09-22 18:02:59 +02005#include <osmocom/vty/vty.h>
6
Philipp Maier3f4a4cb2021-07-26 13:20:05 +02007struct mgcp_client;
8struct mgcp_client_pool;
Pau Espin Pedrol5d8b5b02022-10-13 17:52:40 +02009struct mgcp_client_pool_member;
Philipp Maier3f4a4cb2021-07-26 13:20:05 +020010
11struct mgcp_client_pool *mgcp_client_pool_alloc(void *talloc_ctx);
Pau Espin Pedrol5d8b5b02022-10-13 17:52:40 +020012
Philipp Maier3f4a4cb2021-07-26 13:20:05 +020013void mgcp_client_pool_vty_init(int parent_node, int mgw_node, const char *indent, struct mgcp_client_pool *pool);
Pau Espin Pedrol7881f7d2022-10-18 14:13:04 +020014int mgcp_client_pool_config_write(struct vty *vty, const char *indent);
Philipp Maier3f4a4cb2021-07-26 13:20:05 +020015unsigned int mgcp_client_pool_connect(struct mgcp_client_pool *pool);
16void mgcp_client_pool_register_single(struct mgcp_client_pool *pool, struct mgcp_client *mgcp_client);
Oliver Smith833ab4b2023-04-04 14:13:30 +020017bool mgcp_client_pool_empty(const struct mgcp_client_pool *pool);
Pau Espin Pedrol5d8b5b02022-10-13 17:52:40 +020018
Philipp Maier3f4a4cb2021-07-26 13:20:05 +020019struct mgcp_client *mgcp_client_pool_get(struct mgcp_client_pool *pool);
20void mgcp_client_pool_put(struct mgcp_client *mgcp_client);
Pau Espin Pedrol5d8b5b02022-10-13 17:52:40 +020021
22struct mgcp_client_pool_member *mgcp_client_pool_find_member_by_nr(struct mgcp_client_pool *pool, unsigned int nr);
23struct mgcp_client *mgcp_client_pool_member_get(struct mgcp_client_pool_member *pool_member);
24bool mgcp_client_pool_member_is_blocked(const struct mgcp_client_pool_member *pool_member);