Signed-off-by: Don Slice <dslice@cumulusnetwork.com>
extern void bgp_config_write_damp(struct vty *);
extern void bgp_damp_info_vty(struct vty *, struct bgp_info *,
json_object *json_path);
extern void bgp_config_write_damp(struct vty *);
extern void bgp_damp_info_vty(struct vty *, struct bgp_info *,
json_object *json_path);
-extern const char *bgp_damp_reuse_time_vty(struct vty *, struct bgp_info *,
- char *, size_t, bool, json_object *);
+extern const char *bgp_damp_reuse_time_vty(struct vty *vty,
+ struct bgp_info *binfo,
+ char *timebuf, size_t len,
+ bool use_json, json_object *json);
extern int bgp_show_dampening_parameters(struct vty *vty, afi_t, safi_t);
#endif /* _QUAGGA_BGP_DAMP_H */
extern int bgp_show_dampening_parameters(struct vty *vty, afi_t, safi_t);
#endif /* _QUAGGA_BGP_DAMP_H */
extern int bgp_open_option_parse(struct peer *, uint8_t, int *);
extern void bgp_open_capability(struct stream *, struct peer *);
extern int bgp_open_option_parse(struct peer *, uint8_t, int *);
extern void bgp_open_capability(struct stream *, struct peer *);
-extern void bgp_capability_vty_out(struct vty *, struct peer *, bool,
- json_object *);
+extern void bgp_capability_vty_out(struct vty *vty, struct peer *peer,
+ bool use_json, json_object *json_neigh);
extern as_t peek_for_as4_capability(struct peer *, uint8_t);
#endif /* _QUAGGA_BGP_OPEN_H */
extern as_t peek_for_as4_capability(struct peer *, uint8_t);
#endif /* _QUAGGA_BGP_OPEN_H */
safi_t, json_object *);
extern void route_vty_out_tag(struct vty *, struct prefix *, struct bgp_info *,
int, safi_t, json_object *);
safi_t, json_object *);
extern void route_vty_out_tag(struct vty *, struct prefix *, struct bgp_info *,
int, safi_t, json_object *);
-extern void route_vty_out_tmp(struct vty *, struct prefix *, struct attr *,
- safi_t, bool, json_object *);
+extern void route_vty_out_tmp(struct vty *vty, struct prefix *p,
+ struct attr *attr, safi_t safi, bool use_json,
+ json_object *json_ar);
extern void route_vty_out_overlay(struct vty *vty, struct prefix *p,
struct bgp_info *binfo, int display,
json_object *json);
extern void route_vty_out_overlay(struct vty *vty, struct prefix *p,
struct bgp_info *binfo, int display,
json_object *json);
}
if (type != show_peer && !nbr_output && !use_json)
}
if (type != show_peer && !nbr_output && !use_json)
- vty_out(vty, "%% No BGP neighbors found \n");
+ vty_out(vty, "%% No BGP neighbors found\n");
if (use_json) {
vty_out(vty, "%s\n", json_object_to_json_string_ext(
if (use_json) {
vty_out(vty, "%s\n", json_object_to_json_string_ext(
json_object_free(json);
return CMD_WARNING;
json_object_free(json);
return CMD_WARNING;
- } else {
- /* Provide context for the block */
- json_object_string_add(json, "vrf",
- name ? name : "default");
- json_object_string_add(json, "afiSafi",
- afi_safi_print(afi, safi));
+ /* Provide context for the block */
+ json_object_string_add(json, "vrf", name ? name : "default");
+ json_object_string_add(json, "afiSafi",
+ afi_safi_print(afi, safi));
+
if (!CHECK_FLAG(bgp->af_flags[afi][safi],
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
json_object_string_add(json, "importFromVrfs", "none");
if (!CHECK_FLAG(bgp->af_flags[afi][safi],
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
json_object_string_add(json, "importFromVrfs", "none");
struct peer_group *);
extern struct peer *peer_create_accept(struct bgp *);
extern void peer_xfer_config(struct peer *dst, struct peer *src);
struct peer_group *);
extern struct peer *peer_create_accept(struct bgp *);
extern void peer_xfer_config(struct peer *dst, struct peer *src);
-extern char *peer_uptime(time_t, char *, size_t, bool, json_object *);
+extern char *peer_uptime(time_t uptime2, char *buf, size_t len, bool use_json,
+ json_object *json);
extern int bgp_config_write(struct vty *);
extern int bgp_config_write(struct vty *);
uint8_t, uint8_t);
extern int prefix_bgp_orf_set(char *, afi_t, struct orf_prefix *, int, int);
extern void prefix_bgp_orf_remove_all(afi_t, char *);
uint8_t, uint8_t);
extern int prefix_bgp_orf_set(char *, afi_t, struct orf_prefix *, int, int);
extern void prefix_bgp_orf_remove_all(afi_t, char *);
-extern int prefix_bgp_show_prefix_list(struct vty *, afi_t, char *, bool);
+extern int prefix_bgp_show_prefix_list(struct vty *vty, afi_t afi, char *name,
+ bool use_json);
#endif /* _QUAGGA_PLIST_H */
#endif /* _QUAGGA_PLIST_H */
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else if (!ospf)
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else if (!ospf)
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
}
ret = (show_ip_ospf_database_common(
return CMD_SUCCESS;
}
ret = (show_ip_ospf_database_common(
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
if (ospf == NULL)
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
if (ospf == NULL)
return CMD_NOT_MY_INSTANCE;
if (!ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if ((ospf == NULL) || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
} else {
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
/* Display default ospf (instance 0) info */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (vrf_name) {
bool ospf_output = FALSE;
use_vrf = 1;
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
if (all_vrf) {
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
if (!ospf->oi_running)
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
- vty_out(vty, "%% OSPF instance not found \n");
+ vty_out(vty, "%% OSPF instance not found\n");