]> git.proxmox.com Git - mirror_frr.git/blobdiff - doc/developer/logging.rst
Merge pull request #12698 from Orange-OpenSource/isisd
[mirror_frr.git] / doc / developer / logging.rst
index 5aca27d7f732be864d306694b1b387b50014e24f..2fe0a5989b94d8a81612fb3ac1a49cb39653d50f 100644 (file)
@@ -158,16 +158,19 @@ Networking data types
 
    - :c:struct:`prefix_ls`
    - :c:struct:`prefix_rd`
-   - :c:struct:`prefix_ptr`
    - :c:struct:`prefix_sg` (use :frrfmt:`%pPSG4`)
    - :c:union:`prefixptr` (dereference to get :c:struct:`prefix`)
    - :c:union:`prefixconstptr` (dereference to get :c:struct:`prefix`)
 
+   Options:
+
+   ``%pFXh``: (address only) :frrfmtout:`1.2.3.0` / :frrfmtout:`fe80::1234`
+
 .. frrfmt:: %pPSG4 (struct prefix_sg *)
 
    :frrfmtout:`(*,1.2.3.4)`
 
-   This is *(S,G)* output for use in pimd.  (Note prefix_sg is not a prefix
+   This is *(S,G)* output for use in zebra.  (Note prefix_sg is not a prefix
    "subclass" like the other prefix_* structs.)
 
 .. frrfmt:: %pSU (union sockunion *)
@@ -201,12 +204,6 @@ Networking data types
 
    ``%pNHci``: :frrfmtout:`eth0` — compact interface only
 
-.. frrfmt:: %pBD (struct bgp_dest *)
-
-   :frrfmtout:`fe80::1234/64`
-
-   (only available in bgpd.)
-
 .. frrfmt:: %dPF (int)
 
    :frrfmtout:`AF_INET`
@@ -335,6 +332,79 @@ Time/interval formats
    ``mx``: :frrfmtout:`09:09`, :frrfmtout:`--:--` - this replaces
    :c:func:`pim_time_timer_to_mmss()`.
 
+FRR library helper formats
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. frrfmt:: %pTH (struct event *)
+
+   Print remaining time on timer event. Interval-printing flag characters
+   listed above for ``%pTV`` can be added, e.g. ``%pTHtx``.
+
+   ``NULL`` pointers are printed as ``-``.
+
+.. frrfmt:: %pTHD (struct event *)
+
+   Print debugging information for given event.  Sample output:
+
+   .. code-block:: none
+
+      {(thread *)NULL}
+      {(thread *)0x55a3b5818910 arg=0x55a3b5827c50 timer  r=7.824      mld_t_query() &mld_ifp->t_query from pimd/pim6_mld.c:1369}
+      {(thread *)0x55a3b5827230 arg=0x55a3b5827c50 read   fd=16        mld_t_recv() &mld_ifp->t_recv from pimd/pim6_mld.c:1186}
+
+   (The output is aligned to some degree.)
+
+FRR daemon specific formats
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following formats are only available in specific daemons, as the code
+implementing them is part of the daemon, not the library.
+
+zebra
+"""""
+
+.. frrfmt:: %pZN (struct route_node *)
+
+   Print information for a RIB node, including zebra-specific data.
+
+   :frrfmtout:`::/0 src fe80::/64 (MRIB)` (``%pZN``)
+
+   :frrfmtout:`1234` (``%pZNt`` - table number)
+
+bgpd
+""""
+
+.. frrfmt:: %pBD (struct bgp_dest *)
+
+   Print prefix for a BGP destination.
+
+   :frrfmtout:`fe80::1234/64`
+
+.. frrfmt:: %pBP (struct peer *)
+
+   :frrfmtout:`192.168.1.1(leaf1.frrouting.org)`
+
+   Print BGP peer's IP and hostname together.
+
+pimd/pim6d
+""""""""""
+
+.. frrfmt:: %pPA (pim_addr *)
+
+   Format IP address according to IP version (pimd vs. pim6d) being compiled.
+
+   :frrfmtout:`fe80::1234` / :frrfmtout:`10.0.0.1`
+
+   :frrfmtout:`*` (``%pPAs`` - replace 0.0.0.0/:: with star)
+
+.. frrfmt:: %pSG (pim_sgaddr *)
+
+   Format S,G pair according to IP version (pimd vs. pim6d) being compiled.
+   Braces are included.
+
+   :frrfmtout:`(*,224.0.0.0)`
+
+
 General utility formats
 ^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -432,6 +502,51 @@ General utility formats
    representation for a hexdump.  Non-printable characters are replaced with
    a dot.
 
+.. frrfmt:: %pIS (struct iso_address *)
+
+   ([IS]o Network address) - Format ISO Network Address
+
+   ``%pIS``: :frrfmtout:`01.0203.04O5`
+   ISO Network address is printed as separated byte. The number of byte of the
+   address is embeded in the `iso_net` structure.
+
+   ``%pISl``: :frrfmtout:`01.0203.04O5.0607.0809.1011.1213.14` - long format to
+   print the long version of the ISO Network address which include the System
+   ID and the PSEUDO-ID of the IS-IS system
+
+   Note that the `ISO_ADDR_STRLEN` define gives the total size of the string
+   that could be used in conjunction to snprintfrr. Use like::
+
+     char buf[ISO_ADDR_STRLEN];
+     struct iso_net addr = {.len = 4, .addr = {1, 2, 3, 4}};
+     snprintfrr(buf, ISO_ADDR_STRLEN, "%pIS", &addr);
+
+.. frrfmt:: %pSY (uint8_t *)
+
+   (IS-IS [SY]stem ID) - Format IS-IS System ID
+
+   ``%pSY``: :frrfmtout:`0102.0304.0506`
+
+.. frrfmt:: %pPN (uint8_t *)
+
+   (IS-IS [P]seudo [N]ode System ID) - Format IS-IS Pseudo Node System ID
+
+   ``%pPN``: :frrfmtout:`0102.0304.0506.07`
+
+.. frrfmt:: %pLS (uint8_t *)
+
+   (IS-IS [L]sp fragment [S]ystem ID) - Format IS-IS Pseudo System ID
+
+   ``%pLS``: :frrfmtout:`0102.0304.0506.07-08`
+
+   Note that the `ISO_SYSID_STRLEN` define gives the total size of the string
+   that could be used in conjunction to snprintfrr. Use like::
+
+     char buf[ISO_SYSID_STRLEN];
+     uint8_t id[8] = {1, 2, 3, 4 , 5 , 6 , 7, 8};
+     snprintfrr(buf, SYS_ID_SIZE, "%pSY", id);
+
+
 Integer formats
 ^^^^^^^^^^^^^^^