Philipp Maier | 87bd9be | 2017-08-22 16:35:41 +0200 | [diff] [blame] | 1 | /* Message connection list handling */ |
| 2 | |
| 3 | /* |
| 4 | * (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 5 | * All Rights Reserved |
| 6 | * |
| 7 | * Author: Philipp Maier |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU Affero General Public License as published by |
| 11 | * the Free Software Foundation; either version 3 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU Affero General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Affero General Public License |
| 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #pragma once |
| 25 | |
| 26 | #include <osmocom/mgcp/mgcp_internal.h> |
| 27 | #include <osmocom/core/linuxlist.h> |
| 28 | #include <inttypes.h> |
| 29 | |
Philipp Maier | cede2a4 | 2018-07-03 14:14:21 +0200 | [diff] [blame] | 30 | /* RTP connection related counters */ |
| 31 | enum { |
| 32 | IN_STREAM_ERR_TSTMP_CTR, |
| 33 | OUT_STREAM_ERR_TSTMP_CTR, |
| 34 | RTP_PACKETS_RX_CTR, |
| 35 | RTP_OCTETS_RX_CTR, |
| 36 | RTP_PACKETS_TX_CTR, |
| 37 | RTP_OCTETS_TX_CTR, |
| 38 | RTP_DROPPED_PACKETS_CTR |
| 39 | }; |
| 40 | |
Philipp Maier | 87bd9be | 2017-08-22 16:35:41 +0200 | [diff] [blame] | 41 | struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, |
Philipp Maier | ffd75e4 | 2017-11-22 11:44:50 +0100 | [diff] [blame] | 42 | enum mgcp_conn_type type, char *name); |
Philipp Maier | 01d24a3 | 2017-11-21 17:26:09 +0100 | [diff] [blame] | 43 | struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); |
Philipp Maier | 87bd9be | 2017-08-22 16:35:41 +0200 | [diff] [blame] | 44 | struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, |
Philipp Maier | 01d24a3 | 2017-11-21 17:26:09 +0100 | [diff] [blame] | 45 | const char *id); |
| 46 | void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); |
Philipp Maier | 87bd9be | 2017-08-22 16:35:41 +0200 | [diff] [blame] | 47 | void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); |
| 48 | void mgcp_conn_free_all(struct mgcp_endpoint *endp); |
| 49 | char *mgcp_conn_dump(struct mgcp_conn *conn); |
| 50 | struct mgcp_conn *mgcp_find_dst_conn(struct mgcp_conn *conn); |