aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-01-27allow user to give private data to osmo_sua_user_create()Harald Welte1-1/+9
... which can be resolved from the primitive call back prim_cb() by calling osmo_sccp_link_get_user_priv(). Change-Id: If4c0f96f0621fb2adf4c78dc5994d3398431d92f
2016-12-12fix NULL deref: sua_accept_cb: missing error-returnNeels Hofmeyr1-1/+3
When server creation failed, besides closing the fd also return an error, instead of continuing to use the NULL srv. Change-Id: Iabfae7e5a880d10e4050da4945200ce9b848e577 Fixes: coverity CID#57684
2016-12-11NULL safety: sccp_create_sccp_addr: copy only non-NULL sock->gtiNeels Hofmeyr1-2/+4
presumably, sock->gti_len is always zero when sock->gti is NULL, but ensure with a check and make coverity scan happy. Change-Id: I6cf195a3fbda1d9eacbbaec9a0e7f5b4c154f428 Fixes: coverity CID#57683
2016-11-11sua: Remove unused 'cur' variablesHarald Welte1-2/+0
There are some compiler warnings about other unused variables which we rather keep as a reminder that the SUA code is partially incomplete and should be finished at some day. Change-Id: I42b76351f1bbdfb7fe339d5fad98c5a065822a45
2016-07-06cosmetic: rename osmo_sua_link and osmo_sua_user to osmo_sccp_*Neels Hofmeyr1-41/+41
hwelte requested this change for the addition of libiu in openbsc. In a conversation we came to the conclusion that a rename of these two opaque structs would suffice. This is the "upstream" rename and will require adaptation of: * the sysmocom/iu branch in this repository * the iu related branches in openbsc.git * the hnbgw and dummy_cn code in osmo-iuh.git See https://gerrit.osmocom.org/#/c/192/2/openbsc/src/libiu/iu.c@57 Change-Id: Icbf64dd96f8e0e27695df73d1144519b88360b94
2016-06-14fix log msg typo, x5Neels Hofmeyr1-5/+5
Change-Id: I00ff99ef14d62d3b353fe69762ae49f374938f94 Reviewed-on: https://gerrit.osmocom.org/265 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-06-14clarify fixme comment, x7Neels Hofmeyr1-7/+7
The fixme is about an actual message sent back, not about the error log. Change-Id: I6de8fb202c7beb025232e9b97605e9f46778506a Reviewed-on: https://gerrit.osmocom.org/228 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-02-12Fix for big-endian architecturesRuben Undheim1-0/+12
2015-12-24fix build if depenedencies are in distinct directoriesAlexander Huemer1-1/+1
2015-12-22sccp.c: Fix compiler warnings about size_t / %uHarald Welte1-3/+3
2015-12-22Import SUA (SCCP User Adaptation) and SCCP User SAPHarald Welte4-2/+1490
... this code originates from the osmo-iuh repository, but is now part of a new shared libosmo-sigtran.so library generated in this repository.
2015-06-15sccp: Allow to specify the context of the incoming messageHolger Hans Peter Freyther1-7/+12
At the time a SCCP CREF is sent there is no context anymore and the user of the API might not know where to return the message to. Allow to specify the incoming context and use it on the way out. There are no more callers of _send_msg which passes a NULL connection and a NULL context.
2015-03-23xua: Generalize the m2ua_msg and call it xua_msgHolger Hans Peter Freyther2-38/+38
Generalize, this requires various API modifications but that is the most sane path forward.
2015-03-23XUA: Move m2ua headers to sigtran, create xua_types.h and m3ua_types.hHolger Hans Peter Freyther1-1/+1
Begin with type definitions for m3ua
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-04-10sccp: Create sccp_create_cr and use it in the connection creationHolger Hans Peter Freyther1-24/+38
The data is optional in the in the CR msg so we have to check if the msgb is NULL or not.
2013-04-10misc: Use a unsigned result for the sizeof sizesHolger Hans Peter Freyther1-5/+5
Avoid comparing unsigned/signed values with the msgb. In practice our messages are way lower than this would would matter though.
2011-06-04sccp: Make sccp_write take an additional local context0.0.6Holger Hans Peter Freyther1-15/+17
For connection less data there is no way to pass a per context data for outgoing data, add one.
2011-05-08namespace: use osmo_static_assert() instead of static_assert()Harald Welte1-1/+1
2011-03-23Update include paths with libosmocore 0.2.00.0.5Harald Welte2-7/+7
2011-01-22m2ua: Allow to set a log area for DM2UA.Holger Hans Peter Freyther1-0/+5
2011-01-18m2ua: Fix the padding calculationHolger Hans Peter Freyther1-2/+2
This was found in interop testing. We have to add number of bytes to fill up four that are not provided by the payload but nothing if the rest is zero.
2011-01-14m2ua: Okay... get the order of the arguments rightHolger Hans Peter Freyther1-1/+1
2011-01-14m2ua: Attempt to use a memcpy... maybe this is fixing a segfaultHolger Hans Peter Freyther1-1/+1
This is a bit of exploring why this could fail...
2011-01-14m2ua: Pad the data properly, read over the padding properlyHolger Hans Peter Freyther1-1/+14
2011-01-13m2ua: Implement to find a tag inside a messageHolger Hans Peter Freyther1-0/+11
2011-01-12m2ua: Add parsing and creation of m2ua packagesHolger Hans Peter Freyther2-1/+157
2011-01-12mtp: Remove the mtp_data header file as it refers to the cellmgrHolger Hans Peter Freyther2-513/+1
2010-11-26sccp: Add a test case for GTI creation, set the SSN indicator bitHolger Hans Peter Freyther1-1/+1
Make sure that creating an address that should be routed based on the GTI can be created properly.
2010-11-16sccp: Use the length of the address to update the offsetsHolger Hans Peter Freyther1-8/+14
Instead of guessing the length of an address, use the result of the sccp_create_addr method.
2010-11-16sccp: Rewrite the sccp_test_addr to set the size correctlyHolger Hans Peter Freyther1-13/+21
Fix the code to set the number of consumed bytes correctly and return the number of bytes consumed for for the address. Add a simple but expandable test case to test the SCCP address
2010-11-16sccp: Make the sccp_create_addr function publicHolger Hans Peter Freyther1-4/+4
Prefix it with sccp_ and remove the static. This way we can test this from the unit tests.
2010-08-25sccp: Pass the sccp_connection down to the send method if it exists0.0.3Holger Hans Peter Freyther1-12/+12
This allows to identify the sccp connection and send the SCCP payload down to a different stream depending on the connection. It will be used by the bsc_msc_ip to keep multiple MSC connections open.
2010-08-02sccp.c: Make the create work with data + len to not have a msgbHolger Hans Peter Freyther1-6/+6
2010-08-02sccp: We have the gti_ind inside the address already.Holger Hans Peter Freyther1-1/+0
2010-08-01sccp: Allow to create a _udt message with the given parameter.Holger Hans Peter Freyther1-3/+18
2010-08-01sccp: Use the function to put the sccp address.. fixes GTI for connectHolger Hans Peter Freyther1-5/+2
2010-08-01mtp: Add the MTP Level3 code to the SCCP repoistoryHolger Hans Peter Freyther3-1/+600
SCCP can be wrapped inside the MTP Level3, and one can use it for link testing as well. This repository should be renamed to libosmo-itu or libosmo-ss7 and be a host to SS7 related encapsulation... The code is coming from the cellmgr-ng code.
2010-08-01sccp: Rename the SCCP file and delete the sccp/ directory..Holger Hans Peter Freyther2-1/+1
2010-08-01sccp: Remove SCCP address check, routing is a different topic..Holger Hans Peter Freyther1-32/+0
We do not do any routing right now... we will accept everything right now and that appears to be fine.
2010-08-01sccp: Allow to have more data in the buffer than wanted by UDT..Holger Hans Peter Freyther1-1/+1
2010-08-01sccp: Copy out pointers to the GTI into the parsed structure..Holger Hans Peter Freyther1-2/+4
2010-08-01sccp: Make it possible to have a POC inside the sockaddr_sccp.Holger Hans Peter Freyther1-2/+12
Embed the POC, add the indicator, add the POC byte.
2010-08-01sccp: Make it possible to put a GlobalTitle into the SCCP header.Holger Hans Peter Freyther1-11/+22
2010-07-30sccp: Add a new buildsystem for the OSMO SCCP libraryHolger Hans Peter Freyther1-0/+7
2010-07-30sccp: Adjust the code to only depend on libosmocoreHolger Hans Peter Freyther1-1/+8
* Introduce a method to set the value of the debug area to use and default it to -1. Turn the DSCCP enum into a local variable to make the log messages work. * Remove usage of openbsc and libbsc.a
2010-07-23sccp: u_int32_t -> uint32_tHolger Hans Peter Freyther1-17/+17
2010-07-23sccp: u_int16_t -> uint16_tHolger Hans Peter Freyther1-2/+2
2010-07-23sccp: u_int8_t -> uint8_tHolger Hans Peter Freyther1-20/+20
2010-05-17[sccp] Add method to create a dt1 packet.Holger Hans Peter Freyther1-12/+27