Commit Graph

36 Commits

Author SHA1 Message Date
Pau Espin e63329eb1f Bump version: 1.2.0.114-3804-dirty → 1.3.0
Change-Id: Id67541378193f22f924409f02301f0063aab639e
2023-02-07 13:28:19 +01:00
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 9d7ea681ef tests/osmo-pcap/osmux: Replace deprecated API osmux_xfrm_output_init2()
Replacing this one with the newer API was missed a few commits ago when
this API was marked as deprectated. Do it now.

Change-Id: Ia0958dfae951d82feafe427eff2112d327d3b0a4
2022-10-03 11:30:41 +02:00
Pau Espin 0d52cdfe77 tests/osmo-pcap-test/osmux_test: Fix return condition check for osmux_xfrm_input()
According to API doc and implementation, it never returns >1.
Do as done in all other places where this API is used, that this check
for >0.

Change-Id: If23dfecb566f590b7a898356469df6e322f57653
2022-09-23 17:38:33 +02:00
Pau Espin bea94d8edf Bump version: 1.1.0.14-d1ab-dirty → 1.2.0
Change-Id: I5809e5c85af66db6174a182a936891fa6e1104c1
2022-06-28 18:09:49 +02:00
Pau Espin 5967fa0058 Bump version: 1.0.0.14-3e65-dirty → 1.1.0
Change-Id: I8e3be883113444251f5008c407e9f722d0dcd422
2021-02-23 16:47:37 +01:00
Neels Hofmeyr 6413a6b53f osmux_test: don't use color logging
Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7
2019-11-20 05:03:37 +01:00
Pau Espin f0f1ebf70e osmux: Extend osmux_out_handle and add new API to set rtp payload_type
Previously payload_type was always hardcoded to 98 for generated rtp
packets from incoming osmux frame.

Change-Id: I5cbeb494a8932953d9fd2dc24dacf8cd97fd84e4
2019-05-17 17:12:56 +02:00
Pau Espin df0ad6c1a4 osmux: Move examples and tests to use new output APIs
Change-Id: Ie69c427308eb7d81aedab7fbb71f1bdaf43f0275
2018-04-19 18:24:25 +02:00
Pau Espin 9f521e10db tests: osmo-pcap-test: Fix pcap includes not found in old versions
pcap/dlt.h only exists on newer versions of libpcap. On older versions,
same defines are available in pcap/bpf.h, which in newer versions
include pcap/dlt.h, so we are always fine include pcap/bpf.h.
As a side note, there's a lots of comments in pcap/dlt.h stating that
those symbols used to reside in pcap/bpf.h but were moved there at some
point.

Change-Id: I824671a415eb3f35f480c934b9780ff13510011a
2018-04-12 16:35:12 +02:00
Pau Espin 525256a15a test: osmo-pcap-test: Fix clock drift while replaying pcap file
In the previous implementation, the processing time was not being taken
into account, which was implicitly added for each new packet to be sent,
which caused a steady incremental drift in the clock clearly visible
when analysing a RTP stream.

As it uses timespecsub, it depends on libosmocore Change-Id
I45fc993b9bb0a343763238bf463c8640f47b00f1.

Change-Id: I11cb9a63e16e829ccd4af1096b9f473c802d822f
2018-02-26 18:20:20 +01:00
Pau Espin 6032a35be8 tests: osmo-pcap: Allow different l2 pkts
Before this patch, ETH was assumed and other types were not supported.
This patch also adds Linux cooked packet support for L2.

Change-Id: Ie62fa0a8e45e1e141edb64b116dad185ad9c7a5f
2017-08-08 20:39:16 +02:00
Pau Espin 76c0acb149 tests: osmo-pcap: Fix per packet timer
Before this commit, the gap time between 2 packets {n-1, n} was being
applied to {n, n+1}.

Change-Id: I715865c1edd1fc2ec9b024671d91eb72559cbdea
2017-08-08 20:39:16 +02:00
Neels Hofmeyr d0b6eb4777 configure: check for pkg-config presence
Change-Id: Ifaea95befa3d1d8f6f047e22efcd62cb0bd8b287
2016-10-01 00:59:54 +02:00
Jan Engelhardt de816861cb build: put dependency libraries in the right place in Makefiles
Libs must be in _LDADD/_LIBADD and not in _LDFLAGS.
2014-10-02 23:22:43 +02:00
Pablo Neira Ayuso 3f00a9b95f fix osmux_test with pcap file 2013-02-12 19:49:57 +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 384bdf630a osmux: release of batch message is controled by caller
Instead of internally released. This is required if we use the
osmo_dgram infrastructure, to avoid a double release.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-10-15 18:14:59 +02:00
Pablo Neira Ayuso 72a0aae500 osmux: support two concurrent calls in output path 2012-08-06 21:04:25 +02:00
Pablo Neira Ayuso b9cf903bbe osmux: add infrastructure to map RTP SSRC and osmux CCID 2012-08-06 21:04:25 +02:00
Pablo Neira Ayuso 468d81b4ac osmux: batching factor can be explicitly configured by caller
Not hardcoded in osmux.c code anymore.
2012-08-06 21:04:25 +02:00
Pablo Neira Ayuso f366c924e2 osmux: store internal batching information in struct osmux_in_handle
The layout is not provided, as it is internal.

