Commit Graph

622 Commits

Author SHA1 Message Date
Harald Welte d0cf7ba687 introduce multiple log levels (DEBUG/INFO/NOTICE/ERROR) to SMS code 2009-12-24 15:08:18 +01:00
Harald Welte 2e6d4684ff add (and use) new subscr_name() function to get name or IMSI 2009-12-24 14:50:24 +01:00
Harald Welte 844eab1df5 rsl: fix "CONNECTION FAIL: RELEASING" message 2009-12-24 14:49:07 +01:00
Harald Welte 8410597dd7 [debug] Change the default log level to LOGL_NOTICE
This marks the departure from printing all the debug messages to the console by
default.  We only print NOTICE and WARNING level messages by default

If you're interested in more details, you need to enable it via command
line options or the VTY
2009-12-24 13:48:33 +01:00
Harald Welte 77563daf79 Add LOGL_INFO messages about subscriber attach/detach 2009-12-24 13:48:14 +01:00
Harald Welte 19a3f0b120 print ARFCN, LAC and CID when bootstrapping RSL 2009-12-24 13:39:34 +01:00
Harald Welte fb33957405 properly check for EAGAIN in recv() calls
If recv() has no more messages on a non-blocking socket, errno will be EAGAIN,
not the return value!
2009-12-24 13:35:18 +01:00
Harald Welte e98d4278d0 [handover] CRCX ACK without HO reference is normal, not an error 2009-12-24 13:27:02 +01:00
Harald Welte da956931fa if we recv() from an abis-ip socket, don't consider -EAGAIN an error 2009-12-24 12:49:43 +01:00
Harald Welte 5b8ed4398e [logging] differentiate DEBUG, NOTICE and ERROR log levels in NM and RSL 2009-12-24 12:20:20 +01:00
Harald Welte 5d24ba1eb4 don't print directly to stderr, use LOGP() 2009-12-24 12:13:17 +01:00
Harald Welte 50720e76fe 04_08: Differentiate between DEBUG and ERROR messages
also, don't use stderr directly anymore
2009-12-24 11:50:20 +01:00
Harald Welte d0c19148dd [debug] Introduce DREF debug category for reference counting 2009-12-24 11:46:44 +01:00
Harald Welte ae1f159dc4 Converrt the database later to use DEBUGP/LOGP instead of stderr 2009-12-24 11:39:51 +01:00
Harald Welte 0b906d0e1a db: coding style cleanup 2009-12-24 11:39:51 +01:00
Holger Hans Peter Freyther 426da090db [ipaccess] Move ipaccess utilities into a dedicated subdirectory 2009-12-24 11:28:29 +01:00
Holger Hans Peter Freyther 9094cbaf9c [ipaccess] Spend some more time on figuring out the format 2009-12-24 11:28:29 +01:00
Harald Welte 7ed2529c5b debug: add missing va_end() 2009-12-24 11:14:03 +01:00
Harald Welte aa8989c4d5 debug: workaround for strange va_list corruption bug 2009-12-24 11:12:11 +01:00
Harald Welte aa6c9ca48b debug: make sure we always zero-terminate after snprintf() 2009-12-24 11:11:54 +01:00
Harald Welte 3cefa9aaa0 vty: sub-divide talloc contexts and include them in talloc report
The VTY code makes so many allocations that a full report is
simply too long to provide any useful information.  So we sub-divide
it in multiple contexts, and report only one level deep at SIGURS1.

