Commit Graph

8 Commits

Author SHA1 Message Date
Pau Espin 6fe1f35001 osmux: Replace deprecated osmux_xfrm_input_* APIs in examples & tests
Change-Id: I7f3f8d40f89ffdd135a73316ee60fd429ba2a5b0
2022-10-03 11:30:45 +02:00
Pau Espin 6fb0f4de86 examples: use osmo_init_logging2
Change-Id: I7f1f4503f254931edeebfbadf3953efa7b20f85f
2018-04-17 13:55:09 +02:00
Pablo Neira Ayuso d32caea9ea osmux: add osmux_snprintf
Useful for debugging purposes. Modify also examples to use it.
2013-02-19 17:14:33 +01:00
Pablo Neira Ayuso aeeb4399a2 examples: use DOSMUX_TEST instead of DLINP in logging messages 2013-02-19 17:13:37 +01:00
Pablo Neira Ayuso 1f43121ef0 osmux: osmux-test-input: fix compilation warning
CC     osmux-test-input.o
osmux-test-input.c:85:2: warning: initialization from incompatible pointer type [enabled by default]
osmux-test-input.c:85:2: warning: (near initialization for ‘h_input.deliver’) [enabled by default]
2013-02-19 16:21:09 +01:00
Pablo Neira Ayuso 5e9c67ea20 fix osmux-test-input
ccid array was not initialized appropriately
2013-02-12 19:53:02 +01:00
Pablo Neira Ayuso 5654c43f80 osmux: remove generic functions to register and get ccid
Remove these functions:

- osmux_xfrm_input_get_ccid
- osmux_xfrm_input_register_ccid

The ccid will be managed by the BSC and it will be stored in the
mgcp_endpoint structure.

Also adjust all tests and examples using the API.
2012-10-20 20:17:28 +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