aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-08-19channel: abis: ipa-stream-server: fix crash while closing socketPablo Neira Ayuso1-0/+5
This fixes the crash while closing socket with/without link with a valid IPA unit.
2012-08-19ipa: add osmo_ipa_process_msg and remove osmo_ipa_recv_msgPablo Neira Ayuso3-32/+25
This patch removes osmo_ipa_recv_msg, it performs two syscall invocations and it's stream generic. Now we use the specific receival function we want to use (no matter if stream or datagram based) and then we call osmo_ipa_process_msg to check that the IPA message correct.
2012-08-19consolidate ipa_unit infrastructurePablo Neira Ayuso3-223/+245
Provide unified infrastructure for handling IPA units and modify existing code to use it.
2012-08-19stream: add osmo_stream_srv_get_masterPablo Neira Ayuso1-0/+5
To obtain the information of the server data that this connection belongs to.
2012-08-19channel: add abis directory under channelPablo Neira Ayuso5-9/+10
And move all existing A-bis channel implementation to channel/abis/ directory. This is just a cleanup to reorganize the source code tree.
2012-08-19channel: add subtype ID to osmo_chan_createPablo Neira Ayuso3-3/+18
This adds the possibility to specify the variant of the channel. This was discussed during the osmocom workshop. Harald wanted a way to say if the channel is using TCP, UDP, DADHDI and so on.
2012-08-19channel: osmo_chan_init takes one pointer to set the talloc contextPablo Neira Ayuso1-3/+7
Also remove this parameter from osmo_chan_create
2012-08-19channel: rename CHAN_* to OSMO_CHAN_* for correct namespace policyPablo Neira Ayuso3-3/+3
Just to avoid unlikely possible problems while using this library with any other that decided to define the CHAN_* constants.
2012-08-19channel: use linked list instead of array of existing channelsPablo Neira Ayuso1-10/+29
This also adds osmo_chan_init() that needs to initialize the channel infrastructure.
2012-08-19channel: define CHAN_SIGN_OML and CHAN_SIGN_RSL internallyPablo Neira Ayuso2-0/+6
These definitionsare not relevant for external client applications using the library.
2012-08-18channel: add name fieldPablo Neira Ayuso2-0/+2
This will be useful to display some human-readable type in logs and the VTY.
2012-08-16channel: abis-ipa-server: stream layer already destroy the socket for usPablo Neira Ayuso1-1/+1
This reverts 373d1e6540c64ab09a974c71deeb1eeacd68d5bf.
2012-08-16ipa: change osmo_ipa_rcvmsg_base to take argument depending on rolePablo Neira Ayuso3-8/+22
If we're acting as client, we don't have to reply ID_ACK to one received ID_ACK (otherwise, we enter a loop).
2012-08-16channel: display error messages for channel_open()Pablo Neira Ayuso1-2/+9
Using generic osmocom logging infrastructure
2012-08-16channel: abis-ipa-server: fix connection closurePablo Neira Ayuso1-0/+2
2012-08-16add abis_ipa_client channelPablo Neira Ayuso3-1/+361
2012-08-15add ipa_unitPablo Neira Ayuso2-0/+119
This adds the generic ipa_unit object that is allocated and set by the BTS while initializing the channels.
2012-08-15channel: abis-ipa: shorter function namesPablo Neira Ayuso2-82/+80
%s/_server_/_srv_/g %s/osmo_chan_abis/osmo_abis/g %s/SERVER/SRV/g
2012-08-15src: shorter stream function namesPablo Neira Ayuso2-270/+263
%s/_client_conn_/_cli_/g %s/_server_conn_/_srv_/g %s/_client_/cli/g %s/server/srv/g %s/RECONFIG/RECONF/g %s/SERVER/SRV/g %s/CLIENT/CLI/g
2012-08-15src: shorter names for datagram socketsPablo Neira Ayuso1-91/+90
%s/_conn_/_/g %s/_conn//g %s/_server_/_tx_/g %s/_client_/_rx_/g %s/_SERVER_/_TX_/g %s/_CLIENT_/_RX_/g %s/_RECONFIG/_RECONF/g
2012-08-06osmux: fix ordering of RTP messages in the batching listPablo Neira Ayuso1-12/+15
This patch fixes the ordering in RTP sequence number. Before this patch, the list was inverted. This also fixes the calculation of the room that still remains in the batch.
2012-08-06osmux: add OSMUX_MAX_CONCURRENT_CALLS which is 8Pablo Neira Ayuso1-4/+4
Instead of harcoding the number all around the code.
2012-08-06osmux: support two concurrent calls in output pathPablo Neira Ayuso1-5/+15
2012-08-06osmux: add infrastructure to map RTP SSRC and osmux CCIDPablo Neira Ayuso1-4/+48
2012-08-06osmux: fix wrong calculation of csrc_countPablo Neira Ayuso1-2/+1
2012-08-06osmux: batching factor can be explicitly configured by callerPablo Neira Ayuso1-4/+1
Not hardcoded in osmux.c code anymore.
2012-08-06osmux: store internal batching information in struct osmux_in_handlePablo Neira Ayuso1-29/+45
The layout is not provided, as it is internal. Thus, we don't allocate the internal batching information in BSS anymore.
2012-08-06osmux: print RTP header if debug logging level is setPablo Neira Ayuso1-4/+8
2012-08-06rtp: add osmo_rtp_snprintfPablo Neira Ayuso1-0/+40
To print the RTP header and payload.
2012-08-04osmux: extend debugging to make sure we don't lag in scheduled transmissionsPablo Neira Ayuso1-2/+6
osmux only lags ~0.15 ms at maximum to transmit one scheduled RTP message according to my tests with PCAP traces. Yes, only ~0.15 milliseconds, this is not wrong :-). This is good news, our timer infrastructure seems to be quite precise.
2012-08-04osmux: remove timeval parameter from osmux_tx_schedPablo Neira Ayuso1-4/+7
We can internal allocate this in the stack, no need to expose it to the caller.
2012-08-04osmux: fix when to add the osmux headerPablo Neira Ayuso1-5/+9
This needs to be done for the first message in one RTP SSRC series. Before this patch, it was always included due to wrong aritmethics.
2012-08-04osmux: fix list ordering for RTP messages that will be included in batchPablo Neira Ayuso1-25/+12
This fixes the algorithms to include the messages in order in the batch based on the TRP SSRC (from lower to higher). This is very important to reduce the amount of bytes that we spend on the osmux header.
2012-08-04osmux: check for the maximum amount of messages in batchPablo Neira Ayuso1-1/+8
This should not happen, but make sure our osmux CTR field does not wrap around.
2012-08-04osmux: cleanup tx pathPablo Neira Ayuso1-22/+47
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-02osmux: major rework to reduce batch message size (add counter field)Pablo Neira Ayuso1-61/+198
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-02osmux: fix wrong maximum batch sizePablo Neira Ayuso1-1/+2
Missing UDP header in calculation.
2012-07-19osmux: use logging infrastructurePablo Neira Ayuso1-5/+11
so far, printf was used instead.
2012-07-19osmux: add DEBUG_TIMING to make sure timing reconstruction is OKPablo Neira Ayuso1-0/+15
by now, it is set on by default.
2012-07-19osmux: always use osmux_tx_cb in osmux_tx_schedPablo Neira Ayuso1-7/+5
This is required by the follow-up patch to debug timing issues.
2012-07-19osmux: add osmux_tx_sched to reconstruct the timing of RTP messagesPablo Neira Ayuso1-0/+42
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 Ayuso2-1/+44
2012-07-12add osmux supportPablo Neira Ayuso2-0/+219
2012-07-12rtp: add new parameter to osmo_rtp_get_payload to obtain payload lengthPablo Neira Ayuso1-1/+3
2012-07-07rtp: split osmo_rtp_parse in two functionsPablo Neira Ayuso1-19/+21
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-03rtp: remove unused rtp_handle parameter from osmo_rtp_parsePablo Neira Ayuso1-1/+1
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 Ayuso1-49/+0
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2012-04-04add rs232 supportPablo Neira Ayuso2-0/+273
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-23datagram: minor cleanupPablo Neira Ayuso1-6/+5
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>