This new mode (can be enabled per account) will force the E1OIP
protocol to always send all timeslots, i.e. not do any of the
suppression of timeslots that do not exhibit any change to the
previous E1 frame.
Change-Id: I6d17d3829b2c1c62e701a1d8c021d93d93593613
When the socket is closed due to a connection loss, we currently use
close(). This is not enough since this will not remove the file
descriptor from the select loop. Let's use osmo_fd_close.
Related: OS#5983
Change-Id: I702b944baf2ebbcc84b6a211e245a4a41627bde6
When osmo-e1d is terminated the socket file descriptor on the client
side will get permanent POLLHUP events. This means that the registered
callback gets called with flags OSMO_FD_READ but the received data will
be of length zero. We must detect this situations and close the file
descriptor on connection loss. Otherwise we would get called over and
over again in an endless loop, resulting in 100% CPU usage.
Related: OS#5983
Change-Id: I3e1a29a9701a9432f58ef7cfedc32c916203017a
The function prototype for osmo_e1dp_client_destroy has a different
parameter name in its signature in proto_clnt.h than in prto_clnt.c,
let's rename it so that both are coherent. (srv -> clnt)
Change-Id: I8bd4fbdf2bda332870da1b915a7898c396a85b0f
DAHDI trunkdev is a newly-introduced 'virtual trunk' character device
which is used instead of a real hardware driver. This means that an
application (such as osmo-e1d) can implement a virtual E1 trunk and
receive and transmit E1 frame data which is exposed to DAHDI users
just like the data from a real physical E1 span.
In order to build DAHDI trunkdev support into osmo-e1d, you will need
a special fork of dahdi containing the required support, currently
the laforge/trunkdev branch of the following repository:
https://gitea.osmocom.org/retronetworking/dahdi-linux
Change-Id: Ib15a7313fcd63e1ed9f2f5b349df967bc4335ec2
Fix that the file only got installed to /usr/share as example, but not
to /etc/osmocom in the rpm packaging.
Related: OS#5817
Change-Id: I4ffa23f7ab26b7ed3cba04aed4f57eeaa3edca31
Adjust OSMOCONF_FILES, so only osmo-e1d.cfg of the examples gets
installed to /etc/osmocom/. All other examples still get installed to
/usr/share, as it is intended.
Related: OS#5817
Change-Id: Ic449b7d38ed50add0164f056574d4da47530eb49
If we actually expect 3rd party applications to use libosmo-e1d to talk
to osmo-e1d, we'd better add some basic documentation on how this API
shall be used.
Change-Id: Ib4a97045bca276fbd3892f801898a436de7dc39b
This likely means it's not an e1-tracer after all, or it's an old
firmware that doesn't yet expose the e1d-compatible USB configuration.
Related: OS#5734
Change-Id: If5a9bc20084d84885d5d97b4f982e94801612d24
This exposes the existing capability of force-opening a timeslot via a
command-line argument.
Related: OS#5735
Change-Id: Ieefc89f2e48e9124ae744a587739ff3948110944
This doesn't work, as the mux_demux.c code doesn't pass the TS0 bitstream
to users anyway. So let's reject clients attempting this.
Change-Id: Idb2d20da7de72dad38ae2fccdd7630677d0f0cc8
Recent work on the e1-tracer firmware is introducing a set of USB
descriptors (as configuration 2) that are mostly compatible to how
osmo-e1d talks to icE1usb.
The main difference is that there's only one ISO IN endpoint per USB
interface, and no ISO OUT or ISU FB endpoints. So we introduce some
minor adjustments here to accommodate that.
Related: OS#5733
Closes: OS#5734
Change-Id: I855e18c0f229bd473123f96303e60ab2de90677f
If a line is not auto-created, there is no point on claiming the
matching interface and even less point setting the alt setting that
will try to use USB isoc bandwith.
With this you can no use only line 1 and not line 0 of a ice1usb
for instance. While previously it would still "enable" line 0 and
then line 1 would fail because on BW issues most of the case.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Iea5d72272f11875e7a32c78b60c188590deda831
This can happen if the specified device in the config isn't plugged
in for instance, no line is created ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I594463591f2945a04ccd708f16788034cc1dfc57
This call takes its argument in wValue rather than as payload
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ibeebe3184a4744bd0cd9f5a19db84c12fab18806
Because we want to handle older firmwares too, we need to excepect
we might get a smaller structure !
(We can't get a larger one since the wLength we send is limited to
the structure we know)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I4222bf22267f8343abf1e97546111ceb1c299846
Found by gcc (Debian 10.2.1-6) 10.2.1 20210110, which fails the build
with --enable-werror because of this.
Change-Id: Ib717df376a4b414f787168c2c632f04f0c51271b
This adds VTY commands at the 'account' level to configure those
settings. They will only become active on the next [re]connect
of the line.
Change-Id: Ic455ef0ef82867db512e2ffdff24d9dd42d47eeb
As soon as an OCTOI connection gets into ACTIVE state, send a
ECHO_REQ every 10s and compute the RTT at the time of receiving
the response.
Contrary to the initial idea, the stat item contains the RTT (round trip
time) measured in micro-seconds. Changing this is not a problem as so
far the RTT was always reported as '0', and 0ms == 0us.
Change-Id: Id331319bff1cf6896fee37acc45846a2491ca92d
If the caller specifies zero-length data or a NULL pointer, don't
attempt to call memcpy() on that.
Change-Id: I5f5ed937643162d6ef6ce0cf2908432c007943c1
Let's allow setting IP DSCP and socket priority via the VTY.
Note that you must still manually add a kernel egress QoS map from
socket priority to IEEE P802.1p PCP (Priority Code Point) like this:
ip link set dev eth0.7 type vlan egress-qos-map 0:0 1:1 5:5 6:6 7:7
This will create 1:1 mappings for socket priorities 0, 1, 5, 6 and 7 to
the respective IEEE PCP. A higher PCP typically means higher priority,
where voice is traditionally using "5".
Change-Id: Ic5a6c5a0ec67beb40be4ca95326aca5072a28958