diff options
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r-- | pimd/pim_cmd.c | 148 |
1 files changed, 90 insertions, 58 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 1c9fe40c2..07678159d 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -423,8 +423,9 @@ static void pim_show_membership(struct vty *vty, u_char uj) } /* scan interface channels */ if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); } else { vty_out(vty, "Interface Address Source Group Membership\n"); @@ -588,8 +589,9 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -784,8 +786,9 @@ static void igmp_show_interfaces_single(struct vty *vty, const char *ifname, } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1165,9 +1168,8 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, print_header = 1; for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, upnode, up)) { - if (strcmp(ifp->name, - up->rpf.source_nexthop - .interface->name) + if (strcmp(ifp->name, up->rpf.source_nexthop + .interface->name) == 0) { if (up->flags & PIM_UPSTREAM_FLAG_MASK_FHR) { @@ -1254,8 +1256,9 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1314,8 +1317,9 @@ static void pim_show_interfaces(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); } else { vty_out(vty, "Interface State Address PIM Nbrs PIM DR FHR IfChannels\n"); @@ -1432,8 +1436,9 @@ static void pim_show_interface_traffic(struct vty *vty, u_char uj) } } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -1518,8 +1523,9 @@ static void pim_show_interface_traffic_single(struct vty *vty, } } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1622,8 +1628,9 @@ static void pim_show_join(struct vty *vty, u_char uj) } /* scan interface channels */ if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -1826,8 +1833,9 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor, } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { { @@ -2031,8 +2039,9 @@ static void pim_show_state(struct vty *vty, const char *src_or_group, if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { vty_out(vty, "\n"); @@ -2115,8 +2124,9 @@ static void pim_show_neighbors(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2346,8 +2356,9 @@ static void pim_show_upstream(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2431,8 +2442,9 @@ static void pim_show_join_desired(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2469,7 +2481,10 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj) pim_addr_dump("<rpf?>", &rpf->rpf_addr, rpf_addr_str, sizeof(rpf_addr_str)); - rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>"; + rpf_ifname = + rpf->source_nexthop.interface ? rpf->source_nexthop + .interface->name + : "<ifname?>"; if (uj) { json_object_object_get_ex(json, grp_str, &json_group); @@ -2499,8 +2514,9 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2604,7 +2620,10 @@ static void pim_show_rpf(struct vty *vty, u_char uj) &rpf->source_nexthop.mrib_nexthop_addr, rib_nexthop_str, sizeof(rib_nexthop_str)); - rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>"; + rpf_ifname = + rpf->source_nexthop.interface ? rpf->source_nexthop + .interface->name + : "<ifname?>"; if (uj) { json_object_object_get_ex(json, grp_str, &json_group); @@ -2642,8 +2661,9 @@ static void pim_show_rpf(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2802,8 +2822,9 @@ static void igmp_show_groups(struct vty *vty, u_char uj) } /* scan interfaces */ if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -4039,8 +4060,9 @@ static void show_mroute(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -4633,8 +4655,9 @@ static void ip_pim_ssm_show_group_range(struct vty *vty, u_char uj) json_object *json; json = json_object_new_object(); json_object_string_add(json, "ssmGroups", range_str); - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else vty_out(vty, "SSM group range : %s\n", range_str); @@ -4676,8 +4699,9 @@ static void ip_pim_ssm_show_group_type(struct vty *vty, u_char uj, json_object *json; json = json_object_new_object(); json_object_string_add(json, "groupType", type_str); - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else vty_out(vty, "Group type : %s\n", type_str); @@ -6429,7 +6453,8 @@ DEFUN (ip_pim_bfd_param, } ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd, - "no ip pim bfd (2-255) (50-60000) (50-60000)", NO_STR IP_STR PIM_STR + "no ip pim bfd (2-255) (50-60000) (50-60000)", + NO_STR IP_STR PIM_STR "Enables BFD support\n" "Detect Multiplier\n" "Required min receive interval\n" @@ -6790,8 +6815,9 @@ static void ip_msdp_show_mesh_group(struct vty *vty, u_char uj) if (uj) { json_object_object_add(json, mg->mesh_group_name, json_mg_row); - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -6858,8 +6884,9 @@ static void ip_msdp_show_peers(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -6963,8 +6990,9 @@ static void ip_msdp_show_peers_detail(struct vty *vty, const char *peer, } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7061,8 +7089,9 @@ static void ip_msdp_show_sa(struct vty *vty, u_char uj) if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7153,8 +7182,9 @@ static void ip_msdp_show_sa_detail(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7197,8 +7227,9 @@ static void ip_msdp_show_sa_addr(struct vty *vty, const char *addr, u_char uj) } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7226,8 +7257,9 @@ static void ip_msdp_show_sa_sg(struct vty *vty, const char *src, } if (uj) { - vty_out(vty, "%s\n", json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } |