Commit Graph

21 Commits

Author SHA1 Message Date
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther d85642a1a7 ts Make the e1inp_ts delay configurable
Currently the nanoBTS bootstrap code requires a high delay
otherwise we are not bringing the device up properly. Changing
the init code turns out harder than it seems like. So this is
a workaround for that to allow a high speed RSL/OML connection
after the bringup.

The line driver can have a default TS delay. It is set to the
current default for the nanoBTS and the BS11. For the ipaccess
case we will set the delay lower for the RSL connection and
inside the ipaccess-config we can set it low right away to
have fast firmware flashing and such.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther 0b369c582b e1_input: Fix compiler warning by using offsetof
Use the offsetof/__builtin_offsetof to determine the
offset of a variable inside a structure instead of going
via a NULL pointer and taking the address.

This fixes:
warning: variably modified ‘dummyhalen_offset’ at file scope
2010-11-09 23:11:29 +01:00
Holger Hans Peter Freyther f51b9006a1 e1_input: Stop the timer when deleting the signalling link on the TS
Stop the tx_timer when deleting the link on top of that ts. Otherwise
bad things might happen. E.g. when scheduling a write on OML and then
the OML link vanishes...

This is a slight layering violation as there could be more than
one signalling link on the timeslot (at least in theory) so the
queue and the timer should move to the e1inp_sign_link.
2010-04-25 23:13:26 +08:00
Holger Hans Peter Freyther 4ac100ec24 [e1_input] When destroying a link clear all pending messages 2010-04-25 23:13:08 +08:00
Harald Welte dc5062b185 move log/debug codebase to libosmocore
The logging/debugging code is generic enough to move it into libosmocore
while keeping OpenBSC specific definitions in openbsc itself.

This commit uses the logging support present in libosmocore-0.1.2,
you will have to update your library to this version.
2010-03-26 21:31:43 +08:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Harald Welte (local) 5fe33189a9 rsl_sendmsg: Print message in case trx == NULL 2009-12-29 11:00:27 +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 b1d4c8ed9d logging: introduce log levels at caller site
This introduces a new LOGP() macro together with LOGL_* definition to
support multiple log levels (severities) throughout the codebase.

Please note that the actual logging system does not use them yet,
in this patch we simply introduce the new macros at the caller site.
2009-12-17 23:10:46 +01:00
Harald Welte 29b9cf8446 make use of new S_GLOBAL_SHUTDOWN signal to properly close pcap_fd
This avoids broken pcap files with partial packets due to non-flushed
buffers.
2009-12-01 17:58:32 +05:30
Harald Welte (local) 37a7d361f4 remove printf for every packet in pcap code 2009-08-12 21:04:50 +02:00
Holger Hans Peter Freyther 34e97495a6 misc: Add prototypes to header files, include more header files
Fix various warnings about implicit declarations of functions.
2009-08-10 07:54:02 +02:00
Harald Welte 42581829ec the actual config file code (not just config files)
this was missing from commit a08a9acdb6
2009-08-08 16:12:58 +02:00
Harald Welte 7bfc267496 move allocation of talloc contexts into link-time constructor
This is much more optimal than checking if the context exists every
time we allocate the respective object.
2009-07-28 00:41:45 +02:00
Harald Welte eab33356d0 fix various RSL msgb memory leaks in error paths 2009-06-27 03:09:53 +02:00
Harald Welte 470ec29b0d use taloc_zero() rather than talloc() and explisit memset() 2009-06-26 20:25:23 +02:00
Harald Welte 966636f39f use named variant when allocating msgb's
when we generate a talloc report (SIGUSR1), we can now see which system
allocated a given msgb, this helps memory leak debugging
2009-06-26 19:39:35 +02:00
Harald Welte 2cf161be08 introduce talloc all over OpenBSC 2009-06-20 22:36:41 +02:00
Andreas Eversberg 20152a35e3 [pcap] Write incoming packages without the extra mISDN header
This patch fixes the PCAP logging. If frames are received from E1
interface, an 8 byte mISDN header (MISDN_HEADER_LEN) is in front of the
RSL packet. When frames are transmitted to the E1 interface, the
pcap_write_packet function will get a message buffer without the mISDN
header in front of the RSL packet. The pcap file was tested and the
output is correct.

Follow up patches should make use the msgb->l2, make the ipaccess
code use the pcap writing too...
2009-06-10 14:47:33 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00