diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-16 12:00:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-16 12:00:38 -0400 |
| commit | 5b8d8894f8ecb401acc9b3986bbb6ce95b3263e9 (patch) | |
| tree | 077628692cdbae750e26d1b8f237c422bae6519d /ospf6d/ospf6_interface.c | |
| parent | 4c6ed05e4e2276c463f16c1dbf8d9f04bc1130fe (diff) | |
| parent | 451fda4f9a2fadc24328e640077780a00ffcdac2 (diff) | |
Merge pull request #1298 from opensourcerouting/iface-rb-tree
Use rb-trees to store interfaces instead of linked-lists
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 7286b3242d..f237e4bef3 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -983,9 +983,9 @@ DEFUN (show_ipv6_ospf6_interface, INTERFACE_STR IFNAME_STR) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); int idx_ifname = 4; struct interface *ifp; - struct listnode *i; if (argc == 5) { ifp = if_lookup_by_name(argv[idx_ifname]->arg, VRF_DEFAULT); @@ -996,7 +996,7 @@ DEFUN (show_ipv6_ospf6_interface, } ospf6_interface_show(vty, ifp); } else { - for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), i, ifp)) + FOR_ALL_INTERFACES (vrf, ifp) ospf6_interface_show(vty, ifp); } @@ -1054,12 +1054,12 @@ DEFUN (show_ipv6_ospf6_interface_prefix, OSPF6_ROUTE_MATCH_STR "Display details of the prefixes\n") { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); int idx_prefix = 5; - struct listnode *i; struct ospf6_interface *oi; struct interface *ifp; - for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), i, ifp)) { + FOR_ALL_INTERFACES (vrf, ifp) { oi = (struct ospf6_interface *)ifp->info; if (oi == NULL) continue; @@ -1755,11 +1755,11 @@ DEFUN (no_ipv6_ospf6_network, static int config_write_ospf6_interface(struct vty *vty) { - struct listnode *i; + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); struct ospf6_interface *oi; struct interface *ifp; - for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), i, ifp)) { + FOR_ALL_INTERFACES (vrf, ifp) { oi = (struct ospf6_interface *)ifp->info; if (oi == NULL) continue; @@ -1905,13 +1905,13 @@ DEFUN (clear_ipv6_ospf6_interface, IFNAME_STR ) { + struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); int idx_ifname = 4; struct interface *ifp; - struct listnode *node; if (argc == 4) /* Clear all the ospfv3 interfaces. */ { - for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) + FOR_ALL_INTERFACES (vrf, ifp) ospf6_interface_clear(vty, ifp); } else /* Interface name is specified. */ { |
