summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-05 16:23:23 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-01-14 11:57:46 +0100
commit2c5b4d80efc507f7244303d959f99af8061dacf3 (patch)
treea0435f4662282c8e0bdd228dc53932db8abc6631 /doc
parenttools: disable printf ext checks in checkpatch (diff)
downloadfrr-2c5b4d80efc507f7244303d959f99af8061dacf3.tar.xz
frr-2c5b4d80efc507f7244303d959f99af8061dacf3.zip
lib: add `s` option to `pI4`/`pI6`/`pIA` printfrr
Adding an `s` after these printfrr specifiers replaces 0.0.0.0 / :: in the output with a star (`*`). This is primarily intended for use with multicast, e.g. to print `(*,G)`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/developer/logging.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/developer/logging.rst b/doc/developer/logging.rst
index e60804682..a51f51553 100644
--- a/doc/developer/logging.rst
+++ b/doc/developer/logging.rst
@@ -123,10 +123,14 @@ Networking data types
:frrfmtout:`1.2.3.4`
+ ``%pI4s``: :frrfmtout:`*` — print star instead of ``0.0.0.0`` (for multicast)
+
.. frrfmt:: %pI6 (struct in6_addr *)
:frrfmtout:`fe80::1234`
+ ``%pI6s``: :frrfmtout:`*` — print star instead of ``::`` (for multicast)
+
.. frrfmt:: %pEA (struct ethaddr *)
:frrfmtout:`01:23:45:67:89:ab`
@@ -135,6 +139,8 @@ Networking data types
:frrfmtout:`1.2.3.4` / :frrfmtout:`fe80::1234`
+ ``%pIAs``: — print star instead of zero address (for multicast)
+
.. frrfmt:: %pFX (struct prefix *)
:frrfmtout:`1.2.3.0/24` / :frrfmtout:`fe80::1234/64`