Commit Graph

402 Commits

Author SHA1 Message Date
Harald Welte b7b61236d8 don't call a function argoment 'class' for the benefit of c++ users
This had broken lcr compilation...
2011-07-23 10:50:36 +02:00
Holger Hans Peter Freyther 59b3175dfb ipaccess: Reserve an extensions for an external SMSC connection
This could be used to submit SMS to OpenBSC and to get informed
about new SMS coming from OpenBSC.
2011-07-23 09:59:24 +02:00
Harald Welte 95f7eb288c remove DLRSL and DLNM, we don't need them
They are not used anywhere in our libraries, so they should be defined
by the respective applications
2011-07-21 16:58:44 +02:00
Harald Welte 892e621fec make sure we don't have namespace clashes between libraries and apps
* All loging prefixes in libraries should be DL like DLINP
* All signals / subsystems should be called S_L_* SS_L_*
* All command nodes should be called L_*_NODE

This makes sure existinc code still compiles as expected
2011-07-19 14:31:44 +02:00
Harald Welte c5a0ded53f mkae the new 'void *dst' member part of a union with the trx pointer
this ensures struct msgb is the same size as before, which will ensure
binary compatibility
2011-07-18 17:00:08 +02:00
Pablo Neira Ayuso 2ade3a0222 vty: reserve nodes for libosmo-abis
This patch reserves E1INP_NODE and IPA_NODE for libosmo-abis
VTY interfaces.
2011-07-18 17:00:08 +02:00
Pablo Neira Ayuso 29cbf618e3 msgb: add ->dst attribute to store routing information
This patch adds a new attribute to msgb objects. This new
attribute will store a pointer to the routing information,
in the case of the A-bis link, this will be used to store
e1inp_sign_link instead of struct gsm_bts_trx.

This deprecates msg->trx, that can be removed once all
application are ported to use msg->dst.
2011-07-18 17:00:08 +02:00
Pablo Neira Ayuso 199f37723b logging: add libosmo-abis logging subsystems
This adds the libosmo-abis logging subsystems to libosmocore,
it uses the new change that harald proposed based on negative
numbers for library logging subsystems.
2011-07-18 17:00:08 +02:00
Pablo Neira Ayuso 39c0243d9b signal: reserve signal subsystems >= INT_MAX/2 for libraries
The first range (from 0 to INT_MAX/2) of signal subsystems can be
used by client applications while the second range (from INT_MAX)
is reserved for libraries.

This is useful to support signals defined in libraries that
may be used by different client applications.
2011-07-18 17:00:07 +02:00
Holger Hans Peter Freyther ec4f160e2d misc: Put git-version-gen into the tarball
autoreconf does not work on released tarballs due the
missing git-version-gen. Add it.
2011-07-17 12:14:43 +02:00
Harald Welte e0aa5bb9f7 gsm 04.80: fix typo (256, not 265!)
This was introduced by me in commit
79599ba0eb

Thanks to Alexander Huemer for detecting it
2011-07-16 15:42:46 +02:00
Harald Welte 39b44bbca7 gsm 04.80: ussd_request.text can contain 0xff, needs to be unsigned
Found by Smatch
2011-07-16 13:28:59 +02:00
Harald Welte 584427cd04 lapdm: fix memory leak due to unreachable code
detected by Smatch
2011-07-16 12:21:55 +02:00
Harald Welte f4d45ab021 gsm 08.08: use ANSI function definition with (void) 2011-07-16 12:13:00 +02:00
Harald Welte 79599ba0eb tlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff
If we encounter a tag with 0xFF, we overflow our existing tlv_parse
array definitions.

Warning: this breaks ABI
2011-07-16 12:08:28 +02:00
Harald Welte 4876dcf12b gprs_cipher_core: Fix potential buffer overflows
detected by Smatch
2011-07-16 12:03:46 +02:00
Harald Welte 2b32215fc3 telnet_interface: if we don't check for the return value, don't use ret 2011-07-16 12:03:46 +02:00
Harald Welte 9c3cbfb01e telnet_interface: get rid of 'const' warning 2011-07-16 12:03:46 +02:00
Harald Welte 95b2b47b26 get rid of non-ANSI function declarations missing (void)
Detected by Smatch
2011-07-16 12:03:46 +02:00
Harald Welte 87dbca148f don't use signed bit-fields
detected by Smatch
2011-07-16 12:03:46 +02:00
Harald Welte 7e82020259 timer: use (void) for functions that take no arguments
This has been detected by http://smatch.sourceforge.net/
2011-07-16 12:03:46 +02:00
Holger Hans Peter Freyther d9db89d1e7 Revert various debian related changes
The debian related changes were not meant to be comitted and
were local experiments. The changes should go through Jan and
not this way.

Revert "more changes"
This reverts commit 96ba20cb44.

Revert "debian: Updates to fix lintian errors"
This reverts commit b670c86edd.

Revert "debian: Switch to the 3.0(quilt) format to play with launchpad"
This reverts commit 7a91d6071d.

Revert "debian: Add new changelog entry for the shlib:Depends change"
This reverts commit 54b8c4e0ed.

Revert "debian: dpkg-buildpackage complains about this here"
This reverts commit 4284307ead.

