| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bump the ABI version of libosmovty and we need to do this
recursively to force rebuilds of our software.
|
|
|
|
|
| |
include stdint.h for int64_t and use netinet/in.h and not
netinet/ip.h for getting sockaddr_in and such.
|
|
|
|
|
|
|
|
|
| |
timer.c:27:23: warning: tentative definition of variable with internal linkage has incomplete
non-array type 'struct timeval' [-Wtentative-definition-incomplete-type]
static struct timeval nearest;
^
timer.c:27:15: note: forward declaration of 'struct timeval'
static struct timeval nearest;
|
|
|
|
| |
Sponsored-by: On-Waves ehi
|
|
|
|
|
|
|
| |
For the atoi we need to pass the val as a string. This means
we need to write "0" which then gets parsed to 0.
[src/vty/stats_vty.c:90]: (error) Possible null pointer dereference: val
|
|
|
|
|
|
|
|
| |
we need to put the default value into inaddr and not put a
32bit value into the addr pointer.
Spotted by cppcheck:
[src/stats.c:231]: (error) Uninitialized variable: inaddr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nothing is being done with these return values. Remove them
for now and update the TODO entry that is present at two of
the three places.
stats.c: In function ‘rate_ctr_handler’:
stats.c:570:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^
stats.c: In function ‘osmo_stat_item_handler’:
stats.c:617:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
^
stats.c: In function ‘handle_counter’:
stats.c:651:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc;
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the unsigned group index value is silently being cast to
(signed) int in the log and statsd reporter code. If the resulting
value is negative (which can happen for instance with MMCTX
counters), the index is assumed to be unset.
This commit changes the affected types to unsigned. The index value 0
is then the only value indicating an unset group.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
| |
This reporter passes the measurement values to the logging subsystem
as DSTATS (which is currently DLGLOBAL) level INFO messages.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
To support reporters without network configuration, this commit
introduces the have_net_config flag to provide corresponding error
messages.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
| |
Currently the config_write_stats_reporter function does not output
the mtu value, which is fixed by this commit.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
This commit changes the reporting code to also show all modified
osmo_counter values. Since there is no grouping of these values, the
name string just consists of the optional prefix and the counter
name.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Currently only rate counter are being supported.
This commit adds support for stat items. All groups are polled for
changed values.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This functions shows the state of all osmo_counters, stat_item
groups, and counter groups.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
| |
Currently the groups for stat_items and counter are iterated
manually.
This commit makes use of the new iterator functions to access the
single elements via handlers.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This functions dumps a whole stat item group to the VTY.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using configure --disable-static, no libosmogsm.a will be
created, and the tests fail to link because symbols like _a5_3 and
_a5_4 are not exported through the only remaining libosmogsm.so.
A method to overcome this is an intermediate private non-distributed
library, examples of which are present in e.g. libabc, kmod and
systemd.
With this, disable-static can now be the default and practical compile
time be halved.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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,
^~~~~~~~~
|
|
|
|
|
| |
I have kind of used 0.8.1 by accident already so let us move
to 0.8.2 now.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the size of the IMSI pointer is used instead of the size of
the talloc'ed buffer.
This commit changes the call to gsm48_mi_to_string to use the same
value that has been used with talloc_zero_size(). The length is
changed to 17 since that value is used for GSM_IMSI_LENGTH in
openbsc.
Fixes: Coverity CID 1040663
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
| |
Addresses:
CCLD utils/utils_test
utils_test.o: In function `test_idtag_parsing':
git/libosmocore/tests/utils/utils_test.c:64: undefined reference to `ipa_ccm_idtag_parse_off'
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes:
In file included from ../../../include/osmocom/core/msgb.h:25:0,
from ../../../include/osmocom/sim/sim.h:4,
from ../../../src/sim/reader_pcsc.c:30:
../../../include/osmocom/core/bits.h:6:35: fatal error: osmocom/core/bit16gen.h: No such file or directory
#include <osmocom/core/bit16gen.h>
In file included from ../../include/osmocom/core/msgb.h:25:0,
from ../../utils/osmo-sim-test.c:26:
../../include/osmocom/core/bits.h:6:35: fatal error: osmocom/core/bit16gen.h: No such file or directory
#include <osmocom/core/bit16gen.h>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the DL sometimes hangs and sometimes a lot of messages
(still not able to send PDU) are logged. This is caused by an invalid
timer delay computation, setting msecs either to 0 or to some big value.
This is due to an '&' operator at the wrong place, accessing some
parts in fc instead of the first element of the list.
This commit fixes that issue.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
| |
Currently all 2 byte IE of the message are transmitted in the little
endian byte ordering.
This commit adds htons to the encoding expressions.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
| |
The output is terminated by a '\n' instead of VTY_NEWLINE.
This is fixed by the commit.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
It simply compiles, no other testing has been done.
|
|
|
|
|
|
|
|
| |
We should consider simply removing the alias as we have
had several ABI changes since introducint the alias
utils.c:223:23: error: only weak aliases are supported on darwin
__attribute__((weak, alias("osmo_hexdump_nospc")));
|