We also introduce SIGUSR2 for the full detailed VTY report.
2009-12-24 10:51:56 +01:00
Harald Welte 4c70454bae channel allocator: don't allocate channels of unavalable TRXs
In case we have multiple TRX configured, but not all of them are
actually active/operational, we should not try to allocate channels
from such transceivers.
2009-12-24 10:10:16 +01:00
Harald Welte 02cbff09df fix typo in talloc_ctx causing counters not to show up in talloc report 2009-12-24 10:07:36 +01:00
Harald Welte d6847a940a use enum for operational state 2009-12-24 10:06:33 +01:00
Harald Welte 026a6c3389 counter: create their own talloc context for better readability 2009-12-24 10:04:09 +01:00
Harald Welte 30d2ebddd6 move msgb talloc context into talloc_ctx.c
This keeps the ordering right, independent of link ordering, it
will ensure that the talloc dump will also catch msgb related
memory leaks.
2009-12-24 09:43:25 +01:00
Harald Welte 09f7ad0ff7 fix merge artefact from db.c 2009-12-24 09:42:07 +01:00
Harald Welte 5c706bbaf2 Merge remote branch 'origin/master' 2009-12-24 09:38:38 +01:00
Harald Welte 3606cc5765 [authentication] Code for retrieving authentication data from SQL DB
This is the first step towards supporting actual A3/A8 authentication.
2009-12-24 09:37:34 +01:00
Harald Welte a16ef3d23f ipaccess-proxy: Fix two memory leaks 2009-12-23 23:35:51 +01:00
Harald Welte 61cc306a55 debug: Fix typo DMM -> DNM (we don't need DMM twice)
This prevented NM related log messages from showing up at stderr
2009-12-23 23:03:57 +01:00
Harald Welte afdca0f3df input/ipaccess: Differentiate between LOGL_ERROR and DEBUG
also: make sure we properly reset the OML/RSL UP flags on a dead socket.
2009-12-23 23:01:56 +01:00
Harald Welte 87ed5cd4ad introduce #defines for ip.access RSL and OML UDP ports 2009-12-23 22:47:53 +01:00
Harald Welte 2ca7c31429 Add ipaccess-proxy, a proxy for ip.access A-bis over IP
This proxy allows us to restart OpenBSC while the BTS's are kept
running with their CCCH/BCCH alive.  This is very useful to
make sure the phones don't roam to other networks while restarting
OpenBSC.

The proxy also intrduces UDP sockets for injecting UDP packets
into the A-bis data stream.
2009-12-23 22:44:04 +01:00
Harald Welte b7bcb79bea Fix segfault in case BTS has more TRX than we have configured 2009-12-23 18:24:31 +01:00
Holger Hans Peter Freyther bf2bdc6e84 [ipaccess] The next byte appears to be size...
Using okteta to display the size in bigendian and
then selecting from the start to the " SDP" I get
the same number...
2009-12-23 13:09:27 +01:00
Holger Hans Peter Freyther e0d2ff4c2e [ipaccess] The second four bytes appear to be always the same 2009-12-23 13:03:12 +01:00
Holger Hans Peter Freyther 65d67dc222 [ipaccess] Start adding a tool that analyzes the ipaccess header
So far I have not much idea about the format. It is starting with
the magic byte and the header is spanning until the next occurence
of the " SDP" marker.
2009-12-23 12:52:30 +01:00
Holger Hans Peter Freyther 66e8219f96 [sw_load] It turns out there is a header that needs to be read
The magic " SDP" is occuring twice in the file. The first time
seems to be the file header and the second time it is with the
payload. We will need to parse this somehow...
2009-12-23 08:06:31 +01:00
Holger Hans Peter Freyther e7ff91342e [sw_load] For the nanoBTS just open the firmware
* The two version strings are not in an easy to parse header
  and from my trace it appears like the whole file is sent
  to the BTS. So just open the firmware file..
2009-12-23 07:26:57 +01:00
Holger Hans Peter Freyther 004e055cfd [ipacess-config] Remove one of my bogus debugging statements 2009-12-23 05:31:36 +01:00
Holger Hans Peter Freyther 079353ad1f [statistics] Do the syncing to db from within the bsc_hack
Change the counters_store_db function to be a generic for_each
function taking a function pointer and data. Use that in bsc_hack
to store it to the DB.

This is removing the DB requirement and will allow to handle
the counter values in different ways without making the counter
list public.

I verified that the syncing is still taking place.
2009-12-23 05:30:47 +01:00
Holger Hans Peter Freyther 6fced2fd0a [statistics] Make counter_db_store internal
Do not expose DB functionality on this level
2009-12-23 05:16:13 +01:00
Holger Hans Peter Freyther b61e3b2158 Import the new logging architecture
This is the new logging architecture, including

* support for multiuple logging targets like stderr and vty
* log levels in addition to categories/subsystems
* filtering based on imsi, i.e. only see events for one subscriber
* dynamically change log level for each category for each vty
2009-12-22 22:32:51 +01:00
Harald Welte e2b8eceee7 pretty-print statistics in 'show statistics' 2009-12-22 21:47:48 +01:00
Harald Welte 8387a49e39 print last measurement report during 'show lchan' 2009-12-22 21:43:14 +01:00
Harald Welte f9a43c45ea fix sql table creation for 'Counters' table 2009-12-22 21:40:42 +01:00
Harald Welte ffa55a4e87 statistics: Introduce 'struct counter' instead of using unsigned long
This has the advantage that counters can be added all over the code
very easily, while having only one routine that stores all of the
current counter values to the database.  The counters are synced
every 60 seconds, providing relatively fine grained statistics
about the network usage as time passes by.
2009-12-22 20:42:40 +01:00
Harald Welte 4983921af1 [gsm_04_11] Replace hardcoded transaction_id by real allocation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-22 13:45:58 +01:00
Sylvain Munaut 4010f1e6f4 bts: Allow config of RACH control parameters tx-integer & max retrans
Tweaking theses can be useful especially tx-integer that influence
both the spread of rach attemps and the delay between two attemps.

Looking up GSM 04.08 3.3.1.1.2 & 10.5.2.29 can help determine good
values. The default are choosed with a wide spacing between attemps
(tx integer = 9 -> T=12 & S=217 (non-combined CCCH/SDCCH) or 115 (for
combined CCCH/SDCCH)). This alleviates the problem of responding to
several RACH attempts by a same MS, allocating several RF channels when
only 1 is needed.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-22 13:43:26 +01:00