aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-07-19tests: osmo-pcap: split packet replay from osmux_test codePablo Neira Ayuso4-118/+189
This patch splits in two files the code that contains the packet replay based on PCAP from the osmux test.
2012-07-19tests: osmo-pcap: adapt it to use new osmux_tx_schedPablo Neira Ayuso1-3/+19
Adapt the test to use the function that allows reconstructing the RTP timing sequence.
2012-07-19osmux: add osmux_tx_sched to reconstruct the timing of RTP messagesPablo Neira Ayuso2-0/+44
This function schedules the transmission of a RTP message that was obtained from one osmux batch. It takes the time (in microseconds) after which the message should be transmitted.
2012-07-13osmux: use osmo_amr_bytes instead of hardcoded 15 bytes for CMR 2Pablo Neira Ayuso1-7/+9
I was using AMR CMR 2 (15 bytes) as the initial tests were done with the codec variant. This patch fixes this by using the new generic osmo_amr_bytes extracted from 3GPP TS 26.101.
2012-07-13src: add function to obtain bytes depending on AMR frame codePablo Neira Ayuso3-1/+56
2012-07-12tests: osmo-pcap: test osmux functionsPablo Neira Ayuso1-4/+45
2012-07-12add osmux supportPablo Neira Ayuso4-0/+288
2012-07-12osmo-pcap-test: add -g compilation for debugging (valgrind) and use -losmonetifPablo Neira Ayuso2-2/+3
2012-07-12rtp: add new parameter to osmo_rtp_get_payload to obtain payload lengthPablo Neira Ayuso2-2/+4
2012-07-12amr: add osmo_amr_get_payloadPablo Neira Ayuso1-0/+5
2012-07-09rtp: add RTP_PT_RTCP (72-76 for RTCP)Pablo Neira Ayuso1-0/+2
As specified by RFC 3551, these are reserved to distinguish RCTP from RTP.
2012-07-09rtp: add missing RTP_PT_AMR for AMR-WB (type 98) and RTP_PT_GSM_HALF (96)Pablo Neira Ayuso1-0/+4
2012-07-07include: add AMR definitions in amr.h headerPablo Neira Ayuso2-1/+67
As defined by RFC3267 in Octed-Aligned mode.
2012-07-07rtp: split osmo_rtp_parse in two functionsPablo Neira Ayuso4-30/+35
This patch splits osmo_rtp_parse in two functions: osmo_rtp_get_hdr osmo_rtp_get_payload So we can validate corrent RTP header to access its fields. Then, obtain the payload.
2012-07-04tests: osmo-pcap: fix bad UDP header calculationPablo Neira Ayuso1-3/+1
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-07-03rtp: remove unused rtp_handle parameter from osmo_rtp_parsePablo Neira Ayuso4-4/+4
And also adjust example files to use the new function. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-07-03rtp: move RTP header definitions to include rtp.hPablo Neira Ayuso2-49/+45
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-06-28add .gitignorePablo Neira Ayuso1-0/+27
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-06-28test: add osmo-pcap-test infrastructurePablo Neira Ayuso12-0/+498
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-04-04add rs232 supportPablo Neira Ayuso6-0/+780
This include an example to open /dev/ttyACM0 to receive data from u-blox GPS and one to configure it in TIMEPULSE2 mode.
2012-02-23build: use libosmo-netif.pc instead libosmonetif.pcPablo Neira Ayuso3-2/+2
Otherwise, openbsc fails to find this new library by libosmo-netif. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-02-23build: fix wrong name for linking optionsPablo Neira Ayuso1-1/+1
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-02-23examples: Display more details on RTP payload in rtp-udp-test-*Pablo Neira Ayuso2-6/+6
Minor change, more verbose output to make sure the functions in the library are doing OK. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-02-23datagram: minor cleanupPablo Neira Ayuso1-6/+5
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-02-23add RTP supportPablo Neira Ayuso8-1/+561
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>
2011-11-08src: add generic channel infrastructure and A-bis IPA server supportPablo Neira Ayuso16-11/+988
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-08ipa: don't release message in osmo_ipa_msg_recvPablo Neira Ayuso1-3/+0
The client of this code must control message freeing it self.
2011-11-08stream: don't destroy server connection on errorPablo Neira Ayuso1-2/+0
This patch includes a minor fix. We don't destroy connection on errors, it should be the caller which must control this.
2011-11-08stream: allow to set reconnect timeoutPablo Neira Ayuso2-7/+21
This patch allows to set reconnect timeout. If zero, it will try immediately. If negative, it will skip retrying.
2011-10-17examples: disable Nagle in ipa-stream-*.cPablo Neira Ayuso2-0/+21
To emulate how openBSC behaves.
2011-10-17ipa: initial addition of helper functions and examplesPablo Neira Ayuso7-1/+444
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-17stream: add osmo_stream_*_conn_get_ofd(...) functionsPablo Neira Ayuso2-0/+21
To obtain the file description.
2011-10-17stream: reconfiguration is only required if address and port changePablo Neira Ayuso1-5/+0
No need to force reconfiguration if any of the callback or data pointers are changed.
2011-10-17stream: add osmo_stream_*_conn_recvPablo Neira Ayuso4-53/+84
Like c43bb089067ca05af4992fbafe46827a1f0a6e9b but for stream sockets.
2011-10-17datagram: add osmo_dgram_conn_recvPablo Neira Ayuso4-32/+53
We provide osmo_dgram_conn_recv(...) which allows you to take control on the message allocation and receival process. Instead of hiding this details inside the datagram infrastructure. Providing more control to clients of this code means more flexibility.
2011-10-17stream: use debug loglevel instead of notice for spamming debug messagePablo Neira Ayuso1-1/+1
2011-10-17datagram: reconfiguration is only required if address and port changePablo Neira Ayuso1-2/+0
We allow to change the callback and data pointers in runtime safely without the need to reconfig.
2011-10-14examples: update LAPD over datagram testsPablo Neira Ayuso2-88/+117
Now they can be used to generate a number of messages from the user and to measure the RTT of LAPD over datagram messages. Still, they need to be expanded to take the origin and remote IPs as argument from the command line, later.
2011-10-14datagram: use LOGL_DEBUG in osmo_dgram_server_conn_readPablo Neira Ayuso1-1/+1
This removes spamming message that is currently displayed with LOGL_NOTICE loglevel.
2011-10-14datagram: change prototype of osmo_dgram_conn_set_read_cbPablo Neira Ayuso4-5/+20
This patch changes the prototype of osmo_dgram_conn_set_read_cb. Now it takes one callback to a generic struct osmo_dgram_conn instead of osmo_dgram_server_conn. This is useful in case that you want to reply to one message using the datagram socket (without this change is not possible).
2011-10-09stream: add *_get_data() function to obtain private dataPablo Neira Ayuso2-0/+27
Add new functions: osmo_stream_server_link_get_data osmo_stream_server_conn_get_data osmo_stream_client_conn_get_data To obtain private data from osmo_stream_* handlers. This patch also introduces missing osmo_stream_server_conn_set_data.
2011-10-09datagram: support calling dgram_*_open() multiple times for reconfigurationsPablo Neira Ayuso1-0/+32
This patch allows you to call dgram_*_open(..) as many times as you want to trigger reconfigurations.
2011-10-09stream: support calling stream_*_open() multiple times for reconfigurationsPablo Neira Ayuso1-0/+28
This patch allows you to call stream_*_open(..) as many times as you want to trigger reconfigurations.
2011-10-09datagram: add osmo_ prefix to all functionsPablo Neira Ayuso4-118/+123
Modify examples as well to use the new API.
2011-10-09stream: add osmo_ prefix to all functionsPablo Neira Ayuso4-133/+142
Modify examples as well to use the new API.
2011-10-05add COPYING file (GPLv2 license)Pablo Neira Ayuso1-0/+339
2011-10-05examples: add stream server/client examplePablo Neira Ayuso3-1/+282
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-05stream: remove internal stream_msg_recv()Pablo Neira Ayuso1-14/+2
Remove stream_msg_recv(...), now we use recv(...) directly. This fixes since we were calling msgb_put(...) twice.
2011-10-05stream: remove includes from stream.h headerPablo Neira Ayuso2-5/+1
The should be uses in the client program. They are not required by the generic stream socket infrastructure.
2011-10-05add generic datagram socket infrastructure and examplesPablo Neira Ayuso7-83/+469
This patch adds new datagram socket infrastructure and it reworks the previous examples (now it's LAPD over datagram).