Harald Welte
d61d517a2e
add missing declarations of cfg_description_cmd to vty/vty.h
2011-09-04 22:56:10 +02:00
Sylvain Munaut
fe28dedd4c
core/serial: Add utilities to deal with serial ports
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02 22:21:09 +02:00
Sylvain Munaut
bf9d25039c
build/include: Only install headers for enabled options
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02 20:41:42 +02:00
Harald Welte
a24026a499
RSL: add rsl_ipac_msg_name() for ipa specific RSL extension names
2011-09-02 12:26:50 +02:00
Christoph Fritz
ab7c9c766b
logging: include stdarg.h for va_list
...
fixes tiny compile error:
CC socket.lo
In file included from socket.c:13:
../include/osmocom/core/logging.h:31: error: expected declaration
specifiers or ‘...’ before ‘va_list’
make[3]: *** [socket.lo] Error 1
2011-09-01 17:44:35 +02:00
Harald Welte
712691d8d8
add functions for bit-reversal
...
Sometimes we need stuff like reversing every bit in each byte (but not
the byte-order).
2011-09-01 14:47:31 +02:00
Harald Welte
36c5a3e285
logging: add osmo_vlogp() as vararg / va_list compatible function
2011-08-31 19:40:03 +02:00
Holger Hans Peter Freyther
c2c0ad7832
signal: Fix compiler warning about signedness of constant
...
Use the u suffix to mark the constant as unsiged integer.
This fixes:
warning: this decimal constant is unsigned only in ISO C90
2011-08-22 15:31:17 +02:00
Harald Welte
be145198df
doxygen: document some more structure members for RSL
2011-08-18 11:45:18 +02:00
Harald Welte
4e777c300f
doxygen: Add documentation for Abis OML
2011-08-17 19:15:24 +02:00
Harald Welte
e881b1b9eb
doxygen: split VTY configuration in multiple files
2011-08-17 18:52:30 +02:00
Harald Welte
8f2c7e5b2b
RSL: add doxygen documentation
2011-08-17 18:52:21 +02:00
Harald Welte
6bdf0b158c
doxygen: Add documentation for LAPDm code
2011-08-17 18:22:08 +02:00
Harald Welte
57c7d37059
doxygen: Add documentation about TLV parser
2011-08-17 17:50:55 +02:00
Harald Welte
7acb30c69b
doxygen: Add (partial) VTY API documentation
2011-08-17 17:14:12 +02:00
Harald Welte
47379ca95b
doxygen: Add documentation for gsmtap_util.[ch]
2011-08-17 17:14:12 +02:00
Harald Welte
af8e4352b5
doxygen: Add documentation to signal.[ch]
2011-08-17 17:14:12 +02:00
Harald Welte
eee3790d24
doxygen: Add documentation for prim.h
2011-08-17 17:14:12 +02:00
Harald Welte
a523d14096
doxygen: document panic.[ch]
2011-08-17 17:14:12 +02:00
Harald Welte
9327c6dc0f
doxygen: Add docs for rate_ctr
2011-08-17 17:14:12 +02:00
Harald Welte
2777ecd987
doxygen: Add 'write_queue' module
2011-08-17 17:14:12 +02:00
Harald Welte
8598f1866e
doxygen: add doxygen module 'utils'
2011-08-17 17:14:12 +02:00
Harald Welte
18fc465b7f
doxygen documentation for logging framework
2011-08-17 17:14:12 +02:00
Harald Welte
ba6988bd89
some more doxygen work (include the notion of modules)
2011-08-17 17:14:11 +02:00
Harald Welte
bd598e3c5e
start to add doxygen documentation to libosmocore headers
2011-08-16 23:26:52 +02:00
Harald Welte
2af435986f
fix off-by-one error in OSMO_NUM_DLIB
...
This bug was introduced in 95f7eb288c
and
it caused a segfault on 'write terminal'
2011-07-29 15:12:41 +02:00
Harald Welte
430be84994
add definition of OSMO_MIN macro, similar to OSMO_MAX
2011-07-27 23:28:41 +02:00
Dennis Wehrle
291e61346b
sms: SMS where cropped (from VTY), concatenation of SMS where not possible
...
Additionally it wasn't possible to send concatenated sms from the vty.
To send multiple sms, it is necessary to use padding bits and add a user_data_header.
Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets.
gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter
Additionally the gsm_7bit_decode function was modified to take account for the user_data_header.
With the new gsm_get_octet_len function you can get the octet length for a given septet length.
I also added several sms tests.
2011-07-24 20:14:13 +02:00
Holger Hans Peter Freyther
c0dbe0be05
vty: Increase the number of arguments one can have in VTY commands
...
For some interactive commands (e.g. sending a SMS in OpenBSC) we
are using the "NAME." arg definition. For the usecase of sending SMS
it is not enough to only allow about 13 spaces. Increase the limit.
Original patch is coming from Dennis Wehrle.
2011-07-24 19:58:06 +02:00
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
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
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
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
Harald Welte
9b837e6fda
gsm 08.08: add value_strings and gsm0808_msg_name() function
2011-07-11 17:45:31 +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
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
Harald Welte
5e924a31a0
introduce GSM primitive definitions
...
The idea here is to use the osmocom core primitive code ot abstract out
primitives for inter-layer comunication in GSM.
2011-06-23 15:04:47 +02:00
Harald Welte
9b21e88367
add new 'prim.h' header file for primitives
2011-06-23 14:14:20 +02:00
Pablo Neira Ayuso
0849c9af2a
socket: add OSMO_SOCK_F_[CONNECT|BIND|NON_BLOCK] flags
...
This extends the socket infrastructure in libosmocore to allow
to create non-blocking sockets.
Basically, it replaces the connect0_bind1 parameter by one
flags parameter.
2011-06-13 19:15:59 +02:00
Harald Welte
ee50081daa
add missing #include file to sysinfo.h
...
(otherwise 'struct value_string' would not be defined)
2011-06-05 19:53:56 +02:00
Harald Welte
fc90646d48
abis_nm.h: Add include to gsm_utils.h
2011-06-05 11:22:59 +02:00
Holger Hans Peter Freyther
271c43b0ae
abis_nm: Forward declare the used enums
...
This file is using enums in that might or might not be
known to the compiler. Forward declare them.
2011-05-31 00:42:38 +02:00
Harald Welte
cd623ebb56
bitvec: add missing stdint.h
2011-05-29 15:37:38 +02:00
Harald Welte
11c7193ad8
Import abis_nm_{chcomb4pchan,pchan4chcomb}() from openbsc
2011-05-24 17:22:55 +02:00
Harald Welte
b5503136fa
Import sytem information related definitions + code from openbsc
2011-05-24 15:01:53 +02:00
Holger Hans Peter Freyther
3036612d59
abis_nm: Mark the structs as extern to avoid compiler warning
...
warning: array ‘abis_nm_obj_class_names’ assumed to have one element
2011-05-23 21:41:34 +02:00
Harald Welte
ea4b12aa5d
abis_nm: remove abis_nm_obj_class_name / abis_nm_adm_state_name
...
and export the underlying raw value_string arrays instead:
abis_nm_obj_class_names / abis_nm_adm_state_names.
This permits the caller to use get_string_value() as well as
get_value_string().
2011-05-23 20:41:31 +02:00
Harald Welte
61dc63e354
rename abis_nm_adm_name() to abis_nm_adm_state_name()
2011-05-23 20:30:17 +02:00
Harald Welte
f7a1bcce0c
abis_nm: import definitions and common code on A-bis OML from OpenBSC
2011-05-22 22:45:16 +02:00
Harald Welte
4185fa5d9b
libosmogsm: add ipaccess related header file
2011-05-22 21:57:15 +02:00
Harald Welte
68b1574257
socket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() function
...
osmo_sock_init_ofd() is a wrapper around osmo_sock_init() which will
take care of initializing and registering a 'struct osmo_fd' for the
newly-created socket.
2011-05-22 21:47:29 +02:00
Harald Welte
e476442cf0
GSMTAP/socket code: Check for sys/socket.h and conditionally compile
2011-05-22 12:25:57 +02:00
Harald Welte
33cb71ac91
gsmtap: rework GSMTAP API to be more future-proof
...
* use write_queue where applicable
* provide functions that work on raw FD and those with osmo_fd
* add support for multiple gsmtap instances (no global variables)
2011-05-22 11:43:23 +02:00
Holger Hans Peter Freyther
ba01fa44fe
app: Introduce some routines to help with application startup
...
The plan is to collect structs and routines for application
setup and remove many copies of the boilerplate code we have
right now. This starts with routines to ignore certain signals
and the stderr init code.
Increment the age of the library because a new interface was added.
2011-05-12 15:43:47 +02:00
Pablo Neira Ayuso
1b4a42c3b1
msgfile: use namespace prefix osmo_* and use more descriptive names
...
Summary of changes:
s/msg_entry/osmo_config_entry/g
s/msg_entries/osmo_config_list/g
s/msg_entry_parse/osmo_config_list_parse/g
minor glitch included in this patch while I was at it:
-#include "linuxlist.h"
+#include <osmocom/core/linuxlist.h>
2011-05-07 13:14:41 +02:00
Pablo Neira Ayuso
2c34867fc3
plugin: use namespace prefix osmo_*
...
Summary of changes:
s/plugin_load_all/osmo_plugin_load_all/g
2011-05-07 13:00:52 +02:00
Pablo Neira Ayuso
619b8b3292
backtrace: use namespace prefix osmo_*
...
Summary of changes:
s/backtrace/osmo_backtrace/g
2011-05-07 13:00:52 +02:00
Pablo Neira Ayuso
ddcd2afc82
crc: use namespace prefix osmo_*
...
Summary of changes:
s/crc16_table/osmo_crc16_table/g
s/crc16/osmo_crc16/g
s/crc16_byte/osmo_crc16_byte/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
87f7b25e56
utils: use namespace prefix osmo_*
...
Summary of changes:
s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
220abab3fa
statistics: use namespace prefix osmo_counter*
...
Summary of changes:
s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free/g
s/counters_for_each/osmo_counters_for_each/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
9111d930a5
write-queue: use namespace prefix osmo_wqueue*
...
Summary of changes:
s/struct write_queue/struct osmo_wqueue/g
s/write_queue_init/osmo_wqueue_init/g
s/void write_queue_clear/osmo_wqueue_clear/g
s/write_queue_enqueue/osmo_wqueue_enqueue/g
s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
a10dd35566
signal: use namespace prefix osmo_signal*
...
Summary of changes:
s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
f7f89d0cfe
select: use namespace prefix osmo_fd* and osmo_select*
...
Summary of changes:
s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso
0b21c1c885
timer: use namespace prefix osmo_timer*
...
Summary of changes:
s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
2011-05-07 13:00:51 +02:00
Harald Welte
d58ba465f1
GSMTAP: add function to create a 'sink' for gsmtap packets
...
This can be helpful where we send GSMTAP messages to the loopback
device (localhost, 127.0.0.1) from where the kernel would then
send ICMP reject packets as nobody is listening on that port.
2011-05-04 11:09:21 +02:00
Sylvain Munaut
19dc5c9cca
core/conv: Add some generic code for convolutional coding/decoding
...
Far from perfect but suits our need thus far.
The viterbi with softbit input is quite cpu-intensive. Since
most received bursts are often mostly error free, you could
use a less cpu intensive algorithm (Fano ?) and with hard bit
input. Then only switch to viterbi soft bit input if the channel
is bad enough to justify it.
Soft output is not implemented as its usefulness for the block
coding is limited.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-26 14:40:49 +02:00
Sylvain Munaut
f1d3344781
gsm/a5: Add a A5 1&2 implementation
...
It's always useful to have around
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-26 14:40:49 +02:00
Pablo Neira Ayuso
240f01cfa7
include: fix missing extern in osmo_panic* declarations
...
This patch adds the missing extern to osmo_panic* declarations.
2011-04-26 14:36:52 +02:00
Holger Hans Peter Freyther
a9f526a1ab
stats: Fix the compiler warnings
...
Do not remove the const, include strings.h for strcmp
2011-04-18 16:46:35 +02:00
Daniel Willmann
334c8e1780
Add a function to search for a counter by name
2011-04-09 20:52:18 +02:00
Daniel Willmann
2d42ddeba3
Add functions to search for rate counters by name
...
* rate_ctr_get_group_by_name_idx, rate_ctr_get_by_name
2011-04-09 20:52:12 +02:00
Pablo Neira Ayuso
3abad6a6f9
utils: move OSMO_SNPRINT_RET() macro definition to osmocom/core/utils.h
...
This is used by the logging to vty conversion functions by now, but it
may be of help for other functions that plan to use snprintf().
2011-03-28 20:00:45 +02:00
Pablo Neira Ayuso
70004fcc6d
vty: move vty_out_rate_ctr_group prototype to osmocom/vty/misc.h
...
Before this patch, it was in osmocom/core/rate_ctr.h
2011-03-28 20:00:45 +02:00
Pablo Neira Ayuso
dc35dbee95
write_queue: use full path of includes in osmocom/core/write_queue.h
2011-03-28 20:00:45 +02:00
Pablo Neira Ayuso
36bdf2cb73
bitvec: add bitvec_find_first_bit_pos() from gsm/rxlev_stat.c
...
This patch adds bitvec_find_bit_pos() to bitvec.c where it really
belongs to. Before this patch used to be part of gsm/rxlev_stat.c
2011-03-28 20:00:45 +02:00
Sylvain Munaut
d6643d5fcf
core/bits: Make sbit_t a signed type (so that the math works)
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-03-27 11:35:40 +02:00
Pablo Neira Ayuso
8341934844
include: reorganize headers file to include/osmocom/[gsm|core]
...
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.
This has been proposed by Harald Welte and Sylvain Munaunt.
Tested with `make distcheck'.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:09:28 +01:00
Pablo Neira Ayuso
fba495e5f6
This patch moves the GSM-specific functions to the new library
...
libosmogsm which is provided by libosmocore.
I have also moved generate_backtrace() to backtrace.c instead
of gsm_utils.c, otherwise the timer and msgfile tests depend on
libosmogsm.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:08:08 +01:00