mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 11:30:55 +00:00
lib: Format according to our standard
A couple of functions needed to be reformated. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
547b989938
commit
ac2914d326
72
lib/if.c
72
lib/if.c
@ -811,27 +811,25 @@ DEFUN (show_address,
|
|||||||
"address\n"
|
"address\n"
|
||||||
VRF_CMD_HELP_STR)
|
VRF_CMD_HELP_STR)
|
||||||
{
|
{
|
||||||
int idx_vrf = 3;
|
int idx_vrf = 3;
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
struct connected *ifc;
|
struct connected *ifc;
|
||||||
struct prefix *p;
|
struct prefix *p;
|
||||||
vrf_id_t vrf_id = VRF_DEFAULT;
|
vrf_id_t vrf_id = VRF_DEFAULT;
|
||||||
|
|
||||||
if (argc > 2)
|
if (argc > 2)
|
||||||
VRF_GET_ID (vrf_id, argv[idx_vrf]->arg);
|
VRF_GET_ID (vrf_id, argv[idx_vrf]->arg);
|
||||||
|
|
||||||
FOR_ALL_INTERFACES (vrf, ifp)
|
FOR_ALL_INTERFACES (vrf, ifp) {
|
||||||
{
|
for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc)) {
|
||||||
for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc))
|
p = ifc->address;
|
||||||
{
|
|
||||||
p = ifc->address;
|
|
||||||
|
|
||||||
if (p->family == AF_INET)
|
if (p->family == AF_INET)
|
||||||
vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
|
vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return CMD_SUCCESS;
|
||||||
return CMD_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (show_address_vrf_all,
|
DEFUN (show_address_vrf_all,
|
||||||
@ -841,31 +839,29 @@ DEFUN (show_address_vrf_all,
|
|||||||
"address\n"
|
"address\n"
|
||||||
VRF_ALL_CMD_HELP_STR)
|
VRF_ALL_CMD_HELP_STR)
|
||||||
{
|
{
|
||||||
struct vrf *vrf;
|
struct vrf *vrf;
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
struct connected *ifc;
|
struct connected *ifc;
|
||||||
struct prefix *p;
|
struct prefix *p;
|
||||||
|
|
||||||
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
|
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
|
||||||
{
|
{
|
||||||
if (RB_EMPTY (if_name_head, &vrf->ifaces_by_name))
|
if (RB_EMPTY (if_name_head, &vrf->ifaces_by_name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
vty_out (vty, "\nVRF %u\n\n", vrf->vrf_id);
|
vty_out (vty, "\nVRF %u\n\n", vrf->vrf_id);
|
||||||
|
|
||||||
FOR_ALL_INTERFACES (vrf, ifp)
|
FOR_ALL_INTERFACES (vrf, ifp) {
|
||||||
{
|
for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc)) {
|
||||||
for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc))
|
p = ifc->address;
|
||||||
{
|
|
||||||
p = ifc->address;
|
|
||||||
|
|
||||||
if (p->family == AF_INET)
|
if (p->family == AF_INET)
|
||||||
vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
|
vty_out (vty, "%s/%d\n", inet_ntoa (p->u.prefix4), p->prefixlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user