summaryrefslogtreecommitdiffstats
path: root/src/gsm/ipa.c
Commit message (Collapse)AuthorAgeFilesLines
* update/extend doxygen documentationHarald Welte2017-06-121-0/+7
| | | | | | | | | It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
* gsm0808 + ipa: fix compilation on systems without sys/socket.hHarald Welte2017-05-151-1/+7
| | | | Change-Id: I60f5d4982cd96ab29f9924ec11b46bf56fbfc346
* use osmo_{htonl,htons,ntohl,ntohs}() functions all over libosmocoreHarald Welte2017-05-151-3/+3
| | | | | | This gets us one step closer to fixing the embedded build Change-Id: I3fc2639b6ade9ab138766987eceab7ec9498fdc7
* Uninitialized variable in ipa_ccm_make_id_resp_from_req()Harald Welte2017-04-271-0/+2
| | | | | | | | | | We are allocating a buffer on the stack without initializing it, and then passing it into ipa_ccm_make_id_resp(). There is no real danger from this, as the buffer is only uninitialized if num_ies is 0, but let's memset() it for good style Change-Id: If5761a47b8cba73ddcc02a88cfa5c87c1970c04e Fixes: coverity CID#167040
* ipa: Introduce helpers to encode IPA CCM ID RESPONSEHarald Welte2017-04-151-1/+118
| | | | | | | | | | The ipa.c file already contained code to parse an ID RESPONSE into the 'struct ipaccess_unit', but it didn't so far contain code to put together an ID RESPONSE packet based on that structure. Let's change that with ipa_ccm_make_id_resp() and a helper wrapper ipa_ccm_make_id_resp_from_req(). Change-Id: Icbcd8827a75fd5f3393351c1ca372de85275ad35
* fix various compiler warnings (on FreeBSD-11.0)Harald Welte2017-02-081-0/+1
| | | | | | | FreeBSD 11.0 uses clang version 3.8.0 which spits various warnings during libosmocore compilation. Let's clean this up a bit. Change-Id: Ic14572e6970bd0b8916604fabf807f1608fa07e5
* ipa: Remove unneeded #include statementHarald Welte2017-01-231-1/+0
| | | | Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b
* Extend IPA error loggingMax2016-11-161-2/+2
| | | | | | | | Output more information in case of IPA protocol errors to make debugging easier. Change-Id: I7632d6e679e076bfbec9abc12da4a46cc27ccea1 Related: SYS#3028
* ipa: recv is declared in different headers on BSDHolger Hans Peter Freyther2015-11-091-0/+2
| | | | | | | | Include the headers mentioned by the manpage ipa.c:346:9: warning: implicit declaration of function 'recv' is invalid in C99 [-Wimplicit-function-declaration] ret = recv(fd, msg->tail, needed, 0);
* ipa: Properly parse LV stream of a ID_GET requestHolger Hans Peter Freyther2015-06-021-3/+13
| | | | | | | | For some reason the structure is closer to be a LV (length and value). The value is actually a tag but it is counted inside the length. Introduce an overload of the parse function to provide an offset for the length. This will be taken from the returned length.
* ipa: Return -errno instead of -1 in ipa_sendJacob Erlbeck2014-12-221-1/+1
| | | | | | | | | | | | | Currently, the ipa_send function returns -1 in one execution branch to indicate an error and -EIO in another. This is not consistent and can lead to a misinterpretation of the error code, since -1 is -EPERM and in general, EPERM is not returned by write(2). This patch changes the return code to -errno instead of -1 for the case that write(2) fails for same reason. So -rc is always a sensible error value if there is a failure. Sponsored-by: On-Waves ehf
* Change copyright notice of ipa.c to GPLv2+Harald Welte2014-10-261-4/+4
| | | | ... which it should have been all along.
* ipa: use %z as format string whne printing sizeof() resultHarald Welte2014-08-211-1/+1
| | | | thanks to Holger for reminding me
* ipa: fix compiler warning regarding printf (%d -> %lu)Harald Welte2014-08-211-1/+1
|
* ipa: rename functions for consistencyHarald Welte2014-08-201-0/+446
As we are breaking builds by moving functions from libosmo-abis to libosmocore anyway, we might as well give functions more appropriate names. ipaccess is a company, while IPA is the multiplex protocol, and CCM is the protocol used for establishing identities on the IPA multiplex.