diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-11-06 20:47:08 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-11-08 11:17:44 +0100 |
commit | 2b5d3ce7c69e1149bb2af815ab8b8534026063ca (patch) | |
tree | adf544975a45d2bbcc7e46f3269aff101f1ed0bb /src/stream.c | |
parent | ffe3cb3ef93483c45d23ba7ea7fe156d5bb4dbc6 (diff) |
src: add generic channel infrastructure and A-bis IPA server support
This patch adds the generic channel infrastructure that allows to
create channel of different types. Each channel has their own
configuration functions.
struct osmo_chan *chan;
chan = osmo_chan_create(tall_example, CHAN_ABIS_IPA_SERVER);
...
/* specific configuration functions per supported channel. */
osmo_chan_abis_ipa_server_set_cb_signalmsg(chan, signal_msg_cb);
osmo_chan_abis_ipa_unit_add(chan, 1801, 0);
/* open channel. */
osmo_chan_open(chan);
The input path requires a callback to be registered. The output path
is handled through:
int osmo_chan_enqueue(struct osmo_chan *c, struct msgb *msg);
The msg->dst must be set (it can be taken from the original message
to route one reply).
This patch also adds A-bis IPA server support. It has been tested with
e1inp_ipa_bsc_test available in libosmo-abis.
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c index c87f999..b32f9b5 100644 --- a/src/stream.c +++ b/src/stream.c @@ -510,6 +510,13 @@ osmo_stream_server_conn_create(void *ctx, struct osmo_stream_server_link *link, return conn; } +void +osmo_stream_server_conn_set_data(struct osmo_stream_server_conn *conn, + void *data) +{ + conn->data = data; +} + void *osmo_stream_server_conn_get_data(struct osmo_stream_server_conn *link) { return link->data; |