blob: e477a47ad7ce5b3b6574b716fab3808723af778d [file] [log] [blame]
Philipp Maier87bd9be2017-08-22 16:35:41 +02001/* Endpoint types */
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
26struct sockaddr_in;
27struct mgcp_conn;
28
29/* Callback type for RTP dispatcher functions
30 (e.g mgcp_dispatch_rtp_bridge_cb, see below) */
31typedef int (*mgcp_dispatch_rtp_cb) (int proto, struct sockaddr_in * addr,
32 char *buf, unsigned int buf_size,
33 struct mgcp_conn * conn);
34
35/*! MGCP endpoint properties */
36struct mgcp_endpoint_type {
37 /*!< maximum number of connections */
38 int max_conns;
39
40 /*!< callback that defines how to dispatch incoming RTP data */
41 mgcp_dispatch_rtp_cb dispatch_rtp_cb;
42};
43
44/*! MGCP endpoint typeset */
45struct mgcp_endpoint_typeset {
46 struct mgcp_endpoint_type rtp;
47};
48
49/*! static MGCP endpoint typeset (pre-initalized, read-only) */
50extern const struct mgcp_endpoint_typeset ep_typeset;