Commit Graph

38 Commits

Author SHA1 Message Date
Harald Welte df9e44826e Bump version: 0.0.1.2-7731 → 0.1.0
Change-Id: I1a73ef1c6db1e5ccec4fbe29a94a26bce4f5d1a9
2020-07-01 12:29:43 +02:00
Harald Welte 5b482fb4ca debian: Remove dependency to libosmo-abis; remove explicit libosmocore version
Change-Id: Icee48755142a90dac9843c9230a3b23551815fc1
2020-07-01 12:28:30 +02:00
Harald Welte 7731a33372 debian: Fix packaging of libosmo-e1d
dpkg-shlibdeps: error: cannot find library libosmo-e1d.so.0 needed by debian/osmo-e1d/usr/bin/osmo-e1d (ELF format: 'elf32-i386' abi: '0101000300000000'; RPATH: '')
Change-Id: Iaacd17aa69e56b21b925710d63b699c2e7ede12a
2020-07-01 11:13:03 +02:00
Harald Welte cf3ba8fc2a debian/control: Add missing dependency to libusb-1.0-0-dev
Change-Id: I65c4693ea88a0417574258d4df99c6ec1755ee0d
2020-07-01 10:56:45 +02:00
Harald Welte e1145c53e3 add systemd service/unit
Change-Id: I956cd9e7ff378a6372524175a1c83416be45610b
2020-07-01 08:29:39 +00:00
Harald Welte d32bd186a3 debian packaging
Change-Id: Idac376e92f95ab8beef506e9617227f1c7277838
2020-07-01 08:29:39 +00:00
Harald Welte 9c8ee9361f proto*.[ch]: Don't refer to GPL if license is LGPL
while at it, also change from physical address to URL.

Change-Id: I60a25f802a7b4535f7d47bb04b9f36194ea4e290
2020-07-01 08:07:03 +00:00
Harald Welte 6e027c2cb6 add git-version-gen to EXTRA_DIST
Change-Id: I874e7c323e0700c3282cb992dfaf1853bdc3a8c8
2020-06-30 21:46:17 +02:00
Harald Welte 171e7a3a06 add example configurations
Change-Id: I25c28f7a1eeb4deaebba3b2fd593cbbdceb1fa07
2020-06-30 21:40:52 +02:00
Harald Welte de22257ee1 vty: Print actual driver name instead of FIXME
Change-Id: I6f909cc493417f9e156672024f879a7294b4d816
2020-06-30 19:44:09 +02:00
Harald Welte c3cefbb396 Add osmo-e1d-pipe utility
This adds the 'osmo-e1d-pipe' utlility program, which can be
used as a command-line client to open a given E1 timeslot and
connect it to stdin/stdout.  This in turn allows to rediect
file input/output via the shell.

Change-Id: Ib9d55af786c87e15465b8e73493680b35afb5913
2020-06-30 19:44:09 +02:00
Harald Welte 27b271729f Add virtual pair of E1 interfaces
The idea is to generate a pair of virtual E1 interfaces (each with
identical number of lines), where each line A:n is connected to line B:n
of the pair and vice-versa.

This allows to test E1 using applications back to back against each
other, without any physical E1 circuits in between.

Change-Id: If42c959556b17d543762546eb45dd69d25f715f2
2020-06-29 23:10:33 +02:00
Harald Welte 9fc4d5f4e2 actually set the back-pointer from timeslot to line
'struct e1_ts' always had a back-pointer to the line it is part of,
but apparently this was never initialized so far.

Change-Id: I5e6c8189bf5aa4af26d6cd6c6d288a149ed7fa66
2020-06-29 23:10:33 +02:00
Harald Welte bbd39359eb extend logging (log more noteworthy events)
Let's log some more events that might happen.

Change-Id: I37fd290f0f0621fbf6e20e33fa709efc14df94c7
2020-06-29 23:10:31 +02:00
Harald Welte 4b1f06a47f Always log context (interface/line/timeslot) when available
We always want to know as much context as possible.  Which exact
timeslot on which line of which interface ha logged something?

Change-Id: I3d8909b396928ed3c023b8ac47fa9ec72c99e681
2020-06-29 23:09:27 +02:00
Harald Welte c98dbc2ba3 close timeslot socket if read or write returns negative
If the user application has closed the timeslot socket, we will
get error returns from read/write calls, which we must use to clean
up the daemon-side state for this timeslot.

Change-Id: I2e3e5010f36e916b4c8908af91447b3d3661123f
2020-06-29 23:09:25 +02:00
Harald Welte 54e9773d34 proto.h: Share default socket path between client and daemon
This way clients and daemon don't have to be manually configured
to use the same default socket path.

