Commit Graph

23 Commits

Author SHA1 Message Date
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