aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2017-08-11split off osmo-bsc: remove files, apply buildNeels Hofmeyr35-3669/+46
Change-Id: I64d84c52f6e38e98144eb9be8f0ab82e0e1f6cca
2017-08-11replace internal libmgcp with libosmo-legacy-mgcpNeels Hofmeyr7-845/+3
Change-Id: Ic99d681759edce11564da62500c2aac5cf5fffe2
2017-08-11move libiu to osmo-iuh/libosmo-ranapNeels Hofmeyr8-87/+55
Remove libiu here, use the functions from libosmo-ranap instead, by applying the ranap_ / RANAP_ prefix. Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 To be able to run the msc_vlr tests for RAN_UTRAN_IU without Iu client headers available, add iu_dummy.h, containing mere function signatures that match iu_dummy.c. Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
2017-08-11Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)Philipp Maier18-29/+415
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
2017-08-11mgcp: hack RAB success from nano3G: patch first RTP payloadNeels Hofmeyr1-0/+1
The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: I5eff04dcb0936e21690e427ae5e49228cd459bd4
2017-08-11Implement IuCS (large refactoring and addition)Neels Hofmeyr18-20/+229
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to be split up. Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-11sgsn init: pass sgsn_config pointer to sgsn_vty_init(), not sgsn_parse_configNeels Hofmeyr1-2/+2
In an upcoming commit, sgsn_vty_init() will require access to the global sgsn config struct to initialize a generic VTY command with the proper config destination address, see Change-Id I5b5b6a9678b458affa86800afb1ec726e66eed88. Change-Id: Ie6b6e5422987586531a898e0c5b867623dbecb0f
2017-08-11mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr7-17/+100
Disable large parts of the code that depend on BSC presence. The code sections disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of adding the A-interface. Don't set msg->lchan nor msg->dst. Don't use lchan in libmsc. Decouple lac from bts. Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication: Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi(). libmsc: duplicate gsm0808 / gsm48 functions (towards BSC). In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places. Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC, this will be done with an external MGCP gateway. Remove LCHAN_MODIFY from internal MNCC state machine. Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. Employ fake paging shims in order for msc_vlr_tests to still work. msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c add gsm_encr to subscr_conn move subscr_request to gsm_subscriber.h subscr_request_channel() -> subscr_request_conn() move to libmsc: osmo_stats_vty_add_cmds() gsm_04_08: remove apply_codec_restrictions() gsm0408_test: use NULL for root ctx move to libbsc: gsm_bts_neighbor() move to libbsc: lchan_next_meas_rep() move vty config for t3212 to network level (periodic lu) remove unneccessary linking from some tests remove handle_abisip_signal() abis_rsl.c: don't use libvlr from libbsc gsm_subscriber_connection: put the LAC here, so that it is available without accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of transition: Iu and A will use this new field to pass the LAC around, but in a completely separate OsmoBSC this is not actually needed. It can be removed again from osmo-bsc.git when the time has come. Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall be added in osmo-bsc once the A-Interface code has settled. See OS#2389. Related: OS#1845 OS#2257 OS#2389 Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-08-11vlr: LU FSM: enable Retrieve_IMEISV_If_RequiredNeels Hofmeyr1-1/+2
Change-Id: I121b95ad6d5ecb7603815eece2b43008de487a8a
2017-08-11Use libvlr in libmsc (large refactoring)Harald Welte18-182/+147
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Remove/Disable VTY and CTRL commands to create subscribers, which is now a task of the OsmoHLR. Adjust the python tests accordingly. Remove VTY cmd subscriber-keep-in-ram. Use OSMO_GSUP_PORT = 4222 instead of 2222. See I4222e21686c823985be8ff1f16b1182be8ad6175. So far use the LAC from conn->bts, will be replaced by conn->lac in Id3705236350d5f69e447046b0a764bbabc3d493c. Related: OS#1592 OS#1974 Change-Id: I639544a6cdda77a3aafc4e3446a55393f60e4050
2017-08-11Add libvlr implementationHarald Welte4-9/+415
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. Related: OS#1592 Change-Id: Ie303c98f8c18e40c87c1b68474b35de332033622
2017-08-11gsup_client: allow passing a unit id to identify with HLRNeels Hofmeyr1-2/+5
Before, each GSUP client would contact the HLR with an identical unit id, i.e. "SGSN-00-00-00-00-00-00", with the result that some messages were sucked off by the wrong client. Pass explicit unit name from each gsup client user, so that OsmoMSC is "MSC" and OsmoSGSN is "SGSN". Hence the HLR can properly route the messages. Todo: also set some values instead of the zeros. Unrelated cosmetic change while editing the arguments: gsup_client_create()'s definition's oap client config arg name mismatched the one used in the declaration. Use oapc_config in both. Change-Id: I0a60681ab4a4d73e26fe8f0637447db4b6fe6eb2
2017-08-11move openbsc/* to repos rootNeels Hofmeyr93-0/+9944
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
2009-06-10move openbsc into its own subdirectoryHarald Welte36-4992/+0
2009-06-09* add support for storing classmark1/2/3 per subscriberHarald Welte2-2/+42
* add support for parsing measurement results (both BTS and MS side)
2009-06-09don't prefix every line with timestamp, this saves some screen real estateHarald Welte1-0/+1
2009-06-08openbscdefines.h: Add header file to control visibility of symbolsHolger Freyther2-1/+36
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-06lchan: Handle the abnormal case of channel getting closedHolger Freyther1-0/+11
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-06Revert "[db] Keep track of the current gsm_network"Holger Freyther1-1/+1
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-05BS11: add nm_state for EnveBTES, PA and BBSIG physical objectsHarald Welte1-1/+16
2009-06-04[subscr] Remove the struct gsm_bts pointer from subscriberHolger Freyther1-1/+0
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-04gsm_subscriber.h: Remove trailing whitespace...Holger Freyther1-1/+1
Cosmetic changed
2009-06-02[subscriber] Change id to long long unsigned int (Andreas Eversberg)Holger Freyther1-1/+1
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[lchan] Log increase/decrease of channel use count (Andreas Eversberg)Holger Freyther1-1/+9
This is part of patch 22 and will log changes in the usecount of the lchan.
2009-05-28* give Siemens ObjClass reasonable names rather than A3/A5/A6Harald Welte2-10/+26
* 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-23show and edit subscribers from the vty interfaceHarald Welte2-1/+2
2009-05-23Add user-configurable BSIC settingHarald Welte1-0/+3
2009-05-23* replace some more hex bytes in init msgs by #definesHarald Welte1-0/+4
* when using patch_tables(), use the ARFCN of the BTS, not the cmdline argument
2009-05-23With this patch, the TRAU muxing code supports not just bridging only. Harald Welte2-2/+10
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-23add new function gsm_bts_by_lac() to search for BTS based on location areaHarald Welte1-0/+2
2009-05-23A new debug flag is introduced: "DMNCC". MNCC is the Mobile Network CallHarald Welte1-1/+2
Control. This is required for later patches, that extract the call control from gsm_04_08.c. (Andreas Eversberg)
2009-05-23Some messages have one or two length-value information elements. The isHarald Welte1-1/+28
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-23To slow down transmission of many ABIS frames at a time, a delay timerHarald Welte1-0/+3
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-23fix some more compiler warningsHarald Welte1-0/+2
2009-05-23An application that has own events and file descriptors, must pollHarald Welte1-1/+1
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-23Add missing "extern" prefix (Andreas Eversberg)Harald Welte1-2/+2
2009-05-23Change the variable "new" to "_new" in order to include it from C++ code.Harald Welte1-13/+13
The define "container_of" will cast pointer before assigning. Compilers with stricter options require this. (Andreas Eversberg)
2009-05-23* rename the timer functions to avoid name collisions with libmisdn.Harald Welte2-8/+8
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired (Andreas Eversberg)
2009-05-21Fix compilation issues on OS X - mainly #include file changes (Lars Immisch)Harald Welte4-1/+10
2009-05-17dump CCLK accuracy/type as part of bs11_config queryHarald Welte1-0/+2
2009-05-01add verbose reporting of RR STATUS causeHarald Welte1-1/+1
2009-05-01abis_nm: print some information about failure event report type / severityHarald Welte1-0/+26
2009-05-01send a signal for every software activation or failure event reportHarald Welte1-0/+7
2009-05-01* Add support for multiple ip.access nanoBTS at one BSCHarald Welte3-2/+8
* 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-04-30add new 'ipaccess-config' program to set Unit ID and primary OML NVRAM ↵Harald Welte2-1/+3
parameters of ip.access BTS
2009-04-30functionality to set nanoBTS NVRAM attributes and to restart BTSHarald Welte1-3/+17
2009-04-29Add some more ip.access specific OML attributes/messages. In this case it is Harald Welte1-0/+3
about configuring the primary OML link IP address in the NVRAM of the device.
2009-04-28Add bs11_config commands to set the PLL mode from E1_LOCKED to STANDALONEHarald Welte1-0/+7
and vice-versa. This has not yet been tested yet.
2009-04-22[misdn] Add option to automatically release layer2 on exitHolger Freyther2-2/+2
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[bsc_hack] Allow to select the cardnr defaulting to number 0Holger Freyther1-1/+1
Patch from Andreas Eversberg to allow to select the ISDN card number. The default remains the same.