Harald Welte
d1476bc603
db: use ANSI (void) function declarations
2011-07-16 13:24:09 +02:00
Harald Welte
2c5f4c635a
db: fix Smatch warnings
...
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +254 db_fini(6) info: redundant null check on db_dirname calling free()
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +256 db_fini(8) info: redundant null check on db_basename calling free()
/home/laforge/projects/git/openbsc/openbsc/src/libmsc/db.c +280 db_create_subscriber(20) warn: variable dereferenced before check 'subscr'
2011-07-16 13:22:57 +02:00
Harald Welte
46324ccfcd
bsc_vty: Fix some Smatch warnings
...
/home/laforge/projects/git/openbsc/openbsc/src/libbsc/bsc_vty.c +1062
show_e1ts(25) warn: variable dereferenced before check 'line'
/home/laforge/projects/git/openbsc/openbsc/src/libbsc/bsc_vty.c +1075
show_e1ts(38) warn: buffer overflow 'line->ts' 32 <= 32
2011-07-16 13:16:39 +02:00
Harald Welte
142c4b8ca8
abis_nm: fix signedness error (uint8_t len cannot be negative)
...
Detected by Smatch
2011-07-16 13:03:29 +02:00
Harald Welte
7017fa7c9d
[bsc-nat] ctrlif: use llist_entry() macro and fix overly-long lines
2011-07-13 14:53:16 +02:00
Harald Welte
f071e16f23
[bsc-nat] ctrlif: save ourselves one level of indentation
2011-07-13 14:53:16 +02:00
Harald Welte
6552047d44
[bsc-nat] ctrlif: use the 'err' label consistently
...
and propagate -ENOMEM in case we have no memory
2011-07-13 14:53:16 +02:00
Harald Welte
f8e49dd187
bsc-nat: ctrlif: split out handle_ctrlif_msg() from ipaccess_bsc_read_cb()
...
We want to avoid spaghetti code by creating smaller functions,
which also helps with the line lengths / indentation levels.
2011-07-13 14:53:16 +02:00
Harald Welte
1b5e5c3727
controlif: declare controlif_setup() in control_cmd.h
...
this avoids us to copy+paste external declarations over all 'main'
files.
2011-07-13 14:53:16 +02:00
Harald Welte
f505f5dff1
controlif: Adapt to minor data structure change regarding nm_state
...
This was required due to master diverging from where controlif
had last branched off.
2011-07-13 14:53:15 +02:00
Harald Welte
07252918ea
Merge branch 'daniel_ctrlif'
2011-07-13 14:52:51 +02:00
Daniel Willmann
a86bc39cc9
nat: Use libctrl and add command forwarding to osmo-bsc
...
Passes commands beginning with "bsc.<num>" to the bsc that is
responsible for LAC <num>.
2011-07-13 14:07:11 +02:00
Daniel Willmann
fc5391f54e
libctrl: Add ctrl_cmd_cpy() to copy a command
2011-07-13 14:07:10 +02:00
Daniel Willmann
bc07090af2
osmo_bsc: Add some libctrl commands
...
* net.location to get/set the geographical location of the network
format is <tstamp>,<lat>,<lon>,<height>
* per trx rf_locked command (net.bts0.trx0.rf_locked)
* network-wide rf_locked command (net.rf_locked)
2011-07-13 14:07:10 +02:00
Daniel Willmann
f7d557cdf2
osmo_bsc: Use libctrl, handle ctrl cmds on port 4249 or from the nat
...
This patch initializes libctrl to listen for connections on port 4249.
Additionally, control messages arriving from the nat will also be
processed.
2011-07-13 14:07:10 +02:00
Daniel Willmann
e8aef2a84b
bsc_hack: Use libctrl, listen on port 4249
2011-07-13 14:07:10 +02:00
Daniel Willmann
2c192639b5
libctrl: Add commands to query counters and rate_cntr
...
These commands are installed in controlif_setup. Query them like this:
"rate_ctr.<interval>.<counter group>.<index>.<counter name>" for rate
counters and "counter.<counter name>" for regular counters. <interval>
may be either "abs" for absolute values or one or
"per_{sec,min,hour,day}".
It is possible to query all rate counters in a group (regardless of
index) or all counters in a group and with a certain index if you omit
<counter name> and <index> or just <counter name>.
2011-07-13 14:06:18 +02:00
Daniel Willmann
e46792971b
libctrl: Add macros to help define commands
2011-07-13 14:06:18 +02:00
Daniel Willmann
4462f8c30f
Add libctrl, an SNMP-like control interface
...
In contrast to the VTY interface the control interface is meant to be
used by programs.
This patch adds basic support, no commands are defined.
2011-07-13 14:06:18 +02:00
Daniel Willmann
203d865317
Add example to communicate through the control interface
2011-07-13 14:06:18 +02:00
Daniel Willmann
4bcc1c37b8
Add documentation for the control interface protocol
2011-07-13 14:06:18 +02:00
Harald Welte
7d33bdf962
osmo-bsc: Some more logging (LOGL_INFO).
2011-07-12 00:05:11 +02:00
Harald Welte
75413c4928
osmo-bsc: Add missing return statement causing CIPH MODE REJ
...
due to a missing return statement, we ran into the 'reject' case
of bssmap_handle_cipher_mode(). Due to another bug in libosmocore,
the reject message was corrupted (fixed in libosmocore commit
0c83670a595a278b7d1fb7b21b2eacab84d3c031)
2011-07-12 00:03:43 +02:00
Harald Welte
376f782e28
osmo_bsc_msc: use DMI consistnetly for debugging packet payload
2011-07-11 18:19:33 +02:00
Harald Welte
cccd301499
bsc/msc bssap: some logging clean-up
...
* the DEBUG level will print hex-dumps of messages
* all other messages are INFO or higher
* print human-readable name of BSSMAP message types
2011-07-11 18:18:35 +02:00
Harald Welte
9f32a8a3c1
use the recently introduced gsm0808_bssmap_name() of libosmogsm
...
This allows human-readable printing of message types on the A interface.
2011-07-11 17:56:50 +02:00
Harald Welte
a0d9db99cb
add sample osmo-bsc configuration file
2011-07-01 21:33:46 +02:00
Holger Hans Peter Freyther
3d331c0062
misc: Link to libosmogsm after adding our static libraries
...
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve
the dbi symbols when we have the library in front of the
static libraries, move them to the back.
Without this patch the tlv_def_patch symbol and the
gsm48_construct_ra.
2011-06-30 21:41:08 +02:00
Holger Hans Peter Freyther
f5bbb1eb71
misc: Link to -ldbi after adding our static libraries
...
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve
the dbi symbols when we have the library in front of the
static libraries, move them to the back.
2011-06-30 20:32:33 +02:00
Holger Hans Peter Freyther
784ca9c179
bsc: Require osmo-sccp 0.0.6 and update the API
2011-06-30 20:30:39 +02:00
Harald Welte
b7849987e5
properly reset the MO state of all MO on Abis disconnect
...
When we loose the A-bis link, we should properly re-set the
administrative, operational and availability state of all MOs
2011-06-29 16:49:03 +02:00
Harald Welte
c7921c9205
add lchan->meas for BTS side code
...
TODO: move all of the BTS side per-lchan data behind a 'void *role'
pointer like 'struct gsm_bts'
2011-06-29 10:39:27 +02:00
Harald Welte
e86b3ebf2e
Revert "HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-bts"
...
This reverts commit 8b65ab9d91
, which
should never have been committed to master. In fact, it is not even
needed anymore with recent osmo-bts code.
2011-06-27 21:15:59 +02:00
Harald Welte
23cf666359
update debug_test with logging system changes
...
Thanks to Konrad Meier
2011-06-27 14:23:40 +02:00
Harald Welte
e31816c83b
make channel_test build again
2011-06-26 14:55:06 +02:00
Harald Welte
c90499bb28
move gsm0502_calc_paging_group() to libosmocore
2011-06-26 14:54:55 +02:00
Harald Welte
1cf43ece12
generalize function for calculation of the paging group
2011-06-26 14:43:46 +02:00
Harald Welte
bc82f92a8d
move gsm 05.02 related calculations into libosmocore
2011-06-26 14:41:58 +02:00
Harald Welte
457a081379
use new gsm48_number_of_paging_subchannels from libosmocore
2011-06-26 14:21:43 +02:00
Harald Welte
2c1ae479ab
system information related bits for osmo-bts
2011-06-26 14:13:37 +02:00
Harald Welte
1a07e21eaf
osmo-bsc: bring in sync with recent NM MO changes
2011-06-25 21:10:23 +02:00
Harald Welte
f6093a4d0e
move {ts,lchan}2chan_nr() functions to gsm_data_shared.c
...
... this way osmo-bts can use them
2011-06-25 10:02:33 +02:00
Harald Welte
8b65ab9d91
HACK: disable NM_ATTR for CELL GLOBAL ID for sysmo-bts
...
Do not commit this to master. It disables a non-standard IE in the BTS
attributes.
2011-06-09 11:03:49 +02:00
Harald Welte
d134cc7d9d
add back-pointer for l1 as part of BTS role.
2011-06-07 00:12:53 +02:00
Harald Welte
df680288a9
initialize NM state for all objects to known state
2011-06-07 00:12:34 +02:00
Harald Welte
850dc6bbfa
gsm_data_shared: make sure to initialzie the MO obj_class/obj_inst
2011-06-06 20:31:15 +02:00
Harald Welte
32bc11698a
add mo->bts member so we can discover which BTS a MO belong sto
2011-06-06 18:58:48 +02:00
Harald Welte
978714d752
move objclass2{nmstate,mo,}obj() to gsm_data_shared.c (and prefix)
2011-06-06 18:31:20 +02:00
Harald Welte
28307643d7
gsm_data: don't free a bts that's not even allocated yet
2011-06-06 17:52:56 +02:00
Harald Welte
5ac0179f47
make sure to include gsm_data.h, not gsm_data_shared.h
2011-06-06 17:52:38 +02:00