* VTY command e1_line N connect-timeout T to set the connect() timeout
* use ipa_client_conn_open2 to connect with timeout
Related: SYS#6237
Change-Id: I7379102d19c172bed2aa00377d92bc885f54b640
Set the keepalive parameters to E1INP_USE_DEFAULT initially instead
of 0. Do this independent of the driver (the only driver making use of
this is ipaccess).
Closes: OS#5785
Change-Id: Ia7659c209aea0d26eb37d31e771adc91b17ae668
In order to allow configuration of pcap files per e1_line
the vty command is now (for example line 0):
e1_line 0 pcap /tmp/e1cap.pcap
in place of:
pcap /tmp/e1cap.pcap
Also ensures that a configured pcap appears in 'show running-config'
and is written to the config file on issuing 'write'
This commit deprecates e1_set_pcap_fd()
Change-Id: I316c3d6a839e84c2f52a148c6b8dd6f5933cf4bf
* HSL was never fully supported, not sure why it's in the help
* E1D was neglected to add to the help string
Change-Id: I4a5e503676618171e59550774892816b61adecae
This command is also usable at run-time to dynamically
enable / disable e1 tracing on all active lines
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I0b4251702aecd6721b9d63c320351ef6cb513454
osmo-e1d is part of the Osmocom 'software defined E1 interface,
which consists of a USB device for the actual E1 hardware interfacing,
and a daemon (osmo-e1d) implementing a libusb-based driver.
This commit adds initial support for talking to osmo-e1d using
the related libosmoe1d library. You need to use '--enable-e1d'
at configure time to enable it.
Change-Id: Ia0431c124e3b5b4108aee7b109d8c4bb0d8b45d4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The unix(7) man page recommends that sun_path is NUL-terminated
when struct sockaddr_un is passed to a bind() or connect() call.
Non-NUL-terminated paths only need to be dealt with at the
receiving end of a UNIX domain socket.
Commit b24efa5 erroneously assumed otherwise.
Change-Id: I9beecfa500db75cb679b1edcc352c893bf098b13
Fixes: b24efa551d
Related: OS#2673
When parsing the configuration, reject a socket path which
exceeds the maximum size supported by the operating system.
In unixsocket_line_update() stop copying the line's socket path to a
local buffer. The path will be copied again in osmo_sock_unix_init().
Both changes are portable; we don't assume any particular socket
path length since the size differs between implementations of Unix,
and we rely only on information from the generic sys/un.h header.
Change-Id: I36344805a825f5d0e0c9d218d438d8fd985ed9ca
Related: OS#2673
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I7771131a27d0b7ad0397715ceb3be035062bc010
Add VTY function to set the ipa bind address:
e1_input
ipa bind A.B.C.D
Add a priv pointer to struct e1inp_driver in order to communicate the bind
address parameter to ipaccess_line_update(). Add two "internal.h" functions to
get/set it in the ipa driver struct.
Add static ip_bind_addr() to use the IP address set from the VTY or, if NULL,
use "0.0.0.0". Apply in ipaccess_line_update().
This patch adds a generic keep alive configuration layer that mainly
consists of additional fields in e1_input structs and VTY commands
and extensions.
Ticket: OW#1060
Sponsored-by: On-Waves ehf
This patch removes the local 'end' and 'exit' implementations and
uses the generic ones provided by libosmocore instead, which are
enabled automatically when vty_install_default() is used.
In theory argc could be negative and this code would crash with
a null pointer dereference on the line pointer. Check for <= to
avoid this warning.
Fixes: Coverity CID 1040699
the "e1_line <0-255> port <0-255>" vty command allows the user to
set which physical port/card number should be represented by the
given virtual e1_line.
Furthermore, we now actually query the DAHDI hardware to determine the
number of ports of a given span (e.g. only 24 in case of T1) instead of
blindly assuming there are 31 timeslots on each port.
This specifically will fix T1 timeslot (/dev/dahdi/%u) calculation in
setups with multiple DAHDI spans/ports and a T1 span != span 1.
The problem with kernel LAPD mainly is that you can only have one
signalling timeslot in each E1 line/interface. However, with many BTS
attached to the same line, we need multiple signalling slots per line.
This allows the user to have a per-line selection between kernel-LAPD
(misdn) and userspace-LAPD (misdn_lapd) drivers in the config file.
It's not a good idea to confuse the two changes with each other. Moving the
Abis part into a separate library is independent from the question whether we
have talloc inside libosmocore or use a stand-alone talloc library.
This patch 's/e1inp_line_get/e1inp_line_find/g' since we need this
function name for the new refcounting scheme.
Basically, I have added a new function to clone lines that is used
by the ipaccess driver:
struct e1inp_line *e1inp_line_clone(void *ctx, struct e1inp_line *line);
And two functions to bump and decrement the refcount:
void e1inp_line_get(struct e1inp_line *line);
void e1inp_line_put(struct e1inp_line *line);
This is useful to avoid leaking virtual E1 lines in the ipaccess
case, since we have two sockets for OML and RSL respectively, we
have to release the line *once* both sockets have been closed.
Without this patch, there are cases in which we don't know if it's
time to release the virtual E1 line.
This patch also includes a fix to avoid crashing if we open a
connection with OML/RSL port without sending any ID_RESP message
(in that case, we have no chance to set the signal link). I tested
these situations with netcat.