Commit Graph

1008 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther b321b93286 vty: Address compiler warning about tolower
Include ctype.h to have a declaration of tolower.

utils.c: In function 'vty_cmd_string_from_valstr':
utils.c:95:6: warning: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
2012-09-11 10:39:29 +02:00
Holger Hans Peter Freyther cc7d9ec20e gsm: Address compiler warning about unused variable 'z'
The comment explains why we don't care about the content of z,
stop storing it.

gsm_utils.c: In function 'gsm_7bit_encode':
gsm_utils.c:253:13: warning: variable 'z' set but not used [-Wunused-but-set-variable]
2012-09-11 10:38:43 +02:00
Holger Hans Peter Freyther 06f645542c logging: Mark the log_info_cat pointer as consts
Applications should keep the log area in a static const area. Mark
the pointer as const to address compiler warnings in OpenBSC, cast
the const away for the osmo_log_info as it is not declared as const.
2012-09-11 10:31:29 +02:00
Harald Welte e92866bbb1 Gb: Add functions for sending flow control messages from BSS side 2012-09-10 08:56:04 +02:00
Harald Welte 30fabdf61d Gb: Add header file for BSS-side BSSGP functions
.. not sure how we could have missed that so far.
2012-09-10 08:54:35 +02:00
Harald Welte e3a10b66a4 libosmogb: make build conditional, disable in embedded build
when we build for osmocom-bb cross-compilation, we don't have
sockets nor netinet/in.h and thus NS/BSSGP make no sense...
2012-09-08 22:18:43 +02:00
Harald Welte aef917593a backtrace: don't use fprintf, but printf (for osmocom-bb) 2012-09-08 22:00:13 +02:00
Harald Welte 972b502eca msgb: msgb_get() is supposed to get bytes from END, msgb_pull() from HEAD
msgb_get() has been wrong all the time, despite the documentation being
correct.  If you've used the broken msgb_get() before, you have to
change your code now, sorry.
2012-09-08 20:01:00 +02:00
Harald Welte b1789b044a Merge branch 'bssgp_fc' 2012-09-07 12:14:07 +02:00
Harald Welte 0823e1e42a BSSGP: print per-bvc flow control parameters on vty 2012-09-07 12:13:09 +02:00
Harald Welte d8b476988d BSSGP: make bvc_ctx->fc a dynamic talloc allocation
this ensures that we can talloc the flow-control queue entries
as siblings off the bvc_ctx.
2012-09-07 12:07:54 +02:00
Harald Welte 04f0989d11 GPRS BSSGP test: integrate into autotest
we use a smalle shell script to iterate over multiple tests
2012-09-07 12:07:54 +02:00
Harald Welte 57e5b94e90 BSSGP flow-control: Add unit test for algorithm tests 2012-09-07 12:07:54 +02:00
Harald Welte bb8262275f BSSGP flow-control: various fixes
* add more comments on units of struct members
* make sure to parsre FC-BVC message correctly
* add error message in case user passes PDU larger than bucket size
* add new function to initialize flow control struct
2012-09-07 12:07:54 +02:00
Harald Welte d11c059502 libosmogb: Port BSSGP flow control from openbsc/laforge/bssgp_fc branch
This code is supposed to implement the BSSGP flow control algorithm,
both for the per-BSS and for the per-MS flow control.

The code currently has no test cases, they will come in a separate
commit.
2012-09-07 12:07:54 +02:00
Harald Welte 1f87d75b7a USSD: text is 'char' not uint8_t 2012-09-07 12:07:10 +02:00
Harald Welte 5b3bffb74c BSSGP: fix unused variable compiler warnings 2012-09-07 12:03:40 +02:00
Harald Welte ca0af8a3a8 libosmogb: build without strict aliasing rules
This allows us to reliably do the trick with casting structures like
libgb_msgb_cb to the msgb->cb[] array.  Shamelessly stolen from the
Linux kernel.
2012-09-07 12:01:28 +02:00
Harald Welte a102b63c28 gsmtap: add minimal support for encapsulating UMTS RRC in GSMTAP 2012-09-02 14:07:57 +02:00
Harald Welte 7c8e2cc7ac libosmogsm: Back-port SMS related fixes from openbsc
This was fixed in 9c3dc90d16a40789081c84e46620f4d66689fec1 of
openbsc.git, after the sms code had been migrated here:
    introduce HAVE_TM_GMTOFF_IN_TM

    Not all architectures have the tm.tm_gmtoff member.  This fixes cygwin builds.