Change-Id: Ibc5bc1bc59056ebaf0f6072de0ff08c2f3bb5457
2020-06-29 22:14:05 +02:00
Harald Welte 0f41cb0e06 add e1_line_destroy() / e1_intf_destroy() functions
Change-Id: I5425d22288d7239063d621bddfe81e9cf21f1a5b
2020-06-29 22:12:42 +02:00
Harald Welte 65b22c0b75 Export _e1d_ts_stop() function inside daemon
Change-Id: If3ceca05d4fdf1e33d926061f30fce6bfa8e0357
2020-06-29 22:12:42 +02:00
Harald Welte 8a9392ff44 ctl.c: Fix off-by-one: FD=0 is a valid file descriptor
It is possible that fd=0 (stdin) is closed in a daemon scenario, and
subsequently fd=0 is reused for other files/sockets.

Change-Id: Id8279f04373e891009224bab34a4d1d886520fea
2020-06-29 22:12:42 +02:00
Harald Welte b3414ed4cc _e1_line_new(): Initialize timeslot fd to -1
Otherwise we might up ending up doing plenty of unintended close(0)
in _e1d_ts_stop()

Change-Id: I6b88a3ff7d650a0caa242e6ac60d7778564e237c
2020-06-29 22:12:42 +02:00
Harald Welte 9bedf75f2b introduce notion of 'driver'
Change-Id: Ic168e25f2622b397bac2c133ec35f4a0a38f859b
2020-06-29 22:12:42 +02:00
Harald Welte 760097bfb0 change list ordering for list of interfaces / lines
By using llist_add_tail(), we add new elements at the end of the list,
rather than inserting at front.  Among other things, this has the added
benefit that when the VTY prints information on lines, they are printed
in numerically ascending orrder (0,1,2, ...) and not the reverse.

Change-Id: I07a6ba706f855a29b4e33b1a6b008e0d2f11b6f3
2020-06-29 22:12:42 +02:00
Harald Welte 9144ba0373 VTY interface support
Let's add a VTY interface on TCP port 4269.  The purpose is - for now -
not for configuration storage, but for state introspection.

Change-Id: I47b6e4efaad52e68e2b50a7993076f3706f86628
2020-06-29 22:12:42 +02:00
Harald Welte 0b621b43e7 libosmo-e1d: Add value_string for msg_type and mode
Change-Id: I72807f8eb2dcfaaba2819969c7aa62a4a1a79966
2020-06-29 17:19:14 +02:00
Harald Welte 946eaba82b move from printf() debug output to libosmocore logging
Change-Id: I6b652554c472c0fa7d180b533ef1ed4b92b49ab9
2020-06-29 17:19:14 +02:00
Harald Welte 7f08470706 remove code not specific to USB from usb.c to intf_line.c
Change-Id: I7d4d4ab39cb3e7e6a7eb8e738a367122eb3fbee2
2020-06-29 17:19:13 +02:00
Harald Welte 6b61037788 update .gitignore to ignore binaries from contrib
Change-Id: I15c33d271eded44214ab61da40427f71d1fdb128
2020-06-29 17:19:13 +02:00
Harald Welte 2db90a2ce2 add .gitignore
Change-Id: I8ffa037248b5048cf8d7625c1ed36a3fa0941579
2020-06-28 15:06:54 +02:00
Harald Welte 8db1624323 port to new libosmousb
libosmousb, recently introduced to libosmocore.git, is taking care
of main loop integration of libusb into osmo_select_main().  This
means we don't need to do any polling here anymore.

Change-Id: I3f3b61dfa217d6ef8c17970b2cf1cc627bb13bbe
2020-01-06 17:37:07 +01:00
Harald Welte d4e9f2ef93 e1-prbs-test: Add initial code for checking ICE40-E1 traces
The idea of this code is to check captures made by ICE40 against
the known transmitted per-timeslots PRBS sequences.

Change-Id: I084a9737c9e051dcadf971e39e32f10f89aecfbd
2020-01-06 17:37:07 +01:00
Harald Welte eb995b4a7e contrib: add e1-prbs-test
e1-prbs-test is a small utility that can be used to do PRBS testing
on E1/T1 lines using DAHDI cards.  A transmiter and receiver are
exchanging timeslot-specific PRBS sequences.

Change-Id: Ib25d266e61e0d70919cc4e65d5b1bf0bc9ec7d00
2020-01-06 17:37:07 +01:00
Sylvain Munaut 785476901c build: Disable some warnings that are just annoying for no reasons
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-07-10 15:41:08 +02:00
Sylvain Munaut bb1f1997b1 usb: Temporarily mark e1uf_destroy as 'unused'
The code is not 100% finished yet and ATM flow destructions isn't
handled ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-07-10 15:40:42 +02:00
Sylvain Munaut 2b9c51d633 proto: Fix aliasing error when setting the FD in the CMSG data
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-07-10 15:39:53 +02:00
Oliver Smith 2d7cc61101 contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: If69a9bddefd74fbdd8003d9efbb4f7756f407037
2019-07-10 13:31:03 +02:00
Sylvain Munaut cc95b5ebe3 contrib: Add jenkins build script
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-05-11 22:36:24 +02:00
Sylvain Munaut cf189940be Initial code import
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-05-11 22:31:12 +02:00