Revert "debian: Add a new changelog entry"
This reverts commit ae9b220d16.
2011-07-16 11:11:31 +02:00
Holger Hans Peter Freyther 128d9e2343 osmo_hexdump: Fix segfault when input is too long.
In snprinftf the size is a size_t (unsigned) in case we want
to write more than we have available, len_remain will be < 0.

This was spotted while removing hexdump from simtrace and comparing
it to our implementation.

int snprintf(char *str, size_t size, const char *format, ...);
2011-07-15 16:07:23 +02:00
Holger Hans Peter Freyther 96ba20cb44 more changes 2011-07-13 21:11:39 +02:00
Holger Hans Peter Freyther b670c86edd debian: Updates to fix lintian errors 2011-07-13 20:38:59 +02:00
Holger Hans Peter Freyther 7a91d6071d debian: Switch to the 3.0(quilt) format to play with launchpad 2011-07-13 17:16:29 +02:00
Holger Hans Peter Freyther 54b8c4e0ed debian: Add new changelog entry for the shlib:Depends change 2011-07-13 15:08:45 +02:00
Holger Hans Peter Freyther 4284307ead debian: dpkg-buildpackage complains about this here 2011-07-13 14:08:18 +02:00
Holger Hans Peter Freyther ae9b220d16 debian: Add a new changelog entry 2011-07-13 13:55:30 +02:00
Harald Welte 0c83670a59 GSM 08.08: Fix generation of CIPHER MODE REJECT
The message has a total length of 4 octets, so don't allocate only 3 in the
msgb.
2011-07-12 00:02:27 +02:00
Harald Welte 9b837e6fda gsm 08.08: add value_strings and gsm0808_msg_name() function 2011-07-11 17:45:31 +02:00
Harald Welte da127cbb3e fix against corrupted output in parallel logging
In 8256076722 it was attempted to fix
a bug previously introduced by logging related changes.  The problem
is that a va_list can be corrupted after it has been used once, so
we need to va_copy before each successive use.

And if we copy it, we also need to use the copy, and not the original ;)
2011-07-02 21:51:32 +02:00
Harald Welte 8264e09ca2 lapdm: make sure we flush all queues whenever entering IDLE state
this fixes a memory leak where the final UA would always remain
in memory after a LAPDm entity has been disconnected.
2011-06-29 19:22:47 +02:00
Harald Welte 9e1f0604b5 add msgb_set_talloc_ctx() to set the talloc context for msgb allocations 2011-06-29 18:46:10 +02:00
Harald Welte 7721a77eaf make sure abis_nm <-> osmocom pchan type conversion always works 2011-06-29 18:44:06 +02:00
Harald Welte 7ca604bcd3 LAPDm: Uplink SACCH frames use format B, not format B4 2011-06-29 12:13:51 +02:00
Harald Welte 6420774b3b LAPDm: When Rx DATA from L1, L1 does not know the SAPI
We have to determine the SAPI ourselves inside the LAPDm header.
2011-06-27 23:32:14 +02:00
Harald Welte ce9fec3e89 Fix the generation of the log_categories string + LAPDM
... I should do more testing :(

Conflicts:

	src/logging.c
2011-06-27 23:19:06 +02:00
Harald Welte 9fe1652212 logging: make sure to add the internal categories, as intended 2011-06-27 23:17:35 +02:00
Harald Welte 1f0b8c26f7 add LAPDm code from osmocom-bb into libosmocore 2011-06-27 10:51:37 +02:00
Harald Welte b43bc048eb logging: introduce library-internal logging categories
We do this by using a trick: library-internal log categories use
negative subsystem numbers, which are converted into positive
array indexes at the time of logging.

library-internal log categories need to be knwo at compile-time,
while application-specified categories now are of unlimited number,
as they are dynamically allocated.
2011-06-27 10:40:25 +02:00
Harald Welte ea19c97816 import gsm0502_calc_paging_group() from openbsc 2011-06-26 14:47:16 +02:00
Harald Welte 94df39e905 add some utility functions for paging related calculation (TS 05.02) 2011-06-26 14:40:12 +02:00
Harald Welte 2aee7b14ca add gsm48_number_of_paging_subchannels() function
(from openbsc's rsl_number_of_paging_subchannels)
2011-06-26 14:20:04 +02:00
Harald Welte e9b744e581 add MAX() macro as OSMO_MAX 2011-06-26 14:19:54 +02:00
Harald Welte 32e1f239b3 merge process.[ch] with application.[ch] 2011-06-26 14:14:05 +02:00
Andreas Eversberg 2a68c7c8cd gsm/utils: Adding conversion of "mobile power class" to dBm
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-06-26 11:41:48 +02:00
Harald Welte 620f7ab350 sysinfo: add EXTENDED MEASUREMENT ORDER / MEASUREMENT INFO to SI types
those two are used in the RSL SACCH FILLING messages and delivered
like SI5 / SI6.
2011-06-25 21:39:18 +02:00
Harald Welte 3d73227b61 RSL: Fix typo 2011-06-25 21:39:01 +02:00
Harald Welte cf7e5dad45 add value_string definitions for RSL message types 2011-06-23 20:44:03 +02:00