e1_input: add 'port_nr' field and support DAHDI T1 cards
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.
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 42b1758..b304254 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -157,10 +157,12 @@
unsigned int num;
const char *name;
+ unsigned int port_nr;
struct rate_ctr_group *rate_ctr;
/* array of timestlots */
struct e1inp_ts ts[NUM_E1_TS];
+ unsigned int num_ts;
const struct e1inp_line_ops *ops;