Commit Graph

14 Commits

Author SHA1 Message Date
Harald Welte fa74cc5c68 Don't depend on libosmo-abis (by default)
The only reason we have a libosmo-netif -> libosmo-abis
dependency is the lapd examples whihc are built but not even installed.

Let's build those only if --enable-lapd-examples is specified at the
command line, and remove the dependency to libosmo-abis in all other
cases.

Change-Id: Ida8157cd9111b196e4bf08782c45d0e3d393f1c9
Closes: OS#4726
2021-02-11 15:40:54 +01:00
Harald Welte da5f41cdad Migrate from osmo_ipa_idtag_parse() to ipa_ccm_id_resp_parse()
In libosmocore Change-ID I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f
we have introduced ipa_ccm_id_resp_parse() as a bugfixed replacement
of ipa_ccm_idtag_parse().

The main difference is that the returned "value" parts now have
a correct reported "length", whereas before this commit they all
reported a one-byte too-long "length" for each IE.

Let's use this opportunity to remove the copy+pasted
osmo_ipa_idtag_parse() function from the libosmo-netif codebase.

Change-Id: I4626d247626543e032593bf226b6c233f6678562
2018-08-01 17:36:21 +02:00
Harald Welte e2fbd3dee4 remove "channel" layer
The "channel" layer on top of IPA client + server was introduced in
2011 but never used in any osmocom program/project so far.  Contrary
to the several other IPA multiplex related implementations in libosmo*,
it did not deal properly with segmented IPA messages, i.e. where a
single TCP segment (and hence recv/read call) does not contain a full
IPA message.

So rather than fixing it up and having yet another IPA related API in
our libraries, let's remove it.

Change-Id: I97c378750acb1637ee032fa88a968edf68d8979f
2018-06-29 10:57:24 +02:00
Max 8440357d4c examples: add simple UDP client/server
In addition to showing basic UDP send/receive example, it helps to test
corner-case when dealing with 0-length UDP packets.

Change-Id: I08c0adf1cf9b6a6f1f7090b237d0497c2ec13cdf
Related: OS#2219
2017-10-13 18:13:14 +02:00
Jan Engelhardt 226e994832 build: remove all_includes
This variable is never set and could therefore be removed.
2014-10-02 23:22:55 +02:00
Martin Hauke 603f6c40d5 build: rename INCLUDES to AM_CPPFLAGS in Makefile.am to avoid warnings 2014-09-11 18:22:02 +02:00
Pablo Neira Ayuso 4925acf297 examples: add osmux-test-input and osmux-test-output
You can use these utilities to test osmux:

1) in one console, run ./osmux-test-input
   This listens in port UDP 20000 and convert RTP traffic to osmux
   Then, it sends osmux traffic via port UDP 20001
2) in another console, run ./osmux-test-output
   This listens in port UDP 20001 and convert osmux to RTP traffic
   Then, it sends RTP traffic to UDP port 20002
3) in another console run, nc -u nc -u -l -p 20002
   This is the sink, just to avoid ICMP destination unreachable messages

Now you can run replay UDP traffic from one pcap trace that contains
RTP traffic with this tool:

http://1984.lsi.us.es/git/pcap-inject/

Example of command line invocation:

./traffic-inject /home/pablo/rtp-nanobts-2-phones-amr.pcap udp 20000

You can run wireshark in the loopback to make sure osmux is getting back
the traces looking like the original.

The tests also generate output files in AMR that you can validate via
mplayer: /tmp/output.amr and /tmp/input.amr respectively. This is to
make sure there are no reordering or problems of any sort.
2012-10-15 23:07:12 +02:00
Pablo Neira Ayuso 729a0917ac add rs232 support
This include an example to open /dev/ttyACM0 to receive data from
u-blox GPS and one to configure it in TIMEPULSE2 mode.
2012-04-04 19:08:27 +02:00
Pablo Neira Ayuso 72cd95b352 add RTP support
This patch adds the initial RTP support for libosmo-netif, it's based
on Harald's RTP support available in openBSC.

I have also added a couple of example to show how our new channel
infrastructure interacts with the RTP layer.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-02-23 13:44:26 +01:00
Pablo Neira Ayuso 2b5d3ce7c6 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.
2011-11-08 11:17:44 +01:00
Pablo Neira Ayuso 20c660caec ipa: initial addition of helper functions and examples
This patch adds IPA helper function that can be use on top of stream
sockets.

The current API is just a copy and paste from libosmo-abis, it will
change in follow up patches to improve it.
2011-10-17 22:12:42 +02:00
Pablo Neira Ayuso 602df1ec4c examples: add stream server/client example
This patch adds a couple of examples that allow chatting between
the client and the server. For simplicity, the example only support
one client.
2011-10-05 13:43:21 +02:00
Pablo Neira Ayuso ddb9bf65f4 add generic datagram socket infrastructure and examples
This patch adds new datagram socket infrastructure and it reworks
the previous examples (now it's LAPD over datagram).
2011-10-05 13:43:10 +02:00
Pablo Neira Ayuso 8bf16493f6 initial commit 2011-10-04 02:36:46 +02:00