libosmo-e1d  0.5.0
Osmocom e1d client library
proto_clnt.h
Go to the documentation of this file.
1 /*
2  * proto_clnt.h
3  *
4  * (C) 2019 by Sylvain Munaut <tnt@246tNt.com>
5  *
6  * All Rights Reserved
7  *
8  * SPDX-License-Identifier: LGPL-3.0-or-later
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published
12  * by the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program; if not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #pragma once
25 
26 #include <osmocom/core/msgb.h>
27 
28 #include <osmocom/e1d/proto.h>
29 
30 struct osmo_e1dp_client;
31 
32 struct osmo_e1dp_client *osmo_e1dp_client_create(void *ctx, const char *path);
34 
36  struct osmo_e1dp_intf_info **ii, int *n,
37  uint8_t intf);
39  struct osmo_e1dp_line_info **li, int *n,
40  uint8_t intf, uint8_t line);
42  struct osmo_e1dp_ts_info **ti, int *n,
43  uint8_t intf, uint8_t line, uint8_t ts);
45  uint8_t intf, uint8_t line, enum osmo_e1dp_line_mode mode);
47  uint8_t intf, uint8_t line, uint8_t ts,
48  enum osmo_e1dp_ts_mode mode, uint16_t read_bufsize);
50  uint8_t intf, uint8_t line, uint8_t ts,
51  enum osmo_e1dp_ts_mode mode, uint16_t read_bufsize);
Specification of the IPC protocol used on the CTL UNIX domain socket between osmo-e1d and its client ...
uint8_t mode
Definition: proto.h:0
uint8_t line
Definition: proto.h:5
osmo_e1dp_line_mode
e1d CTL protocol line mode.
Definition: proto.h:70
uint16_t read_bufsize
Definition: proto.h:2
uint8_t intf
Definition: proto.h:4
osmo_e1dp_ts_mode
e1d CTL protocol timeslot mode.
Definition: proto.h:82
uint8_t ts
Definition: proto.h:6
int osmo_e1dp_client_line_query(struct osmo_e1dp_client *clnt, struct osmo_e1dp_line_info **li, int *n, uint8_t intf, uint8_t line)
Query osmo-e1d for information about a specific E1 line.
Definition: proto_clnt.c:271
void osmo_e1dp_client_destroy(struct osmo_e1dp_client *srv)
Destroy a previously created client.
Definition: proto_clnt.c:147
int osmo_e1dp_client_ts_query(struct osmo_e1dp_client *clnt, struct osmo_e1dp_ts_info **ti, int *n, uint8_t intf, uint8_t line, uint8_t ts)
Query osmo-e1d for information about a specific E1 timeslot.
Definition: proto_clnt.c:311
struct osmo_e1dp_client * osmo_e1dp_client_create(void *ctx, const char *path)
Create a new client talking to the CTL server socket of osmo-e1d.
Definition: proto_clnt.c:116
int osmo_e1dp_client_ts_open_force(struct osmo_e1dp_client *clnt, uint8_t intf, uint8_t line, uint8_t ts, enum osmo_e1dp_ts_mode mode, uint16_t read_bufsize)
Force-Open a specific E1 timeslot of osmo-e1d.
Definition: proto_clnt.c:440
int osmo_e1dp_client_intf_query(struct osmo_e1dp_client *clnt, struct osmo_e1dp_intf_info **ii, int *n, uint8_t intf)
Query osmo-e1d for information about a specific E1 interface.
Definition: proto_clnt.c:232
int osmo_e1dp_client_ts_open(struct osmo_e1dp_client *clnt, uint8_t intf, uint8_t line, uint8_t ts, enum osmo_e1dp_ts_mode mode, uint16_t read_bufsize)
Open a specific E1 timeslot of osmo-e1d.
Definition: proto_clnt.c:421
int osmo_e1dp_client_line_config(struct osmo_e1dp_client *clnt, uint8_t intf, uint8_t line, enum osmo_e1dp_line_mode mode)
Configure a specific E1 line in osmo-e1d.
Definition: proto_clnt.c:348
Internal representation of client program connected to the CTL socket.
Definition: proto_clnt.c:69
void * ctx
talloc context
Definition: proto_clnt.c:70
Information about an E1 interface.
Definition: proto.h:122
Information about an E1 line.
Definition: proto.h:133
Information about an E1 timeslot.
Definition: proto.h:147