summaryrefslogtreecommitdiffstats
path: root/tests/e1inp_ipa_bts_test.c
Commit message (Collapse)AuthorAgeFilesLines
* e1_input: rework configuration of virtual E1 line operationsPablo Neira Ayuso2011-08-191-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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);
* test: use site_id 1801 in ipa BTS examplePablo Neira Ayuso2011-08-171-1/+1
| | | | | Thus we can use it with the example file for openBSC under doc/examples/nanobts/openbsc.cfg.
* talloc: revert to use talloc inside libosmocoreHarald Welte2011-07-181-1/+1
| | | | | | It's not a good idea to confuse the two changes with each other. Moving the Abis part into a separate library is independent from the question whether we have talloc inside libosmocore or use a stand-alone talloc library.
* tests: convert IPA BTS example to use event-oriented approachPablo Neira Ayuso2011-07-081-21/+53
| | | | | | Like the HSL BTS example. We use an event file descriptor which is used to call the GSM 12.21 based function for handling.
* tests: example BTS now sends an OML SW ACT REQPablo Neira Ayuso2011-07-081-2/+130
| | | | | | This allows to test that the write path works and it allows you to get an idea on how to implement the BTS side by means of libosmo-abis.
* logging: use new harald's logging infrastructure in libosmocorePablo Neira Ayuso2011-07-051-1/+1
| | | | | I can send patches to improve it later, better not to waste much time at it by now so port libosmo-abis upon it.
* e1_input: change prototype of ->sign_link(...)Pablo Neira Ayuso2011-07-051-1/+1
| | | | | This patch removes the struct e1inp_sign_link parameter since this is already available in the msgb->dst field of the message.
* tests: use logging infrastructure to display messagesPablo Neira Ayuso2011-07-021-10/+17
| | | | instead of using printf
* ipaccess: put the ID_GET logic for the BTS mode into the driverPablo Neira Ayuso2011-07-021-136/+13Star
| | | | | This patch moves the ID_GET logic from the example file to the ipaccess driver in BTS mode.
* major updates in e1_input callback ops and IPA infrastructuresPablo Neira Ayuso2011-06-301-33/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a major update of the callback infrastructure, now the e1input_ops looks like the following: struct e1inp_sign_link * (*sign_link_up)(void *unit_info, struct e1inp_line *line, enum e1inp_sign_type type); void (*sign_link_down)(struct e1inp_line *line); int (*sign_link)(struct msgb *msg, struct e1inp_sign_link *link); The sign_link_up and sign_link_down will be used by the A-bis over IP input drivers. The sign_link_up callback is used if we receive a ID_RESP message, in that case, we have to set up the sign link for the corresponding new OML/RSL signal link. The pointer to unit_info provides a data structure that contains the BTS device details if we run as BSC, and the requested device information from the BSC if we run as BTS. The sign_link_up callback must return the new sign_link created. The sign_link_down callback is invoked if the line does down, which means that the counterpart has closed the socket. The sign_link callback is used to handle all RSL/OML messages. I have also added the following callback to the e1inp_driver: + void (*close)(struct e1inp_ts *ts); Which is invoked if you call e1inp_sign_link_destroy(). This callback is used to close the socket that is linked to that timeslot. This is useful for A-bis over IP drivers since sockets are closed if the OML/RSL signalling link is destroyed. As you can notice, I have also added all the ID_RESP parsing into libosmo-abis for both ipaccess and hsl drivers. This patch also contains a rework of the ipa_client_link whose integration with the e1_input infrastructure was broken (the transmission path was broken). This patch also contains more develop examples that act as BSC and BTS for the ipaccess driver. Sorry, I know it would be better to split all these changes into logical pieces but many of them are tightly related. This is under heavy development stage, it's anyway hard to track changes until this becomes more stable.
* e1_input: minor API changes to adapt it to openbscPablo Neira Ayuso2011-06-251-5/+11
| | | | | While working on the openbsc over libosmo-abis port, I noticed several API changes that we need to perform for better adaptation.
* e1input: add address as parameter to e1inp_line_update(...)Pablo Neira Ayuso2011-06-211-1/+1
| | | | | This patch adds a new parameter to e1inp_line_update that allows to specific the address for A-bis over IP BSC/BTS.
* input: ipaccess: add preliminary BTS-side for A-bis over IPPablo Neira Ayuso2011-06-141-0/+90
This patch adds the BTS-side for the ip.access driver for A-bis over IP communications. This patch adds one example under test/ so you can test the existing BSC and BTS sides over ip.access. Still incomplete, it requires to allow to register some callback in the BTS side to perform some action once we receive some message. This will come in next updates.