summaryrefslogtreecommitdiffstats
path: root/tests/e1inp_ipa_bts_test.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-08-19 18:43:38 +0200
committerPablo Neira Ayuso2011-08-19 18:43:38 +0200
commit4e862cbf4b3b438a07ea89438f4384bd10468ea9 (patch)
tree9e9cc25a91a7b1095566f6375deb3fc449cdc522 /tests/e1inp_ipa_bts_test.c
parentinput: add rs232 driver for virtual E1 lines (diff)
downloadlibosmo-abis-4e862cbf4b3b438a07ea89438f4384bd10468ea9.tar.gz
libosmo-abis-4e862cbf4b3b438a07ea89438f4384bd10468ea9.tar.xz
libosmo-abis-4e862cbf4b3b438a07ea89438f4384bd10468ea9.zip
e1_input: rework configuration of virtual E1 line operations
struct e1inp_line_ops { - enum e1inp_line_role role; - char *addr; - void *data; + union { + struct { + enum e1inp_line_role role; /* BSC or BTS mode. */ + const char *addr; /* IP address .*/ + void *dev; /* device parameters. */ + } ipa; + struct { + const char *port; /* e.g. /dev/ttyUSB0 */ + unsigned int delay; + } rs232; + } cfg; Now this structure contains the configuration details for the virtual E1 line, instead of using a pointer. This also get the line_update callback to its original layout: + int (*line_update)(struct e1inp_line *line);
Diffstat (limited to 'tests/e1inp_ipa_bts_test.c')
-rw-r--r--tests/e1inp_ipa_bts_test.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c
index 2c03d94..3549661 100644
--- a/tests/e1inp_ipa_bts_test.c
+++ b/tests/e1inp_ipa_bts_test.c
@@ -252,9 +252,13 @@ int main(void)
osmo_init_logging(&bts_test_log_info);
struct e1inp_line_ops ops = {
- .role = E1INP_LINE_R_BTS,
- .addr = "127.0.0.1",
- .data = &bts_dev_info,
+ .cfg = {
+ .ipa = {
+ .role = E1INP_LINE_R_BTS,
+ .addr = "127.0.0.1",
+ .dev = &bts_dev_info,
+ },
+ },
.sign_link_up = sign_link_up,
.sign_link_down = sign_link_down,
.sign_link = sign_link,