mirror_frr/ospfd
Chirag Shah cb0b2ac6a5 ospfd: fix show ip ospf neigh json
Same ospf neigbor can be learnt via multiple
interfaces, ospf detail json only displayed
last instance only.

Fix json output format to contain "neighbors"
keyword, under which to display all neighbors
for a given vrf.

Fix
show ip ospf neighbor detail json
show ip ospf neighbor detail all json
show ip ospf neighbor <intf name> detail json

Ticket:CM-25528
Reviewed By:
Testing Done:

Run the output with JSON formatter and the output
has passed.

switch1# show ip ospf vrf all neighbor detail json
{
  "default":{
    "vrfName":"default",
    "vrfId":0,
    "neighbors":{
      "0.0.0.2":[
        {
          "ifaceAddress":"14.0.0.22",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.510",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82668,
          "routerDesignatedId":"14.0.0.22",
          "routerDesignatedBackupId":"14.0.0.21",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36195,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on",
          "peerBfdInfo":{
            "type":"single hop",
            "detectMultiplier":4,
            "rxMinInterval":600,
            "txMinInterval":800,
            "status":"Down",
            "lastUpdate":"0:00:00:29"
          }
        },
        {
          "ifaceAddress":"14.0.0.26",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.511",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82658,
          "routerDesignatedId":"14.0.0.26",
          "routerDesignatedBackupId":"14.0.0.25",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36196,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        },
     ]
    }
  }
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-07-09 18:13:22 -07:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
ChangeLog.opaque.txt Initial revision 2003-02-03 16:31:16 +00:00
Makefile build: non-recursive ospf* 2017-08-04 11:09:50 +02:00
ospf_abr.c ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag 2018-09-24 21:46:16 -07:00
ospf_abr.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_api.c *: remove trailing newlines from zlog messages 2019-03-14 18:41:15 +00:00
ospf_api.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_apiserver.c ospfd: remove empty debug 2019-03-19 10:47:00 -04:00
ospf_apiserver.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_asbr.c *: remove casts of XMALLOC / XCALLOC 2019-02-25 23:00:46 +00:00
ospf_asbr.h ospfd: Remove unused function 2018-08-21 08:40:51 -04:00
ospf_ase.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
ospf_ase.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_bfd.c bfdd, lib, bgpd: add bfd cbit usage 2019-05-14 16:49:49 +02:00
ospf_bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
ospf_dump_api.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_dump_api.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_dump.c ospfd: strncpy -> strlcpy 2019-02-26 20:50:17 +00:00
ospf_dump.h ospfd: fix symbol collision 2018-10-01 18:18:42 +02:00
ospf_errors.c ospfd: fix link MTU warning style 2019-02-25 16:59:31 +00:00
ospf_errors.h ospfd: ospfd core if hello packet exceeds link MTU 2019-01-27 20:27:58 -08:00
ospf_ext.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
ospf_ext.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
ospf_flood.c lib, zebra: add AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_* messages 2019-01-14 11:41:33 -02:00
ospf_flood.h ospfd: OSPFv2 VRF Support 2017-10-03 09:15:19 -07:00
ospf_ia.c bgpd isisd ospf6d ospfd: variable shadowing fixes 2018-09-12 16:44:36 +02:00
ospf_ia.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_interface.c Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
ospf_interface.h ospfd: do not remove area structure, while vls are configured 2018-10-25 09:04:15 +02:00
ospf_ism.c *: remove useless return variables 2019-02-25 23:00:16 +00:00
ospf_ism.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_lsa.c ospfd: fix clang-SA warning 2019-04-17 13:28:49 +02:00
ospf_lsa.h ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_lsdb.c ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_lsdb.h ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_main.c yang, lib: add 'frr-interface.yang' and associated stub callbacks 2018-10-27 16:16:12 -02:00
ospf_memory.c OSPF: Add support to multi-area to Router Info. 2018-11-09 10:09:47 +01:00
ospf_memory.h OSPF: Add support to multi-area to Router Info. 2018-11-09 10:09:47 +01:00
ospf_neighbor.c *: style for flog_warn conversions 2018-09-06 20:56:41 +00:00
ospf_neighbor.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_network.c *: setting the socket send/recv buffer sizes doesn't need elevated privs 2019-04-08 13:11:28 -03:00
ospf_network.h ospfd: basic support for VRF NETNS backend 2018-02-27 11:11:24 +01:00
ospf_nsm.c *: spelchek 2018-10-25 20:10:57 +02:00
ospf_nsm.h *: reindent 2017-07-17 14:04:07 +02:00
ospf_opaque.c *: spelchek 2018-10-25 20:10:57 +02:00
ospf_opaque.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_packet.c ospfd: continue statement is redundant 2019-05-03 05:05:19 -04:00
ospf_packet.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_ri.c *: remove trailing newlines from zlog messages 2019-03-14 18:41:15 +00:00
ospf_ri.h OSPF: Add support to multi-area to Router Info. 2018-11-09 10:09:47 +01:00
ospf_route.c Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
ospf_route.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_routemap.c rmap: Add hooks into zebra,ospf,rip for match ip next-hop type blackhole 2019-06-22 00:07:20 +03:00
ospf_snmp.c *: remove trailing newlines from zlog messages 2019-03-14 18:41:15 +00:00
ospf_spf.c *: s/TRUE/true/, s/FALSE/false/ 2019-07-01 17:26:05 +00:00
ospf_spf.h ospfd: replace pqueue_* with DECLARE_SKIPLIST 2019-04-27 19:33:45 +02:00
ospf_sr.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
ospf_sr.h OSPFD: Fix Segment Routing Lan Adjacency TLVs 2018-02-19 10:17:41 +01:00
ospf_te.c Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
ospf_te.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ospf_vty.c ospfd: fix show ip ospf neigh json 2019-07-09 18:13:22 -07:00
ospf_vty.h ospfd: buffer termination (Coverity 23089) 2018-06-14 17:43:19 +02:00
ospf_zebra.c Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
ospf_zebra.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
OSPF-ALIGNMENT.txt *: Remove cvs control points 2017-12-05 17:28:12 -05:00
ospfd.c ospfd: Do not modify list when using _RO loop 2019-07-02 16:03:18 -04:00
ospfd.conf.sample Initial revision 2002-12-13 20:15:29 +00:00
ospfd.h Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
subdir.am build: fix a whole bunch of *FLAGS 2019-01-30 19:13:51 +01:00