Commit Graph

215 Commits

Author SHA1 Message Date
Neels Hofmeyr 218e4b4aa0 move openbsc/* to repos root
This is the first step in creating this repository from the legacy openbsc.git.

Like all other Osmocom repositories, keep the autoconf and automake files in
the repository root. openbsc.git has been the sole exception, which ends now.

Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-08-27 03:52:43 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Harald Welte f7c43524cf * add support for storing classmark1/2/3 per subscriber
* add support for parsing measurement results (both BTS and MS side)
2009-06-09 20:24:21 +00:00
Harald Welte d3ff51dfe3 don't prefix every line with timestamp, this saves some screen real estate 2009-06-09 20:21:57 +00:00
Holger Freyther 6d9f77acd0 openbscdefines.h: Add header file to control visibility of symbols
Add the hooks/configure detection to compile everything with
-fvisibility=hidden and then make certain symbols visible. This
will be used to make parts of the API public.
There are no users yet but we should have some soon.
2009-06-08 10:32:54 +00:00
Holger Freyther 7c19f74084 lchan: Handle the abnormal case of channel getting closed
The abnormal case is that lchan_free ist getting called due
a RSL_MT_CHAN_REL_ACK in the RSL but the refcount of this
channel is not zero. This means that some "logical operation"
is still going on that needs to be cancelled.
Instead of always queuing up all operations in the
struct gsm_lchan use the signal framework to inform higher
layers about this abnormal case.

In gsm_04_08.c a signal handler is installed and in the
abnormal case the location updating request operation is
freed.
2009-06-06 13:54:35 +00:00
Holger Freyther c7b86f9011 Revert "[db] Keep track of the current gsm_network"
This was a stupid decision. We will have to assign the
network at some other place. The problem will be a problem
when we have two gsm_networks in one process and the same
subscriber is traveling in both networks.
2009-06-06 13:54:20 +00:00
Harald Welte 8b697c74c7 BS11: add nm_state for EnveBTES, PA and BBSIG physical objects 2009-06-05 19:18:45 +00:00
Holger Freyther c3d4b2d441 [subscr] Remove the struct gsm_bts pointer from subscriber
The pointer was initially added to support to open a lchan
by using the gsm_subscriber structure. We would have restored
the struct gsm_bts from the db when loading the subscriber.

Instead we will dynamically resolve the gsm_bts and might end
up paging multiple bts in the same (stored/old) location area
until it answers.
2009-06-04 14:27:39 +00:00
Holger Freyther 862cfff609 gsm_subscriber.h: Remove trailing whitespace...
Cosmetic changed
2009-06-04 14:15:33 +00:00
Holger Freyther 213b20bec0 [subscriber] Change id to long long unsigned int (Andreas Eversberg)
Changes the subscriber id type defintion from "long unsigned int" to "long
long unsigned int". Without, printf with '%llu' caused a crash.
2009-06-02 03:24:54 +00:00
Holger Freyther 4f584c3d4b [lchan] Log increase/decrease of channel use count (Andreas Eversberg)
This is part of patch 22 and will log changes in the usecount
of the lchan.
2009-06-02 02:55:07 +00:00
Harald Welte 7b26bcb1b5 * give Siemens ObjClass reasonable names rather than A3/A5/A6
* add nm_state objects for RACK and CCLK
* add obj_class human-readable printing for all vendor obj_classes
* add human-readable printing of administrative state
* add enum for cell_alloc numbers
2009-05-28 11:39:21 +00:00
Harald Welte 40f828936f show and edit subscribers from the vty interface 2009-05-23 17:31:39 +00:00
Harald Welte 78f2f508e6 Add user-configurable BSIC setting 2009-05-23 16:56:52 +00:00
Harald Welte 110c0ab6c5 * replace some more hex bytes in init msgs by #defines
* when using patch_tables(), use the ARFCN of the BTS, not the cmdline argument
2009-05-23 16:27:05 +00:00
Harald Welte 45b407ad25 With this patch, the TRAU muxing code supports not just bridging only.
A new function trau_recv_lchan() is used to link a channel to a call reference
of a transaction. (Transactions are used in later patches.) TRAU frames will
then be forwarded to the application with the given call reference (in later
patches). Also the application can send TRAU frames by using trau_send_lchan().

A new list is introduced in trau_mux.c. (upqueue_entry) All subslots
that must be sent to application are listed here.

Received TRAU frames are written in the upqueue of application
interface, if a call reference is found in the upqueue-list. If an entry
is found the ss_entry list, the TRAU frames are bridged as before. The
frames have a message type (msg_type), a call reference (callref) and a
trau frame (data). The length of trau frame is defined by the content of
the c-bits inside the frame.

There is no support for ip.access yet, as they don't use the traditional
TRAU frame format. Harald must add this in order to use application interface
with ip-access. The bridging with ip-access works as before.
(Andreas Eversberg)
2009-05-23 15:51:12 +00:00
Harald Welte be99149e72 add new function gsm_bts_by_lac() to search for BTS based on location area 2009-05-23 13:56:40 +00:00
Harald Welte c125a680ef A new debug flag is introduced: "DMNCC". MNCC is the Mobile Network Call
Control. This is required for later patches, that extract the call
control from gsm_04_08.c. (Andreas Eversberg)
2009-05-23 06:42:38 +00:00
Harald Welte a4d49e96ab Some messages have one or two length-value information elements. The is
no IE type included in the message. These information elements are
mandatory, so their actual IE type is known. The improved parse_tlv()
function allows to parse zero, one, or two length-value elements.
(Andreas Eversberg)
2009-05-23 06:39:58 +00:00
Harald Welte f55b49fef3 To slow down transmission of many ABIS frames at a time, a delay timer
is used for the E1's time slot. This timer replaces the "usleep()"
function, so the process will not block the execution of libbsc. The
timer is started after a frame is transmitted. If another frame is in
the transmit queue, the frame will only be queued until the timer times
out. If the timer is not running or times out, the frame is transmitted
and the timer is restarted.

The problem with partly provisioned TRX (locks show on LMT) is solved.
The adjustment for the inter frame delay of 50 miliseconds is for
further study.
(Andreas Eversberg)
2009-05-23 06:20:41 +00:00
Harald Welte 703af9887d fix some more compiler warnings 2009-05-23 06:14:44 +00:00
Harald Welte 04d3c9224f An application that has own events and file descriptors, must poll
select function ob libbsc. A "polling" flag is used to enable polling.
In this case select() will not sleep until file descriptor events occurr
or nearest timer expires. Also a return value will indicate if there was
an event that has been handled. If there was an event, the application
decides to poll again and don't wait.

In case for bsc_hack, the polling flag is not set. select will sleep as
usual.

(Andreas Eversberg)
2009-05-23 06:07:04 +00:00
Harald Welte 7572745816 Add missing "extern" prefix (Andreas Eversberg) 2009-05-23 05:26:29 +00:00
Harald Welte be68f6fc6c Change the variable "new" to "_new" in order to include it from C++ code.
The define "container_of" will cast pointer before assigning. Compilers
with stricter options require this. (Andreas Eversberg)
2009-05-23 05:24:48 +00:00
Harald Welte ff117a8d11 * rename the timer functions to avoid name collisions with libmisdn.
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired
(Andreas Eversberg)
2009-05-23 05:22:08 +00:00
Harald Welte 12247c6713 Fix compilation issues on OS X - mainly #include file changes (Lars Immisch) 2009-05-21 07:23:02 +00:00
Harald Welte ef061951e6 dump CCLK accuracy/type as part of bs11_config query 2009-05-17 12:43:42 +00:00
Harald Welte cf5b3597ed add verbose reporting of RR STATUS cause 2009-05-01 18:28:42 +00:00
Harald Welte 0db97b253d abis_nm: print some information about failure event report type / severity 2009-05-01 17:22:47 +00:00
Harald Welte f9a8cc3cba send a signal for every software activation or failure event report 2009-05-01 15:39:49 +00:00
Harald Welte edb3778542 * Add support for multiple ip.access nanoBTS at one BSC
* keep track of site_id/bts_id in struct gsm_bts
 * dynamically match incoming OML/RSL over TCP connections by BTS Unit ID
 * introduce new debug category DINP (separate from DMI for hexdumps)
 * remove ia_config() as it is no longer needed
 * 
* ensure that signalling links / E1 line information is correctly printed
* when bootstrapping RSL or OML, tell us for which BTS it is being doen
* separate bootstrap_bts() out from bootstrap_network()
* statically configure two ip.access BTS, one with unit id's 1800/0/0 and 1801/0/0
2009-05-01 14:59:07 +00:00
Harald Welte 25de99170f add new 'ipaccess-config' program to set Unit ID and primary OML NVRAM parameters of ip.access BTS 2009-04-30 15:53:07 +00:00
Harald Welte 193fefc683 functionality to set nanoBTS NVRAM attributes and to restart BTS 2009-04-30 15:16:27 +00:00
Harald Welte 3bfbb84021 Add some more ip.access specific OML attributes/messages. In this case it is
about configuring the primary OML link IP address in the NVRAM of the device.
2009-04-29 22:58:38 +00:00
Harald Welte e69f5fb411 Add bs11_config commands to set the PLL mode from E1_LOCKED to STANDALONE
and vice-versa.  This has not yet been tested yet.
2009-04-28 16:31:38 +00:00
Holger Freyther b5c00f5587 [misdn] Add option to automatically release layer2 on exit
Patch by Andreas Eversberg to automatically release
layer2 on exit of the application. Made the naming of
the variables consistent (only release_l2 and not both
release_l2 and l2_release).
2009-04-22 22:08:07 +00:00
Holger Freyther dda22c18b5 [bsc_hack] Allow to select the cardnr defaulting to number 0
Patch from Andreas Eversberg to allow to select the ISDN
card number. The default remains the same.
2009-04-22 22:07:31 +00:00
Holger Freyther bcdebbfcab [bsc_hack] House keeping, remove dead code
This callback is not used from within the paging layer. We do
have a different set of callbacks in place. Remove it here.
2009-04-19 06:39:29 +00:00
Holger Freyther 36650b872f [db] Keep track of the current gsm_network 2009-04-19 06:35:16 +00:00
Holger Freyther a1f92f0a43 [subscriber] Introduce subscr_put_channel
Introduce subscr_put_channel to release a channel and to
allow gsm_subscriber.c to hand this channel to any suitable
pending requests.
2009-04-12 05:37:52 +00:00
Holger Freyther 4a49e77ff4 [subscriber] Update the current_bts field on imsi detach and LOC accept
When sending LOCATION UPDATING REQUEST Accept or when getting
a IMSI Detach update the gsm_bts of the gsm_subscriber.
2009-04-12 05:37:29 +00:00
Holger Freyther 0469cf608b [e1] Enable dumping of LAPD frames again
Kill mi_set_pcap_fd from the header, introduce e1_set_pcap_fd
and call it from bsc_hack.c. Hook into abis_rsl_sendmsg and
_abis_nm_sendmsg for sending and e1inp_rx_ts for reading. It compiles
and should not cause a regression.
2009-03-31 12:14:16 +00:00
Harald Welte 7e310b12ff Store incoming SMS into SQL database
* gsm_util now uses caller-allocated data (rather than callee-allocated)
* correctly parse destination address
* parse (but not transcode) non-default encodings of SMS
* reject SMS to unknown destination number
* resolve target subscriber id and store incoming SMS (without header) in 'sms' table

What we're now missing is the sending part, i.e. a regular task iterating over
all pending SMS and trying to deliver them.  Also, check for pending SMS once
we get a LOCATION UPDATE.
2009-03-30 20:56:32 +00:00
Harald Welte 273feca77f Fix 'delete-trx1' command of bs11_config (we can now delete TRX1) 2009-03-28 16:53:25 +00:00
Harald Welte d256d4f19c * make sure we can obtain signalling type and timslot type names
* make sure every e1 timeslot has a valid backpointer to its line
2009-03-10 19:44:48 +00:00
Harald Welte 4d87f24e6f export nm_*_name() functions to get operational and availability state to strings 2009-03-10 19:43:44 +00:00
Harald Welte 44d542eba5 export list of e1 drivers and e1 lines 2009-03-10 18:24:35 +00:00
Harald Welte 404cdd8951 make telnet interface use VTY code 2009-03-10 12:21:45 +00:00
Harald Welte 32201c1aea move is_ipaccess_bts() and parse_btstype9) to gsm_data.c 2009-03-10 12:15:10 +00:00