summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* RSL: Add enum + TLV definitions for ip.access style embedded IEsHarald Welte2015-12-132-0/+31
|
* gsm_03_41: Fix structure definitions for big-endian machinesRuben Undheim2015-12-091-0/+31
| | | | | this was detected by debian packaging, as the associated gsm_03_41 test case fails on big endian machines like ppc.
* stats: Add OSMO prefix to STAT_ITEM_NOVALUE_IDJacob Erlbeck2015-12-081-1/+1
| | | | | | | This symbol is globally visible and therefore should have an OSMO prefix like the other identifiers exported by stat_item.h. Sponsored-by: On-Waves ehf
* stat: Explicitly support stat_items without unitJacob Erlbeck2015-12-081-0/+1
| | | | | | | Add OSMO_STAT_ITEM_NO_UNIT for stat items without an unit. The statsd reporter uses gauges ("g") to report them. Sponsored-by: On-Waves ehf
* remove our internal copy of talloc, use system libtallocHarald Welte2015-12-053-205/+4
| | | | | | | Shipping our own private copy of talloc was a good idea in 2008, when it was not readily available on most target platforms. Today, the situation is quite different, as it is a standard library on major Linux distributions.
* stats: Move statsd related code into a separate fileJacob Erlbeck2015-11-261-4/+12
| | | | | | | | | | | This commit moves the stats specific code parts into stats_statsd.c while keeping the generic parts in stats.c. The code in stats.c no longer contains references to statsd symbols. Note that the VTY code still needs to know about every stats reporter backend. Sponsored-by: On-Waves ehf
* use system-wide libtalloc with --enable-system-tallocHarald Welte2015-11-212-1/+14
| | | | | | | | | This introduces a new configure flag by which the libosmocore-internal talloc code is not compiled, but rather a system-wide libtalloc is used. When we started openbsc/libosmocore in 2008, libtalloc was not widely present on systems yet. This has changed meanwhile, and we should simply use the system-wide library
* fix FSF address in sources/headersJaroslav Škarvada2015-11-124-7/+8
| | | | Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* stats: Send all values on reporter updateJacob Erlbeck2015-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | Currently only counter changes and new item values are being reported. This makes it cumbersome to configure reporting clients, since there is nothing like a list of all parameters. This commit changes this behaviour such that all currently existing counters and items that would be reported eventually, are passed to the reporter when it has been reconfigured or enabled. If a counter has not been incremented, 0 is sent. If a stat item value has not been added, the last item value (or the default value if there is none) is resent again. Note that this will not catch transient counters/items that will be created later on, e.g. triggered by new peers or subscribers. To just force this kind of dump on a running reporter, it is sufficient to invoke the 'enable' command in its configuration node. Sponsored-by: On-Waves ehf
* gprs-ns/stats: When the NSVCI is updated, update the stats counterHolger Hans Peter Freyther2015-11-042-0/+11
| | | | | | | | | | | The NS object is created with an unknown identity and only after the reset procedure has progressed (completed?) we know the real ID for this peer. Before nobody has looked at the idx values (this could have been seen with the CTRL interface) but with statsd the wrong NSVCI becomes obvious. Add routines to update the idx and I don't know if the change of idx is causing any issues but we will find that out soon.
* stats/vty: Add selective show stats commandJacob Erlbeck2015-08-221-0/+2
| | | | | | | | | | | | | | | | Currently there is only the 'show stats' command which shows all counter and stat_item values. This can lead to many lines of output if there are per-subscriber rate counters. The new command added by this commit allows it to only show groups of a certain level (class_id), similar to the 'level' configuration command for stats reporter. The new command is show stats level (global|peer|subscriber) Sponsored-by: On-Waves ehf
* stats: Fix build on FreeBSDHolger Hans Peter Freyther2015-08-211-0/+2
| | | | | include stdint.h for int64_t and use netinet/in.h and not netinet/ip.h for getting sockaddr_in and such.
* gtphub: add OSMO_VTY_PORT_GTPHUB.Neels Hofmeyr2015-11-021-0/+1
| | | | | | This is for gtphub, being developed in openbsc.git. Sponsored-by: On-Waves ehi
* fix some typosNeels Hofmeyr2015-11-022-5/+5
| | | | Sponsored-by: On-Waves ehi
* log: Add new DLSTATS log levelJacob Erlbeck2015-11-021-1/+2
| | | | | | | | This log level is used by the stats subsystem log reporter to report statistics to level INFO. Note that the default level of DLSTATS is NOTICE. Sponsored-by: On-Waves ehf
* stats: Limit reporting by class idJacob Erlbeck2015-11-023-0/+14
| | | | | | | | | | | | | | | This commit adds class_id fields to the rate_ctr and stat_item group descriptions. The stats reporter code is extended to only process groups whose class_id does not exceed a per reporter max_class level. If the class_id is not set, the code assumes 'global' for groups with idx == 0 and 'subscriber' otherwise. The following vty command is added to config-stats: level (global|peer|subscriber) Set the maximum group level Sponsored-by: On-Waves ehf
* vty: Add reserved nodes to enum node_typeJacob Erlbeck2015-11-021-0/+9
| | | | | | | | | | | | | Currently every time a node is added to enum node_type, this constitutes an ABI change, since _LAST_OSMOVTY_NODE will get incremented accordingly. In this case, every project that adds new node type based on that value will have to be recompiled. This commit adds 4 spare node type values, which can be replaced one-by-one by new real types until they are exhausted to avoid this kind of ABI change. Sponsored-by: On-Waves ehf
* stats: Add osmo_ name prefix to identifiersJacob Erlbeck2015-11-025-67/+67
| | | | | | | | | | Since the the stat_item and stats functions and data types are meant to be exported, they get an osmo_ prefix. Sponsored-by: On-Waves ehf [hfreyther: Prepended the enum values too. This was requested by Jacob]
* stats: Add log reporterJacob Erlbeck2015-10-291-0/+3
| | | | | | | This reporter passes the measurement values to the logging subsystem as DSTATS (which is currently DLGLOBAL) level INFO messages. Sponsored-by: On-Waves ehf
* stats: Use function pointers in reporter objectsJacob Erlbeck2015-10-291-0/+14
| | | | | | | | | | | | Currently case statements are used to select the right reporter functions. This makes it difficult to add new reporter types, especially if they are not going to reside in the same file. This commit introduces per reporter function pointer for open, close, send_count, and send_item. They are checked for non-NULL before being called or skipped. Sponsored-by: On-Waves ehf
* stats: Make net config optionalJacob Erlbeck2015-10-291-0/+2
| | | | | | | | To support reporters without network configuration, this commit introduces the have_net_config flag to provide corresponding error messages. Sponsored-by: On-Waves ehf
* stats: Support statsd Multi-Metric PacketsJacob Erlbeck2015-10-291-0/+5
| | | | | | | | | | | | | | | | If the MTU is given, combine several messages into a single UDP packet until the limit is reached. Flush all reporters after the values have been scanned. New vty commands (node config-stats): mtu <100-65535> Enable multi-metric packets and set the maximum packet size (in byte) no mtu Disable multi-metric packets Note that single messages that are longer than the given MTU (minus 28 octets protocol overhead) will be dropped. Sponsored-by: On-Waves ehf
* core: Add difference function to osmo_counterJacob Erlbeck2015-10-291-0/+4
| | | | | | | The osmo_counter_difference returns the counter value difference since the last call of this function with the given counter object. Sponsored-by: On-Waves ehf
* stats: Implement timer based reportingJacob Erlbeck2015-10-291-2/+8
| | | | | | | | This calls stats_flush in regular intervals which polls the statistical values and calls the active reporters when values have changed. Sponsored-by: On-Waves ehf
* stats/vty: Add stats configurationJacob Erlbeck2015-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit provides stats configuration similar to the log configuration. The following vty commands are added to the config node: stats reporter statsd Create/Modify a statsd reporter no stats reporter statsd Remove a statsd reporter To actually configure a reporter, the config-stats node is entered when the "stats reporter" command has succeeded. The following new vty commands are available there: local-ip ADDR Set the IP address to which we bind locally no local-ip Do not bind to a certain IP address remote-ip ADDR Set the remote IP address to which we connect remote-port <1-65535> Set the remote port to which we connect prefix PREFIX Set the item/counter name prefix no prefix Do not use a prefix enable Enable the reporter disable Disable the reporter Sponsored-by: On-Waves ehf
* stats: Add the reporting frameworkJacob Erlbeck2015-10-292-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
* stats/vty: Add stats_vty.cJacob Erlbeck2015-10-292-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
* stat/vty: Add vty_out_statistics_full to show all statisticsJacob Erlbeck2015-10-281-0/+2
| | | | | | | This functions shows the state of all osmo_counters, stat_item groups, and counter groups. Sponsored-by: On-Waves ehf
* core: Update osmo_counters_for_each docJacob Erlbeck2015-10-281-2/+2
| | | | | | | Fix type and add a note about the semantics of the handler's return code. Sponsored-by: On-Waves ehf
* stats: Add stat_item_for_each functionsJacob Erlbeck2015-10-281-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
* core: Extend rate_ctr by helper functionsJacob Erlbeck2015-10-281-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
* stats: Use a global index for stat item valuesJacob Erlbeck2015-10-281-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
* ns: Add statistics for some eventsJacob Erlbeck2015-10-281-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
* stats: Add vty_out_stat_item_groupJacob Erlbeck2015-10-281-1/+5
| | | | | | This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
* stats: Add stat_item for value monitoringJacob Erlbeck2015-10-282-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
* commentsNeels Hofmeyr2015-10-092-3/+4
|
* ipaccess: add OAP proto_ext (in design).Neels Hofmeyr2015-09-231-0/+1
|
* Introduce gsm48_mi_type_name() functionHarald Welte2015-08-181-0/+1
|
* Add G-RNTI derived TLLI types defined in 23.003Harald Welte2015-08-181-0/+2
|
* vty: Change API to have node installation be done by intHolger Hans Peter Freyther2015-08-052-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, ^~~~~~~~~
* ipa: Properly parse LV stream of a ID_GET requestHolger Hans Peter Freyther2015-06-021-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.
* Add APN utility function to libosmogsmHarald Welte2015-05-252-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.
* bssgp: Fix bssgp_tx_fc_bvc parameter typeJacob Erlbeck2015-05-061-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
* linuxlist: Remove casting of ptr from container_of macroHolger Hans Peter Freyther2015-05-021-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
* osmo_static_assert: Put back the typedef in the codeHolger Hans Peter Freyther2015-04-131-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.
* sim: Use extern for these structs to generate a linkageHolger Hans Peter Freyther2015-04-111-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
* ns: Log when sending fails (Coverity)Jacob Erlbeck2015-04-071-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
* gsm: Add A5/3-4 cipher supportMax2015-03-281-1/+1
| | | | | Signed-off-by: Max <max.suraev@fairwaves.co> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* endian: Be able to detect endian on GNU and BSDHolger Hans Peter Freyther2015-03-222-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
* bssgp: Handle BSSGP STATUS messagesJacob Erlbeck2015-03-181-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