mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 15:17:15 +00:00
*: s/TRUE/true/, s/FALSE/false/
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
7d6a7a2888
commit
d2853dfe66
@ -163,7 +163,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
|
||||
afi = BGP_ATTR_NEXTHOP_AFI_IP6(pi->attr) ? AFI_IP6
|
||||
: AFI_IP;
|
||||
|
||||
/* This will return TRUE if the global IPv6 NH is a link local
|
||||
/* This will return true if the global IPv6 NH is a link local
|
||||
* addr */
|
||||
if (make_prefix(afi, pi, &p) < 0)
|
||||
return 1;
|
||||
|
@ -2685,11 +2685,11 @@ route_set_ipv6_nexthop_prefer_global(void *rule, const struct prefix *prefix,
|
||||
&& peer->su_remote
|
||||
&& sockunion_family(peer->su_remote) == AF_INET6) {
|
||||
/* Set next hop preference to global */
|
||||
path->attr->mp_nexthop_prefer_global = TRUE;
|
||||
path->attr->mp_nexthop_prefer_global = true;
|
||||
SET_FLAG(path->attr->rmap_change_flags,
|
||||
BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED);
|
||||
} else {
|
||||
path->attr->mp_nexthop_prefer_global = FALSE;
|
||||
path->attr->mp_nexthop_prefer_global = false;
|
||||
SET_FLAG(path->attr->rmap_change_flags,
|
||||
BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED);
|
||||
}
|
||||
|
@ -829,7 +829,7 @@ void update_subgroup_inherit_info(struct update_subgroup *to,
|
||||
*
|
||||
* Delete a subgroup if it is ready to be deleted.
|
||||
*
|
||||
* Returns TRUE if the subgroup was deleted.
|
||||
* Returns true if the subgroup was deleted.
|
||||
*/
|
||||
static int update_subgroup_check_delete(struct update_subgroup *subgrp)
|
||||
{
|
||||
@ -972,7 +972,7 @@ static struct update_subgroup *update_subgroup_find(struct update_group *updgrp,
|
||||
/*
|
||||
* update_subgroup_ready_for_merge
|
||||
*
|
||||
* Returns TRUE if this subgroup is in a state that allows it to be
|
||||
* Returns true if this subgroup is in a state that allows it to be
|
||||
* merged into another subgroup.
|
||||
*/
|
||||
static int update_subgroup_ready_for_merge(struct update_subgroup *subgrp)
|
||||
@ -1005,7 +1005,7 @@ static int update_subgroup_ready_for_merge(struct update_subgroup *subgrp)
|
||||
/*
|
||||
* update_subgrp_can_merge_into
|
||||
*
|
||||
* Returns TRUE if the first subgroup can merge into the second
|
||||
* Returns true if the first subgroup can merge into the second
|
||||
* subgroup.
|
||||
*/
|
||||
static int update_subgroup_can_merge_into(struct update_subgroup *subgrp,
|
||||
@ -1085,7 +1085,7 @@ static void update_subgroup_merge(struct update_subgroup *subgrp,
|
||||
*
|
||||
* Merge this subgroup into another subgroup if possible.
|
||||
*
|
||||
* Returns TRUE if the subgroup has been merged. The subgroup pointer
|
||||
* Returns true if the subgroup has been merged. The subgroup pointer
|
||||
* should not be accessed in this case.
|
||||
*/
|
||||
int update_subgroup_check_merge(struct update_subgroup *subgrp,
|
||||
@ -1134,7 +1134,7 @@ static int update_subgroup_merge_check_thread_cb(struct thread *thread)
|
||||
* @param force If true, the merge check will be triggered even if the
|
||||
* subgroup doesn't currently look ready for a merge.
|
||||
*
|
||||
* Returns TRUE if a merge check will be performed shortly.
|
||||
* Returns true if a merge check will be performed shortly.
|
||||
*/
|
||||
int update_subgroup_trigger_merge_check(struct update_subgroup *subgrp,
|
||||
int force)
|
||||
@ -1781,7 +1781,7 @@ int update_group_refresh_default_originate_route_map(struct thread *thread)
|
||||
*
|
||||
* Refreshes routes out to a peer_af immediately.
|
||||
*
|
||||
* If the combine parameter is TRUE, then this function will try to
|
||||
* If the combine parameter is true, then this function will try to
|
||||
* gather other peers in the subgroup for which a route announcement
|
||||
* is pending and efficently announce routes to all of them.
|
||||
*
|
||||
|
22
bgpd/bgpd.c
22
bgpd/bgpd.c
@ -251,9 +251,9 @@ static int bgp_router_id_set(struct bgp *bgp, const struct in_addr *id)
|
||||
|
||||
/* EVPN uses router id in RD, withdraw them */
|
||||
if (is_evpn_enabled())
|
||||
bgp_evpn_handle_router_id_update(bgp, TRUE);
|
||||
bgp_evpn_handle_router_id_update(bgp, true);
|
||||
|
||||
vpn_handle_router_id_update(bgp, TRUE);
|
||||
vpn_handle_router_id_update(bgp, true);
|
||||
|
||||
IPV4_ADDR_COPY(&bgp->router_id, id);
|
||||
|
||||
@ -270,9 +270,9 @@ static int bgp_router_id_set(struct bgp *bgp, const struct in_addr *id)
|
||||
|
||||
/* EVPN uses router id in RD, update them */
|
||||
if (is_evpn_enabled())
|
||||
bgp_evpn_handle_router_id_update(bgp, FALSE);
|
||||
bgp_evpn_handle_router_id_update(bgp, false);
|
||||
|
||||
vpn_handle_router_id_update(bgp, FALSE);
|
||||
vpn_handle_router_id_update(bgp, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3136,7 +3136,7 @@ int bgp_handle_socket(struct bgp *bgp, struct vrf *vrf, vrf_id_t old_vrf_id,
|
||||
/*
|
||||
* suppress vrf socket
|
||||
*/
|
||||
if (create == FALSE) {
|
||||
if (create == false) {
|
||||
bgp_close_vrf_socket(bgp);
|
||||
return 0;
|
||||
}
|
||||
@ -6941,8 +6941,8 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
|
||||
struct peer *g_peer = NULL;
|
||||
char buf[SU_ADDRSTRLEN];
|
||||
char *addr;
|
||||
int if_pg_printed = FALSE;
|
||||
int if_ras_printed = FALSE;
|
||||
int if_pg_printed = false;
|
||||
int if_ras_printed = false;
|
||||
|
||||
/* Skip dynamic neighbors. */
|
||||
if (peer_dynamic_neighbor(peer))
|
||||
@ -6964,16 +6964,16 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
|
||||
|
||||
if (peer_group_active(peer)) {
|
||||
vty_out(vty, " peer-group %s", peer->group->name);
|
||||
if_pg_printed = TRUE;
|
||||
if_pg_printed = true;
|
||||
} else if (peer->as_type == AS_SPECIFIED) {
|
||||
vty_out(vty, " remote-as %u", peer->as);
|
||||
if_ras_printed = TRUE;
|
||||
if_ras_printed = true;
|
||||
} else if (peer->as_type == AS_INTERNAL) {
|
||||
vty_out(vty, " remote-as internal");
|
||||
if_ras_printed = TRUE;
|
||||
if_ras_printed = true;
|
||||
} else if (peer->as_type == AS_EXTERNAL) {
|
||||
vty_out(vty, " remote-as external");
|
||||
if_ras_printed = TRUE;
|
||||
if_ras_printed = true;
|
||||
}
|
||||
|
||||
vty_out(vty, "\n");
|
||||
|
@ -32,8 +32,6 @@
|
||||
#ifndef _ZEBRA_EIGRP_CONST_H_
|
||||
#define _ZEBRA_EIGRP_CONST_H_
|
||||
|
||||
#define FALSE 0
|
||||
|
||||
#define EIGRP_NEIGHBOR_DOWN 0
|
||||
#define EIGRP_NEIGHBOR_PENDING 1
|
||||
#define EIGRP_NEIGHBOR_UP 2
|
||||
|
@ -245,7 +245,7 @@ static inline fpm_msg_hdr_t *fpm_msg_next(fpm_msg_hdr_t *hdr, size_t *len)
|
||||
/*
|
||||
* fpm_msg_hdr_ok
|
||||
*
|
||||
* Returns TRUE if a message header looks well-formed.
|
||||
* Returns true if a message header looks well-formed.
|
||||
*/
|
||||
static inline int fpm_msg_hdr_ok(const fpm_msg_hdr_t *hdr)
|
||||
{
|
||||
@ -272,7 +272,7 @@ static inline int fpm_msg_hdr_ok(const fpm_msg_hdr_t *hdr)
|
||||
/*
|
||||
* fpm_msg_ok
|
||||
*
|
||||
* Returns TRUE if a message looks well-formed.
|
||||
* Returns true if a message looks well-formed.
|
||||
*
|
||||
* @param len The length in bytes from 'hdr' to the end of the buffer.
|
||||
*/
|
||||
|
@ -306,7 +306,7 @@ static inline struct route_node *route_table_iter_next(route_table_iter_t *iter)
|
||||
/*
|
||||
* route_table_iter_is_done
|
||||
*
|
||||
* Returns TRUE if the iteration is complete.
|
||||
* Returns true if the iteration is complete.
|
||||
*/
|
||||
static inline int route_table_iter_is_done(route_table_iter_t *iter)
|
||||
{
|
||||
@ -316,7 +316,7 @@ static inline int route_table_iter_is_done(route_table_iter_t *iter)
|
||||
/*
|
||||
* route_table_iter_started
|
||||
*
|
||||
* Returns TRUE if this iterator has started iterating over the tree.
|
||||
* Returns true if this iterator has started iterating over the tree.
|
||||
*/
|
||||
static inline int route_table_iter_started(route_table_iter_t *iter)
|
||||
{
|
||||
|
@ -804,7 +804,7 @@ static void ospf_spf_next(struct vertex *v, struct ospf *ospf,
|
||||
int type = 0, lsa_pos = -1, lsa_pos_next = 0;
|
||||
|
||||
/* If this is a router-LSA, and bit V of the router-LSA (see Section
|
||||
A.4.2:RFC2328) is set, set Area A's TransitCapability to TRUE. */
|
||||
A.4.2:RFC2328) is set, set Area A's TransitCapability to true. */
|
||||
if (v->type == OSPF_VERTEX_ROUTER) {
|
||||
if (IS_ROUTER_LSA_VIRTUAL((struct router_lsa *)v->lsa))
|
||||
area->transit = OSPF_TRANSIT_TRUE;
|
||||
@ -1205,7 +1205,7 @@ static void ospf_spf_calculate(struct ospf *ospf, struct ospf_area *area,
|
||||
* spanning tree. */
|
||||
v->lsa_p->stat = LSA_SPF_IN_SPFTREE;
|
||||
|
||||
/* Set Area A's TransitCapability to FALSE. */
|
||||
/* Set Area A's TransitCapability to false. */
|
||||
area->transit = OSPF_TRANSIT_FALSE;
|
||||
area->shortcut_capability = 1;
|
||||
|
||||
|
@ -3252,7 +3252,7 @@ DEFUN (show_ip_ospf,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -3269,7 +3269,7 @@ DEFUN (show_ip_ospf,
|
||||
|
||||
/* vrf input is provided could be all or specific vrf*/
|
||||
if (vrf_name) {
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
use_vrf = 1;
|
||||
|
||||
@ -3277,7 +3277,7 @@ DEFUN (show_ip_ospf,
|
||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_common(vty, ospf, json,
|
||||
use_vrf);
|
||||
}
|
||||
@ -3942,7 +3942,7 @@ DEFUN (show_ip_ospf_interface,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL, *intf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0, idx_intf = 0;
|
||||
@ -4082,7 +4082,7 @@ DEFUN (show_ip_ospf_interface_traffic,
|
||||
struct ospf *ospf = NULL;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL, *intf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0, idx_intf = 0;
|
||||
bool uj = use_json(argc, argv);
|
||||
@ -4337,7 +4337,7 @@ DEFUN (show_ip_ospf_neighbor,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -4563,7 +4563,7 @@ DEFUN (show_ip_ospf_neighbor_all,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -5257,7 +5257,7 @@ DEFUN (show_ip_ospf_neighbor_detail,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -5446,7 +5446,7 @@ DEFUN (show_ip_ospf_neighbor_detail_all,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -5626,12 +5626,12 @@ DEFUN (show_ip_ospf_neighbor_int_detail,
|
||||
bool uj = use_json(argc, argv);
|
||||
struct listnode *node = NULL;
|
||||
int ret = CMD_SUCCESS;
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_neighbor_int_detail_common(vty, ospf, 0,
|
||||
argv, uj);
|
||||
}
|
||||
@ -6334,7 +6334,7 @@ DEFUN (show_ip_ospf_database_max,
|
||||
struct ospf *ospf = NULL;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -6343,7 +6343,7 @@ DEFUN (show_ip_ospf_database_max,
|
||||
OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
|
||||
|
||||
if (vrf_name) {
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
use_vrf = 1;
|
||||
|
||||
@ -6351,7 +6351,7 @@ DEFUN (show_ip_ospf_database_max,
|
||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_database_common(
|
||||
vty, ospf, idx_vrf ? 2 : 0, argc, argv,
|
||||
use_vrf);
|
||||
@ -6403,7 +6403,7 @@ DEFUN (show_ip_ospf_instance_database,
|
||||
unsigned short instance = 0;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx = 0;
|
||||
@ -6561,7 +6561,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router,
|
||||
unsigned short instance = 0;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx = 0, idx_vrf = 0;
|
||||
@ -6584,7 +6584,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router,
|
||||
OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
|
||||
|
||||
if (vrf_name) {
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
use_vrf = 1;
|
||||
|
||||
@ -6592,7 +6592,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router,
|
||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_database_type_adv_router_common(
|
||||
vty, ospf, idx ? 1 : 0, argc, argv,
|
||||
use_vrf);
|
||||
@ -9372,7 +9372,7 @@ DEFUN (show_ip_ospf_border_routers,
|
||||
struct ospf *ospf = NULL;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -9381,7 +9381,7 @@ DEFUN (show_ip_ospf_border_routers,
|
||||
OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
|
||||
|
||||
if (vrf_name) {
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
use_vrf = 1;
|
||||
|
||||
@ -9390,7 +9390,7 @@ DEFUN (show_ip_ospf_border_routers,
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_border_routers_common(
|
||||
vty, ospf, use_vrf);
|
||||
}
|
||||
@ -9510,7 +9510,7 @@ DEFUN (show_ip_ospf_route,
|
||||
struct ospf *ospf = NULL;
|
||||
struct listnode *node = NULL;
|
||||
char *vrf_name = NULL;
|
||||
bool all_vrf = FALSE;
|
||||
bool all_vrf = false;
|
||||
int ret = CMD_SUCCESS;
|
||||
int inst = 0;
|
||||
int idx_vrf = 0;
|
||||
@ -9525,7 +9525,7 @@ DEFUN (show_ip_ospf_route,
|
||||
|
||||
/* vrf input is provided could be all or specific vrf*/
|
||||
if (vrf_name) {
|
||||
bool ospf_output = FALSE;
|
||||
bool ospf_output = false;
|
||||
|
||||
use_vrf = 1;
|
||||
|
||||
@ -9533,7 +9533,7 @@ DEFUN (show_ip_ospf_route,
|
||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||
if (!ospf->oi_running)
|
||||
continue;
|
||||
ospf_output = TRUE;
|
||||
ospf_output = true;
|
||||
ret = show_ip_ospf_route_common(vty, ospf, json,
|
||||
use_vrf);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ void assert_action_a5(struct pim_ifchannel *ch)
|
||||
winner metric as AssertWinnerMetric(S,G,I).
|
||||
Set Assert Timer to Assert_Time.
|
||||
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true)
|
||||
set SPTbit(S,G) to TRUE.
|
||||
set SPTbit(S,G) to true.
|
||||
*/
|
||||
static void assert_action_a6(struct pim_ifchannel *ch,
|
||||
struct pim_assert_metric winner_metric)
|
||||
@ -743,7 +743,7 @@ static void assert_action_a6(struct pim_ifchannel *ch,
|
||||
|
||||
/*
|
||||
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true) set
|
||||
SPTbit(S,G) to TRUE.
|
||||
SPTbit(S,G) to true.
|
||||
*/
|
||||
if (ch->upstream->rpf.source_nexthop.interface == ch->interface)
|
||||
if (ch->upstream->join_state == PIM_UPSTREAM_JOINED)
|
||||
|
@ -8856,7 +8856,7 @@ static void pim_show_vxlan_sg_entry(struct pim_vxlan_sg *vxlan_sg,
|
||||
char src_str[INET_ADDRSTRLEN];
|
||||
char grp_str[INET_ADDRSTRLEN];
|
||||
json_object *json_row;
|
||||
bool installed = (vxlan_sg->up)?TRUE:FALSE;
|
||||
bool installed = (vxlan_sg->up) ? true : false;
|
||||
const char *iif_name = vxlan_sg->iif?vxlan_sg->iif->name:"-";
|
||||
const char *oif_name;
|
||||
|
||||
@ -8954,7 +8954,7 @@ static void pim_show_vxlan_sg_match_addr(struct pim_instance *pim,
|
||||
|
||||
cwd.vty = vty;
|
||||
cwd.json = json;
|
||||
cwd.addr_match = TRUE;
|
||||
cwd.addr_match = true;
|
||||
hash_iterate(pim->vxlan.sg_hash, pim_show_vxlan_sg_hash_entry, &cwd);
|
||||
|
||||
if (uj) {
|
||||
@ -8995,7 +8995,7 @@ static void pim_show_vxlan_sg_one(struct pim_instance *pim,
|
||||
|
||||
vxlan_sg = pim_vxlan_sg_find(pim, &sg);
|
||||
if (vxlan_sg) {
|
||||
installed = (vxlan_sg->up)?TRUE:FALSE;
|
||||
installed = (vxlan_sg->up) ? true : false;
|
||||
iif_name = vxlan_sg->iif?vxlan_sg->iif->name:"-";
|
||||
|
||||
if (pim_vxlan_is_orig_mroute(vxlan_sg))
|
||||
@ -9131,8 +9131,8 @@ DEFUN_HIDDEN (no_ip_pim_mlag,
|
||||
struct in_addr addr;
|
||||
|
||||
addr.s_addr = 0;
|
||||
pim_vxlan_mlag_update(TRUE /*mlag_enable*/,
|
||||
FALSE /*peer_state*/, PIM_VXLAN_MLAG_ROLE_SECONDARY,
|
||||
pim_vxlan_mlag_update(true/*mlag_enable*/,
|
||||
false/*peer_state*/, PIM_VXLAN_MLAG_ROLE_SECONDARY,
|
||||
NULL/*peerlink*/, &addr);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
@ -9182,9 +9182,9 @@ DEFUN_HIDDEN (ip_pim_mlag,
|
||||
|
||||
idx += 2;
|
||||
if (!strcmp(argv[idx]->arg, "up")) {
|
||||
peer_state = TRUE;
|
||||
peer_state = true;
|
||||
} else if (strcmp(argv[idx]->arg, "down")) {
|
||||
peer_state = FALSE;
|
||||
peer_state = false;
|
||||
} else {
|
||||
vty_out(vty, "unknown MLAG state %s\n", argv[idx]->arg);
|
||||
return CMD_WARNING;
|
||||
@ -9198,7 +9198,7 @@ DEFUN_HIDDEN (ip_pim_mlag,
|
||||
errno, safe_strerror(errno));
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
pim_vxlan_mlag_update(TRUE, peer_state, role, ifp, ®_addr);
|
||||
pim_vxlan_mlag_update(true, peer_state, role, ifp, ®_addr);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -1210,10 +1210,10 @@ void pim_ifchannel_update_could_assert(struct pim_ifchannel *ch)
|
||||
}
|
||||
|
||||
if (new_couldassert) {
|
||||
/* CouldAssert(S,G,I) switched from FALSE to TRUE */
|
||||
/* CouldAssert(S,G,I) switched from false to true */
|
||||
PIM_IF_FLAG_SET_COULD_ASSERT(ch->flags);
|
||||
} else {
|
||||
/* CouldAssert(S,G,I) switched from TRUE to FALSE */
|
||||
/* CouldAssert(S,G,I) switched from true to false */
|
||||
PIM_IF_FLAG_UNSET_COULD_ASSERT(ch->flags);
|
||||
|
||||
if (ch->ifassert_state == PIM_IFASSERT_I_AM_WINNER) {
|
||||
@ -1293,10 +1293,10 @@ void pim_ifchannel_update_assert_tracking_desired(struct pim_ifchannel *ch)
|
||||
}
|
||||
|
||||
if (new_atd) {
|
||||
/* AssertTrackingDesired(S,G,I) switched from FALSE to TRUE */
|
||||
/* AssertTrackingDesired(S,G,I) switched from false to true */
|
||||
PIM_IF_FLAG_SET_ASSERT_TRACKING_DESIRED(ch->flags);
|
||||
} else {
|
||||
/* AssertTrackingDesired(S,G,I) switched from TRUE to FALSE */
|
||||
/* AssertTrackingDesired(S,G,I) switched from true to false */
|
||||
PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(ch->flags);
|
||||
|
||||
if (ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER) {
|
||||
|
@ -91,11 +91,11 @@ int pim_macro_chisin_joins(const struct pim_ifchannel *ch)
|
||||
|
||||
lost_assert(S,G) =
|
||||
{ all interfaces I such that
|
||||
lost_assert(S,G,I) == TRUE }
|
||||
lost_assert(S,G,I) == true }
|
||||
|
||||
bool lost_assert(S,G,I) {
|
||||
if ( RPF_interface(S) == I ) {
|
||||
return FALSE
|
||||
return false
|
||||
} else {
|
||||
return ( AssertWinner(S,G,I) != NULL AND
|
||||
AssertWinner(S,G,I) != me AND
|
||||
@ -150,7 +150,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
|
||||
|
||||
pim_include(S,G) =
|
||||
{ all interfaces I such that:
|
||||
( (I_am_DR( I ) AND lost_assert(S,G,I) == FALSE )
|
||||
( (I_am_DR( I ) AND lost_assert(S,G,I) == false )
|
||||
OR AssertWinner(S,G,I) == me )
|
||||
AND local_receiver_include(S,G,I) }
|
||||
|
||||
@ -178,7 +178,7 @@ int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch)
|
||||
return (
|
||||
/* I_am_DR( I ) ? */
|
||||
PIM_I_am_DR(pim_ifp) &&
|
||||
/* lost_assert(S,G,I) == FALSE ? */
|
||||
/* lost_assert(S,G,I) == false ? */
|
||||
(!pim_macro_ch_lost_assert(ch)));
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch)
|
||||
return 0; /* false */
|
||||
}
|
||||
|
||||
/* SPTbit(S,G) == TRUE */
|
||||
/* SPTbit(S,G) == true */
|
||||
if (ch->upstream->sptbit == PIM_UPSTREAM_SPTBIT_FALSE)
|
||||
return 0; /* false */
|
||||
|
||||
@ -272,9 +272,9 @@ struct pim_assert_metric pim_macro_spt_assert_metric(const struct pim_rpf *rpf,
|
||||
following pseudocode:
|
||||
|
||||
assert_metric my_assert_metric(S,G,I) {
|
||||
if( CouldAssert(S,G,I) == TRUE ) {
|
||||
if( CouldAssert(S,G,I) == true ) {
|
||||
return spt_assert_metric(S,I)
|
||||
} else if( CouldAssert(*,G,I) == TRUE ) {
|
||||
} else if( CouldAssert(*,G,I) == true ) {
|
||||
return rpt_assert_metric(G,I)
|
||||
} else {
|
||||
return infinite_assert_metric()
|
||||
@ -365,11 +365,11 @@ int pim_macro_chisin_oiflist(const struct pim_ifchannel *ch)
|
||||
(+) ( pim_include(*,G) (-) pim_exclude(S,G) )
|
||||
(-) lost_assert(*,G)
|
||||
(+) joins(S,G) ) )
|
||||
OR (local_receiver_include(S,G,I) == TRUE
|
||||
OR (local_receiver_include(S,G,I) == true
|
||||
AND (I_am_DR(I) OR (AssertWinner(S,G,I) == me)))
|
||||
OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == TRUE))
|
||||
OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == TRUE)
|
||||
AND (SPTbit(S,G) == FALSE))
|
||||
OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == true))
|
||||
OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == true)
|
||||
AND (SPTbit(S,G) == false))
|
||||
|
||||
AssertTrackingDesired(S,G,I) is true on any interface in which an
|
||||
(S,G) assert might affect our behavior.
|
||||
|
@ -61,7 +61,7 @@ void pim_register_join(struct pim_upstream *up)
|
||||
pim_channel_add_oif(up->channel_oil, pim->regiface,
|
||||
PIM_OIF_FLAG_PROTO_PIM);
|
||||
up->reg_state = PIM_REG_JOIN;
|
||||
pim_vxlan_update_sg_reg_state(pim, up, TRUE /*reg_join*/);
|
||||
pim_vxlan_update_sg_reg_state(pim, up, true /*reg_join*/);
|
||||
}
|
||||
|
||||
void pim_register_stop_send(struct interface *ifp, struct prefix_sg *sg,
|
||||
@ -148,7 +148,7 @@ int pim_register_stop_recv(struct interface *ifp, uint8_t *buf, int buf_size)
|
||||
PIM_OIF_FLAG_PROTO_PIM);
|
||||
pim_upstream_start_register_stop_timer(upstream, 0);
|
||||
pim_vxlan_update_sg_reg_state(pim, upstream,
|
||||
FALSE /*reg_join*/);
|
||||
false/*reg_join*/);
|
||||
break;
|
||||
case PIM_REG_JOIN_PENDING:
|
||||
upstream->reg_state = PIM_REG_PRUNE;
|
||||
@ -283,8 +283,8 @@ void pim_null_register_send(struct pim_upstream *up)
|
||||
* # Note: this may be a spoofing attempt
|
||||
* }
|
||||
* if( I_am_RP(G) AND outer.dst == RP(G) ) {
|
||||
* sentRegisterStop = FALSE;
|
||||
* if ( register.borderbit == TRUE ) {
|
||||
* sentRegisterStop = false;
|
||||
* if ( register.borderbit == true ) {
|
||||
* if ( PMBR(S,G) == unknown ) {
|
||||
* PMBR(S,G) = outer.src
|
||||
* } else if ( outer.src != PMBR(S,G) ) {
|
||||
@ -296,10 +296,10 @@ void pim_null_register_send(struct pim_upstream *up)
|
||||
* ( SwitchToSptDesired(S,G) AND
|
||||
* ( inherited_olist(S,G) == NULL ))) {
|
||||
* send Register-Stop(S,G) to outer.src
|
||||
* sentRegisterStop = TRUE;
|
||||
* sentRegisterStop = true;
|
||||
* }
|
||||
* if ( SPTbit(S,G) OR SwitchToSptDesired(S,G) ) {
|
||||
* if ( sentRegisterStop == TRUE ) {
|
||||
* if ( sentRegisterStop == true ) {
|
||||
* set KeepaliveTimer(S,G) to RP_Keepalive_Period;
|
||||
* } else {
|
||||
* set KeepaliveTimer(S,G) to Keepalive_Period;
|
||||
|
@ -237,7 +237,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
|
||||
|
||||
if ((up->sg.src.s_addr == INADDR_ANY && I_am_RP(pim, up->sg.grp)) ||
|
||||
PIM_UPSTREAM_FLAG_TEST_FHR(up->flags))
|
||||
neigh_needed = FALSE;
|
||||
neigh_needed = false;
|
||||
pim_find_or_track_nexthop(pim, &nht_p, up, NULL, NULL);
|
||||
if (!pim_ecmp_nexthop_lookup(pim, &rpf->source_nexthop, &src, &grp,
|
||||
neigh_needed))
|
||||
|
@ -1303,14 +1303,14 @@ int pim_upstream_is_sg_rpt(struct pim_upstream *up)
|
||||
* void
|
||||
* Update_SPTbit(S,G,iif) {
|
||||
* if ( iif == RPF_interface(S)
|
||||
* AND JoinDesired(S,G) == TRUE
|
||||
* AND ( DirectlyConnected(S) == TRUE
|
||||
* AND JoinDesired(S,G) == true
|
||||
* AND ( DirectlyConnected(S) == true
|
||||
* OR RPF_interface(S) != RPF_interface(RP(G))
|
||||
* OR inherited_olist(S,G,rpt) == NULL
|
||||
* OR ( ( RPF'(S,G) == RPF'(*,G) ) AND
|
||||
* ( RPF'(S,G) != NULL ) )
|
||||
* OR ( I_Am_Assert_Loser(S,G,iif) ) {
|
||||
* Set SPTbit(S,G) to TRUE
|
||||
* Set SPTbit(S,G) to true
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@ -1329,7 +1329,7 @@ void pim_upstream_set_sptbit(struct pim_upstream *up,
|
||||
return;
|
||||
}
|
||||
|
||||
// AND JoinDesired(S,G) == TRUE
|
||||
// AND JoinDesired(S,G) == true
|
||||
if (!pim_upstream_evaluate_join_desired(up->channel_oil->pim, up)) {
|
||||
if (PIM_DEBUG_TRACE)
|
||||
zlog_debug("%s: %s Join is not Desired",
|
||||
@ -1337,7 +1337,7 @@ void pim_upstream_set_sptbit(struct pim_upstream *up,
|
||||
return;
|
||||
}
|
||||
|
||||
// DirectlyConnected(S) == TRUE
|
||||
// DirectlyConnected(S) == true
|
||||
if (pim_if_connected_to_source(up->rpf.source_nexthop.interface,
|
||||
up->sg.src)) {
|
||||
if (PIM_DEBUG_TRACE)
|
||||
@ -1440,7 +1440,7 @@ static int pim_upstream_register_stop_timer(struct thread *t)
|
||||
up->reg_state = PIM_REG_JOIN;
|
||||
pim_channel_add_oif(up->channel_oil, pim->regiface,
|
||||
PIM_OIF_FLAG_PROTO_PIM);
|
||||
pim_vxlan_update_sg_reg_state(pim, up, TRUE /*reg_join*/);
|
||||
pim_vxlan_update_sg_reg_state(pim, up, true /*reg_join*/);
|
||||
break;
|
||||
case PIM_REG_JOIN:
|
||||
break;
|
||||
@ -1673,7 +1673,7 @@ bool pim_upstream_equal(const void *arg1, const void *arg2)
|
||||
/* rfc4601:section-4.2:"Data Packet Forwarding Rules" defines
|
||||
* the cases where kat has to be restarted on rxing traffic -
|
||||
*
|
||||
* if( DirectlyConnected(S) == TRUE AND iif == RPF_interface(S) ) {
|
||||
* if( DirectlyConnected(S) == true AND iif == RPF_interface(S) ) {
|
||||
* set KeepaliveTimer(S,G) to Keepalive_Period
|
||||
* # Note: a register state transition or UpstreamJPState(S,G)
|
||||
* # transition may happen as a result of restarting
|
||||
|
@ -115,7 +115,7 @@ static void pim_vxlan_init_work(void)
|
||||
vxlan_info.max_work_cnt = PIM_VXLAN_WORK_MAX;
|
||||
vxlan_info.flags |= PIM_VXLANF_WORK_INITED;
|
||||
vxlan_info.work_list = list_new();
|
||||
pim_vxlan_work_timer_setup(TRUE /* start */);
|
||||
pim_vxlan_work_timer_setup(true/* start */);
|
||||
}
|
||||
|
||||
static void pim_vxlan_add_work(struct pim_vxlan_sg *vxlan_sg)
|
||||
|
@ -46,7 +46,7 @@ extern "C" {
|
||||
struct rtadvconf {
|
||||
/* A flag indicating whether or not the router sends periodic Router
|
||||
Advertisements and responds to Router Solicitations.
|
||||
Default: FALSE */
|
||||
Default: false */
|
||||
int AdvSendAdvertisements;
|
||||
|
||||
/* The maximum time allowed between sending unsolicited multicast
|
||||
@ -70,19 +70,19 @@ struct rtadvconf {
|
||||
/* Unsolicited Router Advertisements' interval timer. */
|
||||
int AdvIntervalTimer;
|
||||
|
||||
/* The TRUE/FALSE value to be placed in the "Managed address
|
||||
/* The true/false value to be placed in the "Managed address
|
||||
configuration" flag field in the Router Advertisement. See
|
||||
[ADDRCONF].
|
||||
|
||||
Default: FALSE */
|
||||
Default: false */
|
||||
int AdvManagedFlag;
|
||||
|
||||
|
||||
/* The TRUE/FALSE value to be placed in the "Other stateful
|
||||
/* The true/false value to be placed in the "Other stateful
|
||||
configuration" flag field in the Router Advertisement. See
|
||||
[ADDRCONF].
|
||||
|
||||
Default: FALSE */
|
||||
Default: false */
|
||||
int AdvOtherConfigFlag;
|
||||
|
||||
/* The value to be placed in MTU options sent by the router. A
|
||||
@ -136,10 +136,10 @@ struct rtadvconf {
|
||||
included in the list of advertised prefixes. */
|
||||
struct list *AdvPrefixList;
|
||||
|
||||
/* The TRUE/FALSE value to be placed in the "Home agent"
|
||||
/* The true/false value to be placed in the "Home agent"
|
||||
flag field in the Router Advertisement. See [RFC6275 7.1].
|
||||
|
||||
Default: FALSE */
|
||||
Default: false */
|
||||
int AdvHomeAgentFlag;
|
||||
#ifndef ND_RA_FLAG_HOME_AGENT
|
||||
#define ND_RA_FLAG_HOME_AGENT 0x20
|
||||
@ -159,10 +159,10 @@ struct rtadvconf {
|
||||
int HomeAgentLifetime;
|
||||
#define RTADV_MAX_HALIFETIME 65520 /* 18.2 hours */
|
||||
|
||||
/* The TRUE/FALSE value to insert or not an Advertisement Interval
|
||||
/* The true/false value to insert or not an Advertisement Interval
|
||||
option. See [RFC 6275 7.3]
|
||||
|
||||
Default: FALSE */
|
||||
Default: false */
|
||||
int AdvIntervalOption;
|
||||
|
||||
/* The value to be placed in the Default Router Preference field of
|
||||
|
@ -32,9 +32,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* ICMP Messages */
|
||||
#ifndef ICMP_ROUTERADVERT
|
||||
#define ICMP_ROUTERADVERT 9
|
||||
|
@ -352,7 +352,7 @@ static void irdp_if_no_shutdown(struct interface *ifp)
|
||||
|
||||
irdp->flags &= ~IF_SHUTDOWN;
|
||||
|
||||
irdp_if_start(ifp, irdp->flags & IF_BROADCAST ? FALSE : TRUE, FALSE);
|
||||
irdp_if_start(ifp, irdp->flags & IF_BROADCAST ? false : true, false);
|
||||
}
|
||||
|
||||
|
||||
@ -407,7 +407,7 @@ DEFUN (ip_irdp_multicast,
|
||||
VTY_DECLVAR_CONTEXT(interface, ifp);
|
||||
irdp_if_get(ifp);
|
||||
|
||||
irdp_if_start(ifp, TRUE, TRUE);
|
||||
irdp_if_start(ifp, true, true);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ DEFUN (ip_irdp_broadcast,
|
||||
VTY_DECLVAR_CONTEXT(interface, ifp);
|
||||
irdp_if_get(ifp);
|
||||
|
||||
irdp_if_start(ifp, FALSE, TRUE);
|
||||
irdp_if_start(ifp, false, true);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ static inline void rib_tables_iter_init(rib_tables_iter_t *iter)
|
||||
/*
|
||||
* rib_tables_iter_started
|
||||
*
|
||||
* Returns TRUE if this iterator has started iterating over the set of
|
||||
* Returns true if this iterator has started iterating over the set of
|
||||
* tables.
|
||||
*/
|
||||
static inline int rib_tables_iter_started(rib_tables_iter_t *iter)
|
||||
|
@ -781,7 +781,7 @@ done:
|
||||
/*
|
||||
* zfpm_writes_pending
|
||||
*
|
||||
* Returns TRUE if we may have something to write to the FPM.
|
||||
* Returns true if we may have something to write to the FPM.
|
||||
*/
|
||||
static int zfpm_writes_pending(void)
|
||||
{
|
||||
@ -1210,7 +1210,7 @@ static void zfpm_start_connect_timer(const char *reason)
|
||||
/*
|
||||
* zfpm_is_enabled
|
||||
*
|
||||
* Returns TRUE if the zebra FPM module has been enabled.
|
||||
* Returns true if the zebra FPM module has been enabled.
|
||||
*/
|
||||
static inline int zfpm_is_enabled(void)
|
||||
{
|
||||
@ -1220,7 +1220,7 @@ static inline int zfpm_is_enabled(void)
|
||||
/*
|
||||
* zfpm_conn_is_up
|
||||
*
|
||||
* Returns TRUE if the connection to the FPM is up.
|
||||
* Returns true if the connection to the FPM is up.
|
||||
*/
|
||||
static inline int zfpm_conn_is_up(void)
|
||||
{
|
||||
@ -1575,10 +1575,10 @@ static struct cmd_node zebra_node = {ZEBRA_NODE, "", 1};
|
||||
* One-time initialization of the Zebra FPM module.
|
||||
*
|
||||
* @param[in] port port at which FPM is running.
|
||||
* @param[in] enable TRUE if the zebra FPM module should be enabled
|
||||
* @param[in] enable true if the zebra FPM module should be enabled
|
||||
* @param[in] format to use to talk to the FPM. Can be 'netink' or 'protobuf'.
|
||||
*
|
||||
* Returns TRUE on success.
|
||||
* Returns true on success.
|
||||
*/
|
||||
static int zfpm_init(struct thread_master *master)
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ typedef struct netlink_route_info_t_ {
|
||||
* Add information about the given nexthop to the given route info
|
||||
* structure.
|
||||
*
|
||||
* Returns TRUE if a nexthop was added, FALSE otherwise.
|
||||
* Returns true if a nexthop was added, false otherwise.
|
||||
*/
|
||||
static int netlink_route_info_add_nh(netlink_route_info_t *ri,
|
||||
struct nexthop *nexthop)
|
||||
@ -217,7 +217,7 @@ static uint8_t netlink_proto_from_route_type(int type)
|
||||
*
|
||||
* Fill out the route information object from the given route.
|
||||
*
|
||||
* Returns TRUE on success and FALSE on failure.
|
||||
* Returns true on success and false on failure.
|
||||
*/
|
||||
static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
|
||||
rib_dest_t *dest, struct route_entry *re)
|
||||
|
@ -1170,7 +1170,7 @@ static void rib_uninstall(struct route_node *rn, struct route_entry *re)
|
||||
/*
|
||||
* rib_can_delete_dest
|
||||
*
|
||||
* Returns TRUE if the given dest can be deleted from the table.
|
||||
* Returns true if the given dest can be deleted from the table.
|
||||
*/
|
||||
static int rib_can_delete_dest(rib_dest_t *dest)
|
||||
{
|
||||
@ -1287,7 +1287,7 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq)
|
||||
* Garbage collect the rib dest corresponding to the given route node
|
||||
* if appropriate.
|
||||
*
|
||||
* Returns TRUE if the dest was deleted, FALSE otherwise.
|
||||
* Returns true if the dest was deleted, false otherwise.
|
||||
*/
|
||||
int rib_gc_dest(struct route_node *rn)
|
||||
{
|
||||
@ -3428,7 +3428,7 @@ void rib_init(void)
|
||||
*
|
||||
* Get the first vrf id that is greater than the given vrf id if any.
|
||||
*
|
||||
* Returns TRUE if a vrf id was found, FALSE otherwise.
|
||||
* Returns true if a vrf id was found, false otherwise.
|
||||
*/
|
||||
static inline int vrf_id_get_next(vrf_id_t vrf_id, vrf_id_t *next_id_p)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user