diff options
author | Harald Welte <laforge@osmocom.org> | 2020-07-14 13:10:26 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-07-15 10:26:15 +0000 |
commit | 5d5e47ff3b05f32a3d30d201c6bc7dc57fc9307f (patch) | |
tree | 016c0872991a538ae81f0842fe2d58b018930148 /include/osmocom/e1d | |
parent | 17c80e1f557784c2a431f441ecdc772c9c30346c (diff) |
Add new E1DP_CMD_LINE_CONFIG for switching channelized/superchannel
This adds the related code to the server and client side of the CTL
interface to switch a line between CHANNELIZED and SUPERCHANNEL.
Change-Id: I765b5c3bc9e07b2353f8647e8260ff95df3727e6
Diffstat (limited to 'include/osmocom/e1d')
-rw-r--r-- | include/osmocom/e1d/proto.h | 19 | ||||
-rw-r--r-- | include/osmocom/e1d/proto_clnt.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/osmocom/e1d/proto.h b/include/osmocom/e1d/proto.h index 6711332..d8bce1f 100644 --- a/include/osmocom/e1d/proto.h +++ b/include/osmocom/e1d/proto.h @@ -2,6 +2,7 @@ * proto.h * * (C) 2019 by Sylvain Munaut <tnt@246tNt.com> + * (C) 2020 by Harald Welte <laforge@gnumonks.org> * * All Rights Reserved * @@ -44,6 +45,11 @@ * in: n/a * out: array of osmo_e1dp_ts_info * + * E1DP_CMD_LINE_CONFIG + * filter: intf (required), line (required) + * in: osmo_e1dp_line_config + * out: osmo_e1dp_line_info + * * E1DP_CMD_TS_OPEN * filter: intf (required), line (required), ts (required) * in: osmo_e1dp_ts_config @@ -55,6 +61,7 @@ enum osmo_e1dp_msg_type { E1DP_CMD_INTF_QUERY = 0x00, E1DP_CMD_LINE_QUERY = 0x01, E1DP_CMD_TS_QUERY = 0x02, + E1DP_CMD_LINE_CONFIG = 0x03, E1DP_CMD_TS_OPEN = 0x04, E1DP_EVT_TYPE = 0x40, E1DP_RESP_TYPE = 0x80, @@ -62,6 +69,12 @@ enum osmo_e1dp_msg_type { E1DP_TYPE_MSK = 0xc0, }; +enum osmo_e1dp_line_mode { + E1DP_LMODE_OFF = 0x00, + E1DP_LMODE_CHANNELIZED = 0x20, + E1DP_LMODE_SUPERCHANNEL = 0x21, +}; + enum osmo_e1dp_ts_mode { E1DP_TSMODE_OFF = 0x00, E1DP_TSMODE_RAW = 0x10, @@ -91,8 +104,13 @@ struct osmo_e1dp_intf_info { uint8_t n_lines; } __attribute__((packed)); +struct osmo_e1dp_line_config { + uint8_t mode; +} __attribute__((packed)); + struct osmo_e1dp_line_info { uint8_t id; + struct osmo_e1dp_line_config cfg; uint8_t status; /* TBD */ } __attribute__((packed)); @@ -111,4 +129,5 @@ struct msgb *osmo_e1dp_recv(struct osmo_fd *ofd, int *fd); int osmo_e1dp_send(struct osmo_fd *ofd, struct msgb *msgb, int fd); extern const struct value_string osmo_e1dp_msg_type_names[]; +extern const struct value_string osmo_e1dp_line_mode_names[]; extern const struct value_string osmo_e1dp_ts_mode_names[]; diff --git a/include/osmocom/e1d/proto_clnt.h b/include/osmocom/e1d/proto_clnt.h index 0914de7..ff2cebf 100644 --- a/include/osmocom/e1d/proto_clnt.h +++ b/include/osmocom/e1d/proto_clnt.h @@ -41,6 +41,8 @@ int osmo_e1dp_client_line_query(struct osmo_e1dp_client *clnt, 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); +int osmo_e1dp_client_line_config(struct osmo_e1dp_client *clnt, + uint8_t intf, uint8_t line, enum osmo_e1dp_line_mode mode); 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); |