aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2015-10-29stats: Add the reporting frameworkJacob Erlbeck2-0/+71
This commit provides the stats reporting framework that can manage several types of measurement reporters. Initially support for rate_ctr and the statsd protocol is included. Sponsored-by: On-Waves ehf
2015-10-29stats/vty: Add stats_vty.cJacob Erlbeck2-0/+4
This file will contain the VTY code related to statistics. This commit adds a minimal file with just as single VTY command: - show stats This command shows all statistical values To enable this and future commands, the main program needs to call stats_vty_add_cmds(). Sponsored-by: On-Waves ehf
2015-10-28stat/vty: Add vty_out_statistics_full to show all statisticsJacob Erlbeck1-0/+2
This functions shows the state of all osmo_counters, stat_item groups, and counter groups. Sponsored-by: On-Waves ehf
2015-10-28core: Update osmo_counters_for_each docJacob Erlbeck1-2/+2
Fix type and add a note about the semantics of the handler's return code. Sponsored-by: On-Waves ehf
2015-10-28stats: Add stat_item_for_each functionsJacob Erlbeck1-0/+14
This commit adds the following functions: stat_item_for_each_group Call a handler for each group stat_item_for_each_item Call a handler for each item of a group Sponsored-by: On-Waves ehf
2015-10-28core: Extend rate_ctr by helper functionsJacob Erlbeck1-0/+19
For global value reporting, some additional helper functions are needed. The statsd protocol expects differential counter values, which are currently not provided by rate_ctr (except for s/m/h/d intervals). This commit adds several helper functions to rate_ctr: - rate_ctr_difference returns the counter delta since the last call to this function for a given counter - rate_ctr_for_each_counter iterates through each counter of a group - rate_ctr_for_each_group iterates through all globally registered counter groups Note that the rate_ctr_difference function can only be used by a single backend, since it modifies the 'previous' field in the rate_ctr obj. Sponsored-by: On-Waves ehf
2015-10-28stats: Use a global index for stat item valuesJacob Erlbeck1-9/+19
Currently each stat item has a separate index value which basically counts each single value added to the item and which can be used by a reporter to get all new values that have not been reported yet. The drawback is, that such an index must be stored for each stat item. This commit introduces a global index which is incremented for each new stat item value. This index is then stored together with the item value. So a single stored index per reporter is sufficient to make sure that only new values are reported. Sponsored-by: On-Waves ehf
2015-10-28ns: Add statistics for some eventsJacob Erlbeck1-0/+2
The following counters are added to the ns.nsvc counter group: lost.alive The number of missing ALIVE ACK messages lost.reset The number of missing RESET ACK messages The following items are added to the ns.nsvc stat item group: alive.delay The time in ms between sending ALIVE and receiving the next ALIVE ACK Sponsored-by: On-Waves ehf
2015-10-28stats: Add vty_out_stat_item_groupJacob Erlbeck1-1/+5
This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
2015-10-28stats: Add stat_item for value monitoringJacob Erlbeck2-0/+105
This commit adds instrumentation function to gather measurement and statistical values similar to counter groups. Multiple values can be stored per item, which can be retrieved in FIFO order. Getting values from the item does not modify its state to allow for multiple independant backends (e.g. VTY and statd). When a new value is set, the oldest value gets silently overwritten. Lost values are skipped when getting values from the item. Sponsored-by: On-Waves ehf
2015-10-09commentsNeels Hofmeyr2-3/+4
2015-09-23ipaccess: add OAP proto_ext (in design).Neels Hofmeyr1-0/+1
2015-08-18Introduce gsm48_mi_type_name() functionHarald Welte1-0/+1
2015-08-18Add G-RNTI derived TLLI types defined in 23.003Harald Welte1-0/+2
2015-08-05vty: Change API to have node installation be done by intHolger Hans Peter Freyther2-6/+6
We are mixing enums and hope that no short-enums are used. This is leading to a lot compiler warnings generated by clang. Change the API to work with integers. Porting: The go_parent_cb implementations in the applications need to be fixed. The API change leads to a compile time warning. Fixes: abis_om2000_vty.c:46:2: warning: implicit conversion from enumeration type 'enum bsc_vty_node' to different enumeration type 'enum node_type' [-Wenum-conversion] OM2K_NODE, ^~~~~~~~~
2015-06-02ipa: Properly parse LV stream of a ID_GET requestHolger Hans Peter Freyther1-0/+3
For some reason the structure is closer to be a LV (length and value). The value is actually a tag but it is counted inside the length. Introduce an overload of the parse function to provide an offset for the length. This will be taken from the returned length.
2015-05-25Add APN utility function to libosmogsmHarald Welte2-0/+14
The current functions are used to 'qualify' an APN from the user-supplied APN name (name identifier) towards the fully-qualified APN name which is used in the .grps DNS zone.
2015-05-06bssgp: Fix bssgp_tx_fc_bvc parameter typeJacob Erlbeck1-1/+1
Currently large values for Bmax default MS get sliced since a uint16_t is used as the type of the corresponding parameter of bssgp_tx_fc_bvc. GSM 48.018, 11.3.2 which in turn refers to 11.3.5 specifies a maximum of 6MB (0xffff * 100). This commit changes the type to uint32_t to cover the full value range. Sponsored-by: On-Waves ehf
2015-05-02linuxlist: Remove casting of ptr from container_of macroHolger Hans Peter Freyther1-1/+1
The cast is not present in the original macro and was added in OpenBSC with commit (be68f6fc6cde1367a4481d2e774a64e2cd657267) to help using the header with C++. Due the recent issue in the bssgp flow control code, let's remove the cast to see wrong pointer usage. In case C++ code doesn't compile anymore we can see how to add a cast back to it. Change was proposed by Michael McTernan
2015-04-13osmo_static_assert: Put back the typedef in the codeHolger Hans Peter Freyther1-1/+1
In OSX the int declares linkage and for libosmo-abis we have two static asserts with the same name in two different compilation units. When adding the "unused" attribute I removed the typedef. I verified with a gcc 4.9.2 that no new warnings will be shown when compiling libosmo-abis.
2015-04-11sim: Use extern for these structs to generate a linkageHolger Hans Peter Freyther1-1/+1
Fixes: duplicate symbol _ts102221_fcp_vals in: .libs/core.o .libs/card_fs_usim.o duplicate symbol _pcsc_reader_ops in: .libs/reader.o .libs/card_fs_usim.o
2015-04-07ns: Log when sending fails (Coverity)Jacob Erlbeck1-6/+4
Currently the return value of the gprs_ns_tx family of functions is often ignored. This is not a serious issue, since the successful delivery of the messages is neither guaranteed nor acknowledged by the network layer anyway. Nevertheless this commit adds logging (level INFO) to gprs_ns_tx and gprs_ns_msgb_alloc. The definition of the latter has been moved from the header file to gprs_ns.c. Fixes: Coverity CID 1040678, 1040679, 1040680, 1040681, 1040682, 1040683, 1040684, 1040686, 1040687, 1040688, 1111545, 1240203, 1240204 Sponsored-by: On-Waves ehf
2015-03-28gsm: Add A5/3-4 cipher supportMax1-1/+1
Signed-off-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-03-22endian: Be able to detect endian on GNU and BSDHolger Hans Peter Freyther2-0/+39
On GNU __BYTE_ORDER and __LITTLE_ENDIAN is defined and the include is "endian.h" on FreeBSD it is "sys/endian.h" and LITTLE_ENDIAN/_LITTLE_ENDIAN and BYTE_ORDER/_BYTE_ORDER is defined. Create a header file that defines OSMO_IS_LITTLE_ENDIAN and OSMO_IS_BIG_ENDIAN and can be used as #if OSMO_IS_LITTLE_ENDIAN do_little_endian #elif OSMO_IS_BIG_ENDIAN do_big_endian #else #error "Unknown endian" #endif
2015-03-18bssgp: Handle BSSGP STATUS messagesJacob Erlbeck1-0/+2
Currently incoming BSSGP STATUS messages are just logged and no other action is taken. This makes it impossible for higher layers to react to failures which are indicated by corresponding STATUS messages unless a timeout is triggered as a result of that failure later on. This commit adds a bssgp_rx_status() function and calls it on incoming STATUS messages. That function logs a message, increments the new BSSGP_CTR_STATUS counter if the bctx context exists and invokes an NM_STATUS status indication. The latter will allow the application to handle failures immediately. Since all STATUS messages should be handled, the function is already called in bssgp_rcvmsg and the message is no longer handled in (and will not reach) bssgp_rx_sign and bssgp_rx_ptp. Ticket: OW#1414 Sponsored-by: On-Waves ehf
2015-01-18core/gsmtap: LTE RRC message types and LTE MAC definealtaf1-0/+15
Submitted-by: altaf <altaf329@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-01-01Supplementary Services (de)activation, interrogation addedTobias Engel3-1/+153
These patches enhance the Supplementary Service (SS) processing from only being able to handle USSD to other SS, specifically activation, deactivation and interrogation of those SS. Registration is not yet implemented. include/osmocom/gsm/protocol/gsm_09_02.h has been added with needed values for SS. Modified by Harald Welte to keep the old ussd-only functiosn for API/ABI stability.
2014-12-30SMS-CB: introduce and use GSM341_7BIT_PADDINGHarald Welte1-0/+1
2014-12-30SMS-CB: Add #defines for maximum block/msg size and payload charsHarald Welte2-0/+8
2014-12-30add missing gsm0341.hHarald Welte1-0/+9
2014-12-29add gsm0341_test to generate SMSCB hex stringsHarald Welte1-0/+1
Those hex strings can then be copy+pasted into the OSmoNITB VTY
2014-12-29Add Cell Broadcast MSGIDs from TS 23.041 v12.6.0 Release 12Harald Welte1-0/+38
2014-12-28bitvec: Fix typo in the csn1 encoding codeHolger Hans Peter Freyther1-1/+1
We can curse about CSN.1 and 3GPP but I think we want to call it cursor here.
2014-12-28libosmo-gsm: Add PCHAN/LCHAN types for CBCHHarald Welte1-0/+3
2014-12-22ipa: Add forward declaration of struct osmo_fdJacob Erlbeck1-0/+2
A pointer to struct osmo_fd is used in a few prototypes declared in gsm/ipa.h, but is neither declared explicitly nor is such a declaration reachable via the given include directives. This patch adds a forward declaration of this type to ensure proper compilation. Sponsored-by: On-Waves ehf
2014-12-14ipa: Make a reservation for the GSUP protocolHolger Hans Peter Freyther1-0/+1
GSUP is a protocol to have the OpenBSC SGSN talk to an exterbal system for 3GPP MAP connectivity.
2014-12-05logging: Make it possible to print category/subsys and timestampsHolger Hans Peter Freyther1-0/+6
We want to see from which category/subsystem a certain log message is coming from and use a different timestamp format as well. Add two new bitfields. This doesn't change the size of the structure and on 32bit we still have 27bits left. The extended timestamp will take preference over the current and default timestamp format. Fixes: SYS#602
2014-12-04gtp: Add a global region for the gtp library of OpenGGSNHolger Hans Peter Freyther1-1/+2
We want to use libosmocore/libosmovty in the GGSN sourcecode and reserve a global region here.
2014-12-04vty: Check with the application before writing the configHolger Hans Peter Freyther1-0/+2
For the BSC/NITB application we see that people modify the band without modifying the ARFCN. This creates an unbootable config. Using the new hook the BSC/NITB can check if the config is consistent and prevent the config file being written. Related: SYS#739
2014-11-14remove references to u_char type, use 'unsigned char' insteadHarald Welte2-2/+2
... u_char not being defined on Nuttx.
2014-10-26sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+Harald Welte2-2/+2
according to Holger, using AGPLv3+ at the time was a mistake and the license should always have indicated GPLv2+.
2014-10-26Change license of libosmogb from AGPLv3+ to GPLv2+Harald Welte1-4/+4
The copyright holders Harald Welte, Holger Freyther, Andreas Eversberg and sysmocom - s.f.m.c. GmbH (represented by Holger and Harald) agree that the license of libosmogb should be GPLv2+ and not AGPLv3+. The reason the source files stated AGPLv3+ is due to the history, as they were moved from OpenBSC to libosmocore at the time we needed to use them from osmo-pcu. It was an oversight back then to not re-license them accordingly.
2014-10-26make sure to register DF.TELECOM and DF.GSM for SIM, USIM + TSIMHarald Welte1-2/+2
before we only did it partially, and by exporting data from sim, rather than the new osim_int_cprof_add_{gsm,telecom}() functions.
2014-10-26sim: add missing const to reader_ops member of reader_handleHarald Welte1-1/+1
2014-10-26sim: Prepare infrastructure for protocols != T=0 and other driversHarald Welte1-2/+17
2014-10-26sim: More comments in sim.hHarald Welte1-12/+44
2014-10-26sim: Make TETRA SIM (TSIM) support compileHarald Welte1-0/+9
2014-10-26sim: mark osim_msgb_cb as __may_alias__ to avoid gcc warningsHarald Welte1-1/+1
2014-10-26sim: Add sfi to EF_*() macrosHarald Welte1-11/+14
2014-10-26sim: Add minimal/recommended size of file / recordHarald Welte1-15/+29