From 1b871905093ab0b9e806c8f8ee3e5173a4c0c509 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 20 Jun 2024 20:12:16 -0700 Subject: [PATCH] [cli] output service ID when listing services in network data (#10408) --- src/cli/README_NETDATA.md | 5 +++-- src/cli/cli_network_data.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/cli/README_NETDATA.md b/src/cli/README_NETDATA.md index 940288596..5deeb7762 100644 --- a/src/cli/README_NETDATA.md +++ b/src/cli/README_NETDATA.md @@ -374,6 +374,7 @@ Service entries are listed under `Services` header: - Flags - s: Stable flag - RLOC16 of devices which added the service entry +- Service ID 6LoWPAN Context IDs are listed under `Contexts` header: @@ -400,7 +401,7 @@ Routes: fd00:1234:0:0::/64 s med a000 fd00:4567:0:0::/64 s med 8000 Services: -44970 5d fddead00beef00007bad0069ce45948504d2 s a000 +44970 5d fddead00beef00007bad0069ce45948504d2 s a000 0 Contexts: fd00:dead:beef:cafe::/64 1 c Commissioning: @@ -417,7 +418,7 @@ fd00:dead:beef:cafe::/64 paros med a000 Routes: fd00:1234:0:0::/64 s med a000 Services: -44970 5d fddead00beef00007bad0069ce45948504d2 s a000 +44970 5d fddead00beef00007bad0069ce45948504d2 s a000 0 Done ``` diff --git a/src/cli/cli_network_data.cpp b/src/cli/cli_network_data.cpp index 5d1d769c0..629b59f20 100644 --- a/src/cli/cli_network_data.cpp +++ b/src/cli/cli_network_data.cpp @@ -170,7 +170,7 @@ void NetworkData::OutputService(const otServiceConfig &aConfig) OutputFormat(" s"); } - OutputLine(" %04x", aConfig.mServerConfig.mRloc16); + OutputLine(" %04x %u", aConfig.mServerConfig.mRloc16, aConfig.mServiceId); } /** @@ -713,8 +713,8 @@ exit: * Routes: * fd49:7770:7fc5:0::/64 s med 4000 * Services: - * 44970 5d c000 s 4000 - * 44970 01 9a04b000000e10 s 4000 + * 44970 5d c000 s 4000 0 + * 44970 01 9a04b000000e10 s 4000 1 * Contexts: * fd00:dead:beef:cafe::/64 1 c * Commissioning: @@ -771,6 +771,7 @@ exit: * * Flags * * s: Stable flag * * RLOC16 of devices which added the service entry + * * Service ID * @par * 6LoWPAN Context IDs are listed under `Contexts` header: * * The prefix