Thus, we don't allocate the internal batching information in BSS
anymore.
2012-08-06 21:04:25 +02:00
Pablo Neira Ayuso d2ea108728 osmux: remove timeval parameter from osmux_tx_sched
We can internal allocate this in the stack, no need to expose it to
the caller.
2012-08-04 21:03:56 +02:00
Pablo Neira Ayuso fe9fccd412 osmux: cleanup tx path
This patch cleans up the transmission path for osmux, this involves
the functions that extract the messages from the batch and the one
that reconstruct the timing.

They now take a list that contains the reconstructed RTP messages:

 osmux_xfrm_output(osmuxh, &h_output, &list);
 osmux_tx_sched(&list, &tv, tx_cb, NULL);
2012-08-04 19:59:33 +02:00
Pablo Neira Ayuso fdc6538986 fix wrong delta between two RTP messages
it should 20 ms, not 160 ms. Thanks for Holger for spotting this.
2012-08-04 18:39:45 +02:00
Pablo Neira Ayuso ffd20f3f1c osmux: major rework to reduce batch message size (add counter field)
This patch adds the counter field to the osmux header, so we can
reduce the size of the batch even further, eg.

osmuxhdr (ctr=3)
speech
speech
speech
osmuxhdr (ctr=2)
speech
speech
...

The new header is the following:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FT  | CTR |F|Q|    SeqNR      |  Circuit ID   |AMR-FT |AMR-CMR|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The counter field is 3 bits long, thus, we can batch up to 8
RTP speech frames into one single batch per circuit ID.

I have also removed the RTP marker, since it can be reconstructed
from the AMR information.

Moreover, the entire workflow has been also reworked. Whenever a
packet arrives, we introduce it into the batch list. This batch
list contains a list of RTP messages ordered by RTP SSRC. Then,
once the batch timer expires or the it gets full, we build the
batch from the list of RTP messages.

Note that this allows us to put several speech frame into one
single osmux header without actually worrying about the amount
of messages that we'll receive.

The functions that reconstruct the RTP messages has been also
adjusted. Now, it returns a list of RTP messages per RTP SSRC
that has been extracted from the batch.
2012-08-02 20:36:19 +02:00
Pablo Neira Ayuso b03de23120 tests: osmux: initialize input handler before first run
Make sure we don't segfault due to uninitiliazed handler.
2012-08-02 20:35:31 +02:00
Pablo Neira Ayuso 5e8fab1419 tests: osmo-pcap: callback control the release of the emulated packet
The callback is now in charge of releasing the packet.
2012-08-02 20:34:04 +02:00
Pablo Neira Ayuso 4aa55450a3 tests: osmo-pcap: cleanup for osmux test receiver loop 2012-08-02 17:39:02 +02:00
Pablo Neira Ayuso 937ab515cb tests: osmo-pcap: use logging infrastructure
so far, it was missing and printf was used instead of the generic
logging infrastructure that osmocom provides.
2012-07-19 13:03:39 +02:00
Pablo Neira Ayuso 004d5aad0e tests: osmo-pcap: split packet replay from osmux_test code
This patch splits in two files the code that contains the packet replay
based on PCAP from the osmux test.
2012-07-19 12:21:25 +02:00
Pablo Neira Ayuso 413513a704 tests: osmo-pcap: adapt it to use new osmux_tx_sched
Adapt the test to use the function that allows reconstructing the
RTP timing sequence.
2012-07-19 11:43:08 +02:00
Pablo Neira Ayuso 51d408acee tests: osmo-pcap: test osmux functions 2012-07-12 13:03:56 +02:00
Pablo Neira Ayuso e53d2ed172 osmo-pcap-test: add -g compilation for debugging (valgrind) and use -losmonetif 2012-07-12 13:01:33 +02:00
Pablo Neira Ayuso d2de668547 tests: osmo-pcap: fix bad UDP header calculation
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-07-04 10:21:50 +02:00
Pablo Neira Ayuso 75755dd7d9 test: add osmo-pcap-test infrastructure
This patch adds the osmo-pcap-test infrastructure that allows you
to take packets stored in one pcap file, convert them to msgb and
pass it to some function.

The infrastructure also provides timing reconstruction based on
the pcap file information.

This is useful for easy protocol development, automated testing and
fuzzying of the existing code to validate the code.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-06-28 16:42:22 +02:00