2012-08-29 16:47:30 +02:00
Eric Butler b5372ab110 Use package version since git info won't be available. 2012-08-26 20:11:24 +02:00
Eric Butler 8dbdc4f3d4 Fix debian package building.
* Removed log file
* Add 'git' add 'libdpkg-perl' to build dependencies
* Disable tests (one of them is failing)
2012-08-26 20:11:24 +02:00
Holger Hans Peter Freyther 8c589d2f51 misc: Fix make distcheck of libosmocore by adding the result to the dist
Add the new result file to the EXTRA_DIST.
2012-08-25 22:03:42 +02:00
Harald Welte 30a8ec466c GSM 04.08: Add 'enum gsm48_bcap_speech_ver' 2012-08-24 23:00:05 +02:00
Harald Welte c8a0b93939 GSM 04.08: Add support for parsing CSD related bearer capabilities
Also adds a test case for both encoder and decoder of this IE
2012-08-24 21:37:59 +02:00
Harald Welte 7ccd3181c5 gsm48_ie: annotate functions with chapter numbers from 04.08 spec 2012-08-24 17:06:08 +02:00
Harald Welte eed26116c9 GSM 08.58: Add channel modes for transparent data services 2012-08-24 15:36:12 +02:00
Harald Welte fab0ae9b43 import vty_cmd_string_from_valstr() from osmo-bts
This function is able to generate a VTY help string based on an
array of 'struct value_string'.
2012-08-20 18:43:09 +02:00
Holger Hans Peter Freyther 08b286277b utils: Change semantic of OSMO_MAX/OSMO_MIN to match semantic of a function
Add parentheses around the OSMO_MAX and OSMO_MIN macro to match
the behaviour of calling a function. The current version does not
evaluate to what is expected. (OSMO_MAX(3, 2) + 13)  currently
results in 3 and not 16.
2012-08-15 17:08:21 +02:00
Harald Welte 335aedabf2 increaes libosmocgsm LIBVERSIN due to gsm_decode_lai() change 2012-08-03 10:51:10 +02:00
Harald Welte 22be129e1e serial: don't set O_NDELAY, as it is more or less O_NONBLOCK
Applications like osmocon will set O_NONBLOCK themselves or have it done
indirectly by registering it with libosmocore/select.c code.
2012-08-03 10:48:22 +02:00
Holger Hans Peter Freyther d296f4244f gb: Make suspend_ref a plain uint8_t instead of a uint8_t*
The OpenSUSE build is not happy about the uint8_t to uint8_t*
assignment. As the suspend_ref is a mandatory field we can make
it a plain uint8_t. Increase the LIBVERSION as the ABI has changed.
2012-08-03 10:08:02 +02:00
Holger Hans Peter Freyther 5a19bf7ccb libgb: Link to the libraries used by libgb
The Mandriva linker appears to be more strict in enforcing the
as-needed rules. Link to the libraries that are used by libgb.
2012-08-02 21:51:15 +02:00
Holger Hans Peter Freyther ea8f238f04 vty: Print the string using "%s", string to avoid security issues
The Mandriva GCC is more strict about handling format strings, the
copyright string might contain escape sequences and then any memory
could be read.
2012-08-02 21:26:02 +02:00
Harald Welte b53717f418 Add missing includes to timer_test.c and osmo-auc-gen.c
This fixes the build with -Werror-implicit-function-declaration.

taken from malformatted patch of Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
2012-08-02 08:42:59 +02:00
Holger Hans Peter Freyther 317aee5878 vty: Merge from a generic section in case no specific one exists 2012-07-25 17:35:52 +02:00
Holger Hans Peter Freyther e89ad6d1dd vty: Use UTF-8 for the encoding and the ability to hide nodes
There are certain nodes one might not want to document and the
additional information can decide to hide the node.
2012-07-25 17:35:52 +02:00
Holger Hans Peter Freyther c9b3e06d99 vty: Document the .TEXT of the description 2012-07-25 13:03:43 +02:00
Holger Hans Peter Freyther 8297c819e9 vty: Add xsd and a command that can generate the documentation.
When building the doxygen documentation do not remove the other
VTY documentation files in the doc/vty folder. Create a command
that can be installed to dump all nodes and commands as XML on
the given VTY. Create a schema for the XML file and a XSL-T script
that can merge the generated file with additional information.
2012-07-25 11:58:58 +02:00
Andreas Eversberg aa5d0e8894 Fix encoding of BSSGP_IE_NUM_OCT_AFF in bssgp_tx_llc_discarded()
This is a 24bit integer value, and thus we need to encode the three
least significant octets of the network-byte-order 32bit value, not the
three most significant octets.
2012-07-21 13:33:39 +02:00
Harald Welte 007a71e332 authentication: More documentation 2012-07-18 19:47:56 +02:00
Harald Welte a9e4a1402b backtrace: update copyright notice
Holger wrote that function and I made the logging version of it.  The
header was copied during the separation of backtrace.c from gsm_utils.c
in the past, and of course gsm_utils.c had more people involved...
2012-07-14 12:31:55 +02:00
Harald Welte 45ecd04e54 backtrace: Add a variant that uses the libosmocore logging framework
I recently discovered that we can only print backtraces to stdout, which
is of course useless in a daemon environment.  We'd rather want to use
the libosmocore logging framework instead.
2012-07-14 12:30:53 +02:00
Harald Welte 2fe684755a TLV: add new "vTvLV" type for GAN
This new TLV type is specific to TS 44.318.  Contrary to the TvLV type
of TS 08.16/08.18, it has an inverted meaning of the extension (0x80)
bit:
	* if the extension bit is not set, 1-byte length
	* if the extension bit is set, 2-byte length

Futhermore, it has support for variable-length tags, where the tag part
can be optionally two bytes in length.  As this esoteric option hasn't
been seen in the wild yet, we only add encoding support but skip
decoding for now.
2012-07-14 01:50:33 +02:00
Harald Welte a9250b9ebc gsm48_decode_lai(): return real integers for mcc/mnc, not hex!
This is to make it orthogonal with gsm48_encode_lai()
2012-07-13 22:57:31 +02:00
Harald Welte e866473f2a add gsm48_decode_lai() to map file 2012-07-13 21:48:35 +02:00
Harald Welte 774a9de8b3 import gsm48_decode_lai() function from osmocom-bb/mobile sysinfo.c 2012-07-13 21:35:13 +02:00
Harald Welte e30b6ac5d1 timer: Add function osmo_timer_remaining() to determine remainign time 2012-07-13 12:22:20 +02:00
Holger Hans Peter Freyther 3c16de2954 freebsd: Make libgb compile on FreeBSD
Include header files for recfrom/AF_INET and include a
struct ip_hdr as it is not available on *BSD.
2012-07-12 14:13:41 +02:00
Andreas Eversberg 3c6a2cef5e VTY: Allow to compile vty.h and command.h headers with C++ 2012-07-12 09:42:36 +02:00