aboutsummaryrefslogtreecommitdiffstats
path: root/src/ipa.c
AgeCommit message (Collapse)AuthorFilesLines
2024-07-29ipa: Ensure osmo_ipa_segmentation_cb sets msg->l2h to the payload dataDaniel Willmann1-1/+3
Previously if ih->proto was IPAC_PROTO_OSMO msg->l2h would still point to the extension header byte which breaks assumptions in e.g. osmo-bsc. Change-Id: Id91cddf9948ca49abf092850fae3a8f17e445b45 Related: OS#6422
2023-10-09stream: Add and use helper function osmo_ipa_push_headers()arehbein1-0/+12
Related OS#5753, OS#5751 Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529
2023-08-07ipa: Add segmentation callbackarehbein1-0/+65
Related: OS#5753 Change-Id: I87ef4c7023126b783dd79e7ed47be31e1b76f975
2023-08-07examples: Add extension header octet to examplearehbein1-0/+5
Mainly to make data/packets look (pseudo-)correct in Wireshark. Also: Add helper for allocating message buffers with extended headroom for IPA. Change-Id: I962b9edcba65cdc98da00d2f8753dc5acd481502
2018-08-01Migrate from osmo_ipa_idtag_parse() to ipa_ccm_id_resp_parse()Harald Welte1-31/+1
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-06-29remove "channel" layerHarald Welte1-1/+0
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
2017-11-13Add SPDX-License-Identifier + Copyright statementsHarald Welte1-0/+19
Change-Id: I43bb1c4a889421907a1a08eb29c96f2330ab00ec
2012-10-15ipa: fix compilation warningPablo Neira Ayuso1-3/+2
Shows up with gcc-4.7 ipa.c: In function 'osmo_ipa_rcvmsg_base': ipa.c:210:6: warning: variable 'ret' set but not used [-Wunused-but-set-variabl
2012-08-21ipa: add osmo_ipa_parse_msg_id_respPablo Neira Ayuso1-0/+38
Code extracted from ipa_stream_server.c.
2012-08-19ipa: add ipa_cli_id_ack and ipa_cli_id_respPablo Neira Ayuso1-0/+77
This functions were before located in channel/abis/ipa_stream_client.c, but they are generic for IPA units.
2012-08-19ipa: add osmo_ipa_process_msg and remove osmo_ipa_recv_msgPablo Neira Ayuso1-26/+12
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-16ipa: change osmo_ipa_rcvmsg_base to take argument depending on rolePablo Neira Ayuso1-5/+11
If we're acting as client, we don't have to reply ID_ACK to one received ID_ACK (otherwise, we enter a loop).
2011-11-08src: add generic channel infrastructure and A-bis IPA server supportPablo Neira Ayuso1-0/+204
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-10-17ipa: initial addition of helper functions and examplesPablo Neira Ayuso1-0/+73
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.