aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/abis
AgeCommit message (Collapse)AuthorFilesLines
2024-02-12Add support for sending and receiving Sa bits, as well as some line signalsAndreas Eversberg1-0/+2
The Sa bits are required for osmo-v5. V5.2 interface must alter and detect Sa7 bit on time slot 0. 'Fastlink' multiplexers do not allow to disable link check with Sa7, so that it must be supported by osmo-v5. Requires: osmo-e1d Change-Id I2608af7bbb8092fddd68d4f3bb36b10a1100ce0f Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a
2023-05-05cosmetic: struct e1inp_ts: fix coding styleVadim Yanitskiy1-1/+1
Change-Id: I64c30579f74391cefec6cdcba71e1f9e76ec9faa
2023-05-02e1_input: add new driver callback function: line_createPhilipp Maier1-0/+3
When a line is created using e1inp_line_create, then the line data structures are initialized and the line is registered in the line list. struct e1inp_line also contains driver specific sub structs that, depending on the driver, might also need some initialization. At the moment is no way. Let's add a line_create callback that, when populated by the driver, is executed on line creation. Related: OS#5983 Change-Id: I404fa23e9b8a952be84e9716889c0dbbbc665d22
2023-02-18Add function to set Sa bits to common partAndreas Eversberg1-0/+9
Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad
2023-02-14e1_input: add timeslot type NONEPhilipp Maier1-0/+3
Allow to configure a timeslot as type E1INP_TS_TYPE_NONE. The timeslot is then put back in its unconfigured state Change-Id: I073cfaba0d5073447842f22665e213135ea3f635 Related: OS#5198
2023-02-13Add more L1 signals to common partAndreas Eversberg1-0/+22
Change-Id: I295dc340d3d3a7cbb5aba5afe807746acbcde33f
2023-02-08e1_input: add define constant for full subslot (whole E1 timeslot)Philipp Maier1-1/+3
The struct gsm_e1_subslot has a memeber e1_ts_ss, which describes the I.460 subslot to use inside an E1 timeslot. This is usually just an integer number (e.g. 0,1,2,3 for a line with 4 16kbps subslots). However it is also possible to use no subslots at all. This is encoded by setting e1_ts_ss to 0xff. When this magic number is used somewhere in the code it is not immediately obvious what it means, so lets add a define constant. Change-Id: I62725420d1cb2803b87fe5aa5e6ca1f3740be9eb Related: OS#5198
2023-01-15Add missing functions to send HDLC/RAW dataAndreas Eversberg1-0/+3
Change-Id: Iebcb99f491b945d364b1044a59638524637dd8b2
2022-12-15ipaccess: Add connect timeout in e1inp_lineDaniel Willmann1-0/+2
* 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
2022-12-15ipa: Add ipa_client_conn_open2 with connect timeout argumentDaniel Willmann1-0/+1
Related: SYS#6237 Change-Id: Iaeb672a4c981e9769443fb0cd6c8e59cb76307bd
2022-09-19e1inp_line_ipa_rsl_ts(): Return null instead of reading out of boundsPau Espin Pedrol1-1/+1
Change-Id: Ic382ab509e4541124f36df153e4b247d9cba35c5
2022-09-19ipa: Allow users closing lower layer tcp/ipa connectionsPau Espin Pedrol1-1/+2
This is useful for users to abort connections which are in "connecting" state, since the higher layer struct e1inp_sign_link is not provided to the user until the TCP+IPA handshake in the socket becomes fully established (sign_link_up() callback). This is intended for osmo-bts: when something fails and may enter into SHUTDOWN state, it is desirable to close new RSL links (sockets) which are in progress to connect, while it waits for a while to complete shutdown (power ramping down, etc.). Change-Id: Ia6418321f3b6f1f7274efd414625a4b10a09a362
2021-04-29ipa: Introduce support for user-specific DSCP and priorityHarald Welte1-0/+4
This adds new members to struct ipa_server_link and ipa_client_conn, which can be set by the user before ipa_client_conn_open() or ipa_server_link_open() to ensure DSCP / priority values are applied from the first outgoing packet onwards. Change-Id: I5ab22d35d9b11eca47d9ea12208e5589a1a5713c Depends: libosmocore.git If22988735fe05e51226c6b091a5348dcf1208cdf
2021-04-13Configure E1 pcap file per lineKeith1-0/+7
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
2021-02-03e1_input: Support I.460 timeslot typeHarald Welte1-1/+6
Unlike the legacy TRAU mode, this only adds I460 mux/demux, without any TRAU frame synchronization. The user must still be adding the actual sub-channels using osmo_i460_subchan_add() depending on his requirements. Change-Id: I44da6dfec77ef475adb35001a0e4fa11d549aa02
2020-07-15e1_input: Use osmo_use_count in e1inp_linePau Espin Pedrol1-4/+11
osmo_use_count is available since libosmocore 1.1.0 release, so bump required libosmocore version in autotools and packages. struct e1inp_line field refcnt is kept in order to keep ABI compatibility accessing struct fields. The new use_count is added at the end. Size of struct changing is fine since it is allocated through an API and a pointer should be used by clients. e1inp_line_clone API is changed but it's not used by anyone outside libosmo-abis, so it's fine. Related: OS#4624 Change-Id: I0658b2e9c452598025cc0f1d0b060076171767cc
2020-07-15cosmetic: e1_input.h: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: Ie323a28409a44aeeef6646b247f244d278758f66
2020-06-09lapd: Always print context information when loggingHarald Welte2-1/+12
Historically, OpenBSC has primarily been used with setups that have a single E1 based BTS connected. This meant that an error message on the E1 LAPD implicitly has to be related to that single BTS. However, in more comprehensive setups, there may be many BTSs on many E1 lines with many signaling slots. At this point, it's important to know which line/timeslot/tei/sapi a given log message relates to. This patch introduces related log context. Change-Id: Ib81a749ae24013b17caaf5fd64ccd9acbbc3ce08 Requires: libosmocore.git Change-Id Ie6742843fff809edffcac24c4dce4edf66bc71be Related: OS#1938
2020-05-11trau_frame.h: Fix definition of TRAU_FT_OM_UPHarald Welte1-1/+1
Change-Id: Ifd3393fca2ce65f93e8ec6c150474011a5713ccd
2020-05-11subchan_demux: Use ubit_t where appropriateHarald Welte1-2/+2
the subchan_demux code predates ubit_t; let's use it to clarify certain pointers refer to arrays of unpacked bits. Change-Id: I944f05473954920d57e12d5514cf928fc78f2ea4
2020-05-11trau_frame: use 'ubit_t' for unpacked bitsHarald Welte1-8/+9
Change-Id: I497dbb7e9e199c6276e585b977bd941a2b442b3b
2020-05-10subchan_demux: Use 'ubit_t' for unpacked bit buffer; use constHarald Welte2-3/+4
Change-Id: Ia082b9fddf03d02afd007825a1588a3ef0dbedae
2020-01-24add ipa ping/pong keepalive for OML/RSL links between bts and bscEric Wild1-1/+6
Patch-by: ewild, osmith Related: OS#4070 Change-Id: I30e3bd601e55355aaf738ee2f2c44c1ec2c46c6a Depends: (libosmo-abis) Ie453fdee8bfd7fc1a3f1ed67ef0331f0abb1d59b
2020-01-12e1d: Initial osmo-e1d supportSylvain Munaut1-0/+4
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>
2020-01-12introduce and use logging macros with context on E1 line / timeslotHarald Welte1-0/+6
Change-Id: I447a2360757fed97ed50f9db1e2efbf2f90e46a0
2019-11-08ipa: Allow setting local addr and port for struct ipa_client_connPau Espin Pedrol1-1/+12
Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843
2019-07-21extend the ipa keepalive fsmEric Wild1-4/+8
The new and improved fsm supports multipe use cases: 1) plain old ipa server/client operation 2) ipa client/server operation with custom send callback (i.e. to bypass the tx queue) 3) all of the above + custom timeout callback 4) fully generic operation that will pass opaque data to the callbacks The current code will always kill the fsm and deallocate it upon timeout, so the timeout callback will now return a value: 1 means the fsm will be automatically terminated, 0 means no action, which allows manually stopping/starting the fsm to reuse it. Change-Id: Ie453fdee8bfd7fc1a3f1ed67ef0331f0abb1d59b
2019-03-19Add IPA keep-alive FSM implementationHarald Welte1-0/+36
The IPA keep-alive FSM code takes care of periodically transmitting and IPA CCM PING and expecting an IPA CCM PONG in return. Change-Id: I2763da49a74de85046ac07d53592c89973314ca6
2018-10-03e1_input.h: Set correct type for input_signal_data->link_typePau Espin Pedrol1-1/+1
link_type field holds values from link->type as set in e1inp_int_snd_event(). Change-Id: Iaa33b793f89f2d16c9d949503c5ecc195bbcd2a4
2018-10-03ipaccess: Simplify handling of ipaccess e1line tsPau Espin Pedrol1-0/+2
Handle encoding specifics behind a macro to make code easier to understand and follow. Change-Id: Ibf251673bff95b7a0b066b19ef4dc6c0f94fff6b
2018-08-28ipaccess: Allow passing return code in e1inp_line_ops->sign_link()Pau Espin Pedrol1-0/+1
Change-Id: Ia83eead3622d86f55c1dc5e91acc78dde73a0367
2018-08-28ipa: Allow signalling fd destroyed in ipa_server_conn_readPau Espin Pedrol1-0/+1
Similar to what we do in other osmo_fd cb, check for read_cb returning -EBADF and in that case don't attempt using the osmo_fd anymore, either because the fd was already closed (no need to then signal WRITE) or because osmo_fd struct itself has been freed. Change-Id: I4b968b72285f23a9552519cea67398a43d5003d2
2018-08-28ipa: Allow signalling fd destroyed in ipa_client_readPau Espin Pedrol1-0/+1
Similar to what we do in other osmo_fd cb, check for read_cb returning -EBADF and in that case don't attempt using the osmo_fd anymore, either because the fd was already closed (no need to then signal WRITE) or because osmo_fd struct itself has been freed. Change-Id: I0e449a2bdf7f0411feeccd262cd731ca6fba3fc1
2018-04-06e1_input.h: Remove dead declaration of unexistent API ipaccess_setupPau Espin Pedrol1-3/+0
The function was removed long time ago in af8ed983ffa1f750e3972e0fb850c16249943543. Change-Id: I34debe01d1d8b6f4420354666d2a25807dacc25c
2017-05-25Add value_string for input signal names (e1inp_signal_names)Harald Welte1-0/+2
Change-Id: I1662d4a969d2d12677646f3120b25be9a20c6d22
2017-03-08add basic unixsocket supportAlexander Couzens2-0/+35
Allow to connect to a unix socket for communicating with LAPD. Change-Id: Ia5723b09a5c68a0505829dc732def981e60a907a
2016-11-16lapd_pcap.h: Add missing #include linesHarald Welte1-0/+3
we reference 'struct msgb' and mode_t, so we have to #include the right header files. Change-Id: Iac8f905182b60782202bdf75e04d47ea89dc3863
2016-11-03e1_input.h: add missing extern for value string arraysArran Cudbard-Bell1-2/+2
Mark two value string arrays as extern, so symbols aren't created for each source file that includes the headers. Tweaked-by: nhofmeyr (commit log) Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org> Change-Id: Iebf4b3922a48ca2cc20d478aba06224dd89d38cb
2016-11-02lapd: adding support for ericsson's lapd dialectPhilipp1-0/+9
Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses a link establishment method that differs from the standard. While the BSC is transmitting sabm frames on one specific timeslot, the BTS will periodically scan through all timeslots to check for incoming sabm frames. When the BTS detcts the sabm fames on one of the timeslots it will stay there and continue to commence the link establishment. The described procedure requires a slightly modified lapd profile, the t200 retransmission timeout has to be configured to exactly 300 msek. Otherwise the link establishment will fail. Since the BTS will switch from timeslot to timeslot most of the sabm frames will not be seen by the BTS, so the maximum retransmission has to be increased. This patch suggests a maximum retry count of 300, which is an educated guess and has worked fine during our tests. Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5
2016-10-17Add HDLC timeslot modeHarald Welte1-1/+13
This is useful for protocols that use HDLC framing for signalling on E1 timeslots, but which don't use LAPD inside (our E1INP_TS_TYPE_SIGN). Examples are particularly a MTP2/MTP3 SS7 stack, like it is used on the A interfaces or on the core network interfaces of classic circuit-switched networks. Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6
2016-10-17Implement new 'raw' input type for E1 timeslotsHarald Welte1-3/+12
In the past, the A-bis E1 input system only unederstood LAPD signalling time-slots and trau-slots with 16kBps sub-slots. This adds the notion of a 'raw' transparent 64kBps slot, without any furthe de-multiplexing nor any HLDC inside. Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b
2016-10-16Convert e1inp_{sign,ts}type_name() to use struct value_stringHarald Welte1-0/+2
Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0
2016-10-16e1_input: Add E1 timeslot number to input_signal_dataHarald Welte1-0/+1
It is quite useful for the signal receiver to know on which of the many E1/T1 timeslots a given event (like a 'link down' event) has happened. The line number, TEI and SAPI are isnuficcient in case there are multiple signalling TS in the line. Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a
2016-10-16remove non-existant e1inp_update_ts() from e1_input.hHarald Welte1-3/+0
This function didn't exist ever since the inception of libomso-abis. Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3
2016-07-04Add osmo_pcap_lapd_set_fd() functionHarald Welte1-0/+1
This way the caller can hand in an already-open file descriptor, rather than calling osmo_pcap_lapd_open() with a file path name. Change-Id: Ic7193907a96b0e2284cb6a8a942d2bf0fb95d7e4
2016-04-29ipa_server_conn: Add server-side CCM handlingHarald Welte1-0/+3
An ipa_server implementation may call ipa_server_conn_ccm for the CCM processing on the server side of the connection. This function in turn will call a conn->ccm_cb() function for messages to be handled by the server implementation, such as the ID_RESP message, which contains the Unit ID of the client that has just connected.
2016-04-29ipa_server_conn: Add remote (peer) address to structHarald Welte1-0/+3
This is better than every implementation calling getpeername() on its own.
2016-02-25ipa driver: make bind address vty configurableNeels Hofmeyr1-0/+1
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().
2015-11-07export lapd_tei_alloc(), used in libosmo-netifAlexander Huemer1-0/+2
2015-01-18ipa: Add API to clear the tx queueHolger Hans Peter Freyther1-0/+1
Jacob noticed that after a re-connect old messages would be sent. This can be the wanted behavior but add a method that allows a caller to clear the tx queue. The implementation has not been verified and there is no existing unit test where I could easily add this code to.