path: root/include/osmocom/vty
diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2019-02-21 02:27:48 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-03-06 00:51:15 +0100
commit5734bff3b01da2a7369da07f77ad617c3ac32096 (patch)
treecd2885915671d2f4dca4ea5b23cbfb7e02ab3b47 /include/osmocom/vty
parent8aa691f30b5f6d77ae05e590e5d3426550ee4452 (diff)
represent negative T-timers as Osmocom-specific X-timers
fi->T values are int, i.e. can be negative. Do not log them as unsigned, but define a distinct timer class "Xnnnn" for negative T values: i.e. for T == -1, print "Timeout of X1" instead of "Timeout of T4294967295". The negative T timer number space is useful to distinguish freely invented timers from proper 3GPP defined T numbers. So far I was using numbers like T993210 or T9999 for invented T, but X1, X2 etc. is a better solution. This way we can make sure to not accidentally define an invented timer number that actually collides with a proper 3GPP specified timer number that the author was not aware of at the time of writing. Add OSMO_T_FMT and OSMO_T_FMT_ARGS() macros as standardized timer number print format. Use that in fsm.c, tdef_vty.c, and adjust vty tests accordingly. Mention the two timer classes in various API docs and VTY online-docs. Change-Id: I3a59457623da9309fbbda235fe18fadd1636bff6
Diffstat (limited to 'include/osmocom/vty')
1 files changed, 3 insertions, 1 deletions
diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h
index f55239ad..16d94981 100644
--- a/include/osmocom/vty/tdef_vty.h
+++ b/include/osmocom/vty/tdef_vty.h
@@ -35,7 +35,9 @@ struct osmo_tdef;
struct osmo_tdef_group;
-#define OSMO_TDEF_VTY_DOC_T "T-number, optionally preceded by 't' or 'T'.\n"
+#define OSMO_TDEF_VTY_DOC_T \
+ "T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234';" \
+ " Osmocom-specific timer number of the format: 'X1234' or 'x1234'.\n"
#define OSMO_TDEF_VTY_ARG_VAL "(<0-2147483647>|default)"