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.
This patch adds VTY commands to route IPA flows. The following
example allows to add a new route:
$ tests/./ipa_proxy_test &
<0000> ipa_proxy_test.c:74 entering main loop
$ telnet localhost 4260
ipa-proxy-test> enable
ipa-proxy-test# ipa instance input-oml bind 127.0.0.1 tcp port 8888
ipa-proxy-test# ipa instance output-oml connect 127.0.0.1 tcp port 3002
ipa-proxy-test# ipa route instance input-oml streamid 0xfe instance output-oml streamid 0xfe
ipa-proxy-test# ipa instance input-rsl bind 127.0.0.1 tcp port 8889
ipa-proxy-test# ipa instance output-rsl connect 127.0.0.1 tcp port 3003
ipa-proxy-test# ipa route instance input-rsl streamid 0xfe instance output-rsl streamid 0xfe
I'm using this to initially test this code [*].
[*] note that this requires a minor hackish patch for the
src/input/ipaccess.c driver which changes the default OML and RSL
ports to listen in 8888 and 8889 instead of the default ports,
thus, I can initially test everything from the localhost.
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.
This patch uses the new libosmocore logging infrastructure
that allows to invoke log_init(&my_log_info) multiple times
so we can register categories from libraries and applications.
struct e1inp_line_ops {
int (*sign_link_up)(struct msgb *msg, struct e1inp_line *line);
int (*sign_link)(struct msgb *msg, struct e1inp_sign_link *link);
int (*error)(struct msgb *msg, int error);
};
The description of the operations is the following:
* sign_link_up is invoked if the signalling link becomes up. In A-bis
over IP, we have to wait until the other peer identifies itself as
a BTS/BSC device, then this function is invoked. This function is not
used by ISDN drivers, the signalling link can be set up just after
the line is created.
* sign_link is called if we receive OML/RSL message. This function
is used both by ISDN and A-bis over IP drivers.
* error is called if we receive a malformed message. It is used both
by ISDN and A-bis over IP drivers.