| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I6c1f47d13c5b7a9cb2281de9f017df4f1ed88ba7
|
|
|
|
| |
Change-Id: I91920c69c86d6a1932172becacb76faff2d3eb1e
|
|
|
|
| |
Change-Id: I1e875991ae1dd93862f850f85d40b3dac61ece72
|
|
|
|
| |
Change-Id: Ieee6213dc5aad082a2d439c7418b51f281b80b1a
|
|
|
|
| |
Change-Id: I24c56ccb56d5b39cfb887808f91b715da54c0f8b
|
|
|
|
| |
Change-Id: I2fd24c86f9b52244073ec800a3287e3d38e660d9
|
|
|
|
| |
Change-Id: I5fb1c34475ea9db36c2ec5cddc988074a72a35f7
|
|
|
|
|
|
| |
Let's hence not call the group "GSM L3 compatible TLV parser"
Change-Id: Ic53f9c0d5ee787f994f42cf2aff313c6e131fbe6
|
|
|
|
|
|
|
| |
We also have "A-bis OML" and it's a bit odd to have one with prefix
and the other without.
Change-Id: Ida325f8a9c40b40c1aeaa4edfd1123ced7cc92b8
|
|
|
|
|
|
| |
Also, make sure prim.c is actually part of the 'prim' module.
Change-Id: I4363e46a5f606eb2114a9cc1d2086007eaa58d31
|
|
|
|
|
|
| |
.. and add missing API documentation bits
Change-Id: I67119894bcbf8c779426a0272bae4c5ce1fbd1ed
|
|
|
|
| |
Change-Id: If824a5c8d8ee6e3dc96a3fddeb105786c0c027c1
|
|
|
|
| |
Change-Id: I8e49505f5c19beac90290fdba8821714e8eecd97
|
|
|
|
|
|
|
| |
This adds a more complete set of API documentation for all
osmo_counter relatedd functions and definitions.
Change-Id: I24283c05620ee86a8beb165af98a85d754549efb
|
|
|
|
|
|
|
|
| |
The stat_item code base had some incomplete doxygen documentation
so far. Let's complete it, and at the same time fix some cosmetic
as well as copy+paste issues in the existing documentation bits.
Change-Id: Ib514c137b40bf7b9791bd74be99af0b65575f2b6
|
|
|
|
|
|
|
|
|
| |
With stat_item, stats.c and stats_statsd.c, it is becoming a bit
difficult to understand file naming. Also, the 'statistics.c' file
actually only contained osmo_counter handling, so let's rename it to
counter.c altogether.
Change-Id: I2cfb2310543902b7da46cb15a76e2da317eaed7d
|
|
|
|
|
|
| |
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: Idf75946eb0a84e145adad13fc7c78bb7a267aa0a
|
|
|
|
|
|
| |
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: Ic39f3404d1a49ffd06070aa9897b36f219eacf4d
|
|
|
|
|
|
|
|
|
| |
Add osmo_sub_auth_type_names[] and osmo_sub_auth_type_name().
Also add a hint to enum osmo_auth_algo's API doc that osmo_auth_alg_name()
already exists (it is defined further below).
Change-Id: I652a929bcd11c694d86812fb03d0a1cbd985efda
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function is a wrapper on top of getrandom() (if available via glibc) or
corresponding syscall. If neither is available than failure is always
returned.
It's intended to generate small random data good enough for session
identifiers and keys. To generate long-term cryptographic keys it's
better to use special crypto libraries (like GnuTLS for example)
instead.
As an example it's used to replace old insecure random number generator
in osmo-auc-gen utility.
Change-Id: I0241b814ea4c4ce1458f7ad76e31d390383c2048
Related: OS#1694
|
|
|
|
|
|
|
|
|
| |
Add GSM23003_IMSI_MIN_DIGITS definition.
Add regression test gsm23003_test.c to test the two new functions.
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many callers of the VTY API, we are lacking the vty_install_default() step
at certain node levels. This creates nodes that lack the 'exit' command, and
hence the only way to exit such a node is to restart the telnet session.
Historically, the VTY looked for missing commands on the immediate parent node,
and hence possibly found the parent's 'exit' command when the local node was
missing it. That is why we so far did not notice the missing default commands.
Furthermore, some callers call install_default() instead of
vty_install_default(). Only vty_install_default() also includes the 'exit' and
'end' commands. There is no reason why there are two sets of default commands.
To end this confusion, to catch all missing 'exit' commands and to prevent this
from re-appearing in the future, simply *always* install all default commands
implicitly when calling install_node().
In cmd_init(), there are some top-level nodes that apparently do not want the
default commands installed. Keep those the way they are, by changing the
invocation to new install_node_bare() ({VIEW,AUTH,AUTH_ENABLE}_NODE).
Make both install_default() and vty_install_default() no-ops so that users of
the API may still call them without harm. Do not yet deprecate yet, which
follows in Icf5d83f641e838cebcccc635a043e94ba352abff.
Drop all invocations to these two functions found in libosmocore.
Change-Id: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a new command, which could be used to
inspect the application's talloc context directly from VTY.
To enable this feature, an application need to provide it's
context via the 'vty_app_info' struct, and register the VTY
command by calling the osmo_talloc_vty_add_cmds().
The new command is a sub-command of 'show':
show talloc-context <context> <depth> [filter]
Currently the following contexts may be inspected:
- application - a context provided by an application;
- null - all contexts, if NULL-context tracking is enabled.
A report depth is defined by the next parameter, and could be:
- full - full tree report, as the talloc_report_full() does;
- brief - brief tree report, as the talloc_report() does;
- DEPTH - user defined maximal report depth.
Also, there are two optional report filters:
- regexp - print only contexts, matching a regular expression;
- tree - print a specific context, pointed by specified address.
The command output is formatted the same way as in case of calling
the talloc_report() or talloc_report_full().
Change-Id: I43fc42880b22294d83c565ae600ac65e4f38b30d
|
|
|
|
|
|
|
| |
Add macros to break down absolute time in seconds into days/hours/minutes
passed.
Change-Id: I46b9a405c18ed9da8f31b7d5b6dcece5468bafbf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'show online-help' produces XML output with <node id="..."> ids. We
reference those from the osmo-gsm-manuals.
Instead of numeric IDs coming from internal code, rather use a human-readable
node ID -- referencing id='config-msc' is much easier than referencing id='23'.
Add a char name[] to struct cmd_node, to hold this name. This may be provided
upon struct definition.
Since callers of the VTY API so far don't have a name yet, we would need to add
names everywhere to get meaningful node IDs. There is a way to get node ID
names without touching dependent code:
My first idea was to find out which command entered the node, i.e. command
'msc' enters the MSC_NODE. But it is impossible to derive which command entered
which node from data structs, it's hidden in the vty command definition.
But in fact all (TM) known API callers indeed provide a prompt string that
contains a logical and human readable string name. Thus, if the name is unset
in the struct, parse the prompt string and strip all "weird" characters to
obtain a node name from that. We can still set names later on, but for now will
have meaningful node IDs (e.g. 'config-msc' from '%s(config-msc)# ') without
touching any dependent code.
When VTY nodes get identical node names, which is quite possible, the XML
export de-dups these by appending _2, _3,... suffixes. The first occurence is
called e.g. 'name', the second 'name_2', then 'name_3', and so forth.
If a node has no name (even after parsing the prompt), it will be named merely
by the suffix. The first empty node will become id='_1', then '_2', '_3', and
so forth. This happens for nodes like VIEW_NODE or AUTH_NODE.
If this is merged, we need to adjust the references in osmo-gsm-manuals.git.
This can happen in our own time though, because we manually create the vty
reference xml and copy it to the osmo-gsm-manuals.git and then update the
references from the vty_additions.xml. This anyway has to happen because
currently the references tend to be hopelessly out of sync anyway, placing
comments at wildly unrelated VTY commands.
Change-Id: I8fa555570268b231c5e01727c661da92fad265de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: This will break users' config files if they do not use consistent
indenting. (see below for a definition of "consistent".)
When reading VTY commands from a file, use indenting as means to implicitly
exit child nodes. Do not look for commands in the parent node implicitly.
The VTY so far implies 'exit' commands if a VTY line cannot be parsed on the
current node, but succeeds on the parent node. That is the mechanism by which
our VTY config files do not need 'exit' at the end of each child node.
We've hit problems with this in the following scenarios, which will show
improved user experience after this patch:
*) When both a parent and its child node have commands with identical names:
cs7 instace 0
point-code 1.2.3
sccp-address osmo-msc
point-code 0.0.1
If I put the parent's command below the child, it is still interpreted in the
context of the child node:
cs7 instace 0
sccp-address osmo-msc
point-code 0.0.1
point-code 1.2.3
Though the indenting lets me assume I am setting the cs7 instance's global PC
to 1.2.3, I'm actually overwriting osmo-msc's PC with 1.2.3 and discarding the
0.0.1.
*) When a software change moves a VTY command from a child to a parent. Say
'timezone' moved from 'bts' to 'network' level:
network
timezone 1 2
Say a user still has an old config file with 'timezone' on the child level:
network
bts 0
timezone 1 2
trx 0
The user would expect an error message that 'timezone' is invalid on the 'bts'
level. Instead, the VTY finds the parent node's 'timezone', steps out of 'bts'
to the 'network' level, and instead says that the 'trx' command does not exist.
Format:
Consistent means that two adjacent indenting lines have the exact
same indenting characters for the common length:
Weird mix if you ask me, but correct and consistent:
ROOT
<space>PARENT
<space><tab><space>CHILD
<space><tab><space><tab><tab>GRANDCHILD
<space><tab><space><tab><tab>GRANDCHILD2
<space>SIBLING
Inconsistent:
ROOT
<space>PARENT
<tab><space>CHILD
<space><space><tab>GRANDCHILD
<space><tab><tab>GRANDCHILD2
<tab>SIBLING
Also, when going back to a parent level, the exact same indenting must be used
as before in that node:
Incorrect:
ROOT
<tab>PARENT
<tab><tab><tab>CHILD
<tab><tab>SIBLING
As not really intended side effect, it is also permitted to indent the entire
file starting from the root level. We could guard against it but there's no
harm:
Correct and consistent:
<tab>ROOT
<tab><tab>PARENT
<tab><tab><tab><tab>CHILD
<tab><tab>SIBLING
Implementation:
Track parent nodes state: whenever a command enters a child node, push a parent
node onto an llist to remember the exact indentation characters used for that
level.
As soon as the first line on a child node is parsed, remember this new
indentation (which must have a longer strlen() than its parent level) to apply
to all remaining child siblings and grandchildren.
If the amount of spaces that indent a following VTY command are less than this
expected indentation, call vty_go_parent() until it matches up.
At any level, if the common length of indentation characters mismatch, abort
parsing in error.
Transitions to child node are spread across VTY implementations and are hard to
change. But transitions to the parent node are all handled by vty_go_parent().
By popping a parent from the list of parents in vty_go_parent(), we can also
detect that a command has changed the node without changing the parent, hence
it must have stepped into a child node, and we can push a parent frame.
The behavior on the interactive telnet VTY remains unchanged.
Change-Id: I24cbb3f6de111f2d31110c3c484c066f1153aac9
|
|
|
|
|
|
|
|
|
|
| |
Add OSMO_BIT_PRINT_EX() which is like OSMO_BIT_PRINT() but allows to
specify character to be printed for set bits. It's useful to print bytes
used as mask where set bit has particular semantics - for example TS
mask in OsmoPCU.
Change-Id: I72528bc1e376134c5a7b6e7a50c48e38c3f48b0a
Related: OS#2282
|
|
|
|
| |
Change-Id: I8ed0f1dbc31aaff22a685ceb3bd2f8db4d2f34fd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing UMTS AKA with AUTS, it can be interesting to know the SQN.MS that
was encoded in the AUTS. The only way to know this is to provide it as a
separate out-parameter from milenage_gen_vec_auts(), because the SQN.MS from
AUTS stored in umts.sqn is immediately modified non-trivially by
milenage_gen_vec(). Add sqn_ms to struct osmo_sub_auth_data to retain SQN.MS
even after a vector was generated.
Use this to print out SQN.MS for 'osmo-auc-gen -3 -A'.
Adjust test suite expectations.
Related: OS#2464
Change-Id: I9fc05bbf169d06716f40b995154fd42a3f91bef3
|
|
|
|
|
|
|
|
| |
Clearly indicate that 'sqn' is an in *and* out-parameter.
Clarify the effect of 'ind'.
Change-Id: Ia40cd4ddf35f4fbe895b45b8ea59378f5ce9eb1f
|
|
|
|
| |
Change-Id: I5bd49fbc19e88db96b4adbd56c82e7936059551c
|
|
|
|
|
|
|
|
| |
This basically follows the concept of osmo_timer_setup() and allows
the caller to fill-in all configurable fields of osmo_fd in one
line of code, rather than open-coding it in 5 lines everywhere.
Change-Id: I6dbf19ea22fd65302bfc5424c10418d1b7939094
|
|
|
|
|
|
|
|
|
|
|
| |
In the Protocol Configuration Options IE (see 3GPP TS 24.008 10.5.6.3)
there is yet another new TLV format (derived from PPP IPCP/LCP/...)
which uses 16bit tag and 8bit length. Let's add functions so we can
generate related TLVs. Parsing is unfortunately not possible in our
existing structure as our tlv_parsed array only has 256 entries and
thus cannot cope with 16bit tags.
Change-Id: I9799130e2eba8fae8c4480fbb8a900c30232b694
|
|
|
|
|
|
| |
Those functions can be used to look up the size of (E)GPRS blocks.
Change-Id: I05ff75ef7dfae639886bbd09fe35f03a8af9d988
|
|
|
|
|
|
|
| |
PDCH is the physical channel, while actually we want to talk about
PDTCH the logical channel. Introduce backwards compatibility define.
Change-Id: Id6782d2247846e2db29fc58d98684970a66db948
|
|
|
|
|
| |
Change-Id: I9bf8f4dd784ccddbb9926492a85fff3293a0e913
Related: OS#1638
|
|
|
|
|
|
|
|
|
|
|
| |
See also:
https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
https://gerrit.osmocom.org/#/c/3195/2/include/openbsc/osmo_msc.h@13
(change-id I639544a6cdda77a3aafc4e3446a55393f60e4050)
Change-Id: I4222e21686c823985be8ff1f16b1182be8ad6175
|
|
|
|
|
|
|
| |
In the course of splitting up the openbsc.git repository, we will create
libosmo-mgcp and need a library logging category for that purpose.
Change-Id: I09c587e2d59472cbde852d467d457254746d9e67
|
|
|
|
|
|
| |
The list should now be complete up to Releae 14
Change-Id: I693cabe1a3b00a8c4198f7a4a1c647c5d7dc6c41
|
|
|
|
| |
Change-Id: I8d2746eefe1f22dba5b19636ebc9444e458fc802
|
|
|
|
| |
Change-Id: Ie1853697f4cff5ff98654fa1cae6c68e28a0076b
|
|
|
|
|
|
|
| |
Using this option at socket creation, the caller can request disabling
the IP_MULTICAST_ALL socket option.
Change-Id: I5ab5de45c0b64ceb3636ea98245a23defa24ffd4
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new flag OSMO_SOCK_F_NO_MCAST_LOOP, which can be used
to disable the looping back of multicast packets transmitted throug this
socket to other local sockets on the machine.
As this looping-back is active by default, a single option to deviate
from the default is deemed sufficient.
Change-Id: I24a5b1ebc3f84d2d5d4734e54df50efaea26490b
|
|
|
|
| |
Change-Id: Id703e7a7a1e065181a4c76c088b8dcc1b7fe15a2
|
|
|
|
|
|
|
|
|
| |
This is a convenience helper that will both close a fd, mark it as
closed and unregister it from the event loop abstraction. In most
cases, you probably actually want to use it instead of manually closing
and calling osmo_fd_unregister().
Change-Id: Icd0933eed6a24edde7cdcb378e138897ecc5332c
|
|
|
|
| |
Change-Id: Iaf8a99912f42a56ef785a1642e18238c0b67cf68
|
|
|
|
| |
Change-Id: Ie1bc00670887064da0fea61c3dab036c23ceea25
|
|
|
|
|
|
|
| |
Convert a given frame number into a printable string that displays
the sub components of the frame number.
Change-Id: I8015d2ded3940b01b35df7b72fc35c70c25e9926
|
|
|
|
|
|
|
| |
These PRBS sequences are specified in ITU-T O.150. They are typically
used as test data to be transmitted for BER (bit error rate) testing.
Change-Id: I227b6a6e86a251460ecb816afa9a7439d5fb94d1
|
|
|
|
| |
Change-Id: I90113044460a6c511ced14f588876c4280d1cac7
|