summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_nht.c2
-rw-r--r--bgpd/bgp_routemap.c4
-rw-r--r--bgpd/bgp_updgrp.c12
-rw-r--r--bgpd/bgpd.c30
-rw-r--r--eigrpd/eigrp_const.h2
-rw-r--r--fpm/fpm.h4
-rw-r--r--lib/linklist.h2
-rw-r--r--lib/table.h4
-rw-r--r--ospfd/ospf_spf.c4
-rw-r--r--ospfd/ospf_vty.c48
-rw-r--r--pimd/pim_assert.c4
-rw-r--r--pimd/pim_bsm.c8
-rw-r--r--pimd/pim_cmd.c16
-rw-r--r--pimd/pim_iface.c2
-rw-r--r--pimd/pim_ifchannel.c8
-rw-r--r--pimd/pim_macro.c22
-rw-r--r--pimd/pim_register.c12
-rw-r--r--pimd/pim_rpf.c2
-rw-r--r--pimd/pim_upstream.c14
-rw-r--r--pimd/pim_vxlan.c2
-rw-r--r--zebra/interface.h18
-rw-r--r--zebra/irdp.h3
-rw-r--r--zebra/irdp_interface.c6
-rw-r--r--zebra/rib.h2
-rw-r--r--zebra/zebra_fpm.c10
-rw-r--r--zebra/zebra_fpm_netlink.c4
-rw-r--r--zebra/zebra_rib.c6
27 files changed, 123 insertions, 128 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index fdfa15b44..74c45ed44 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -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;
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index a212523b1..e43f9486f 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2695,11 +2695,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);
}
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index 82df1905b..de7b05bdd 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -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)
{
@@ -979,7 +979,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)
@@ -1012,7 +1012,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,
@@ -1092,7 +1092,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,
@@ -1141,7 +1141,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)
@@ -1788,7 +1788,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.
*
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 3ca209676..6f794928f 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -248,9 +248,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, is_config);
+ vpn_handle_router_id_update(bgp, true, is_config);
IPV4_ADDR_COPY(&bgp->router_id, id);
@@ -267,9 +267,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, is_config);
+ vpn_handle_router_id_update(bgp, false, is_config);
return 0;
}
@@ -303,7 +303,7 @@ void bgp_router_id_zebra_bump(vrf_id_t vrf_id, const struct prefix *router_id)
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("RID change : vrf %u, RTR ID %s",
bgp->vrf_id, inet_ntoa(*addr));
- bgp_router_id_set(bgp, addr, FALSE);
+ bgp_router_id_set(bgp, addr, false);
}
}
}
@@ -323,7 +323,7 @@ void bgp_router_id_zebra_bump(vrf_id_t vrf_id, const struct prefix *router_id)
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("RID change : vrf %u, RTR ID %s",
bgp->vrf_id, inet_ntoa(*addr));
- bgp_router_id_set(bgp, addr, FALSE);
+ bgp_router_id_set(bgp, addr, false);
}
}
@@ -335,7 +335,7 @@ int bgp_router_id_static_set(struct bgp *bgp, struct in_addr id)
{
bgp->router_id_static = id;
bgp_router_id_set(bgp, id.s_addr ? &id : &bgp->router_id_zebra,
- TRUE /* is config */);
+ true /* is config */);
return 0;
}
@@ -3133,7 +3133,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;
}
@@ -3189,7 +3189,7 @@ int bgp_get(struct bgp **bgp_val, as_t *as, const char *name,
bgp = bgp_create(as, name, inst_type);
if (bgp_option_check(BGP_OPT_NO_ZEBRA) && name)
bgp->vrf_id = vrf_generate_id();
- bgp_router_id_set(bgp, &bgp->router_id_zebra, TRUE);
+ bgp_router_id_set(bgp, &bgp->router_id_zebra, true);
bgp_address_init(bgp);
bgp_tip_hash_init(bgp);
bgp_scan_init(bgp);
@@ -6922,8 +6922,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))
@@ -6945,16 +6945,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");
diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h
index 895a141e4..3a103fb9f 100644
--- a/eigrpd/eigrp_const.h
+++ b/eigrpd/eigrp_const.h
@@ -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
diff --git a/fpm/fpm.h b/fpm/fpm.h
index ec1da6657..f73ab7c66 100644
--- a/fpm/fpm.h
+++ b/fpm/fpm.h
@@ -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.
*/
diff --git a/lib/linklist.h b/lib/linklist.h
index d23d425d6..ef914b965 100644
--- a/lib/linklist.h
+++ b/lib/linklist.h
@@ -316,7 +316,7 @@ extern void list_add_list(struct list *list, struct list *add);
* list
* list to operate on
* cond
- * function pointer which takes node data as input and return TRUE or FALSE
+ * function pointer which takes node data as input and return true or false
*/
extern void list_filter_out_nodes(struct list *list, bool (*cond)(void *data));
diff --git a/lib/table.h b/lib/table.h
index 57b65ac4b..7a69c1664 100644
--- a/lib/table.h
+++ b/lib/table.h
@@ -314,7 +314,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)
{
@@ -324,7 +324,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)
{
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index f5fe51d54..620691a98 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -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;
@@ -1207,7 +1207,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;
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 631465fb2..dfa34f15e 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -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);
}
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index 228218e3a..3aa2a9224 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -728,7 +728,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)
@@ -737,7 +737,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)
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 9995b5e31..62f13b5b5 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -865,8 +865,8 @@ static void pim_bsm_fwd_whole_sz(struct pim_instance *pim, uint8_t *buf,
struct pim_interface *pim_ifp;
struct in_addr dst_addr;
uint32_t pim_mtu;
- bool no_fwd = FALSE;
- bool ret = FALSE;
+ bool no_fwd = false;
+ bool ret = false;
/* For now only global scope zone is supported, so send on all
* pim interfaces in the vrf
@@ -891,7 +891,7 @@ static void pim_bsm_fwd_whole_sz(struct pim_instance *pim, uint8_t *buf,
if (!pim_bsm_send_intf(buf, len, ifp, dst_addr)) {
if (PIM_DEBUG_BSM)
zlog_debug(
- "%s: pim_bsm_send_intf returned FALSE",
+ "%s: pim_bsm_send_intf returned false",
__PRETTY_FUNCTION__);
}
}
@@ -1216,7 +1216,7 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf,
struct pim_instance *pim;
char bsr_str[INET_ADDRSTRLEN];
uint16_t frag_tag;
- bool empty_bsm = FALSE;
+ bool empty_bsm = false;
/* BSM Packet acceptance validation */
pim_ifp = ifp->info;
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 72d7916b2..6420574e9 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -9843,7 +9843,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;
@@ -9941,7 +9941,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) {
@@ -9982,7 +9982,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))
@@ -10118,8 +10118,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;
@@ -10169,9 +10169,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;
@@ -10185,7 +10185,7 @@ DEFUN_HIDDEN (ip_pim_mlag,
errno, safe_strerror(errno));
return CMD_WARNING_CONFIG_FAILED;
}
- pim_vxlan_mlag_update(TRUE, peer_state, role, ifp, &reg_addr);
+ pim_vxlan_mlag_update(true, peer_state, role, ifp, &reg_addr);
return CMD_SUCCESS;
}
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 0511a1a15..bdeda2d76 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -134,7 +134,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
pim_ifp->igmp_last_member_query_count =
IGMP_DEFAULT_ROBUSTNESS_VARIABLE;
- /* BSM config on interface: TRUE by default */
+ /* BSM config on interface: true by default */
pim_ifp->bsm_enable = true;
pim_ifp->ucast_bsm_accept = true;
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 96c7e8052..66e64cefa 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -1218,10 +1218,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) {
@@ -1301,10 +1301,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) {
diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c
index 908026ab1..bdef83925 100644
--- a/pimd/pim_macro.c
+++ b/pimd/pim_macro.c
@@ -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.
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 3fe7e8bf6..4b6661649 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -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;
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index b1a2e717d..7d263e99e 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -228,7 +228,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, false, NULL);
if (!pim_ecmp_nexthop_lookup(pim, &rpf->source_nexthop, &src, &grp,
neigh_needed))
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 194fb2cff..50df2fdbf 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -1318,14 +1318,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
* }
* }
*/
@@ -1344,7 +1344,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",
@@ -1352,7 +1352,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)
@@ -1456,7 +1456,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;
@@ -1690,7 +1690,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
diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c
index d2648fad5..33e3b2340 100644
--- a/pimd/pim_vxlan.c
+++ b/pimd/pim_vxlan.c
@@ -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)
diff --git a/zebra/interface.h b/zebra/interface.h
index 6a3914451..e134b9b42 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -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
diff --git a/zebra/irdp.h b/zebra/irdp.h
index 3f4fa9346..ff4ab8dfb 100644
--- a/zebra/irdp.h
+++ b/zebra/irdp.h
@@ -32,9 +32,6 @@
extern "C" {
#endif
-#define TRUE 1
-#define FALSE 0
-
/* ICMP Messages */
#ifndef ICMP_ROUTERADVERT
#define ICMP_ROUTERADVERT 9
diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c
index c0b772cd0..8e1ca122d 100644
--- a/zebra/irdp_interface.c
+++ b/zebra/irdp_interface.c
@@ -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;
}
diff --git a/zebra/rib.h b/zebra/rib.h
index 292f6bc60..9d8cee8bf 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -500,7 +500,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)
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 32b9763c5..eaf43095b 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -829,7 +829,7 @@ static bool zfpm_updates_pending(void)
/*
* 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)
{
@@ -1403,7 +1403,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)
{
@@ -1413,7 +1413,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)
{
@@ -1969,10 +1969,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)
{
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index d5479bc62..822def318 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -195,7 +195,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,
@@ -278,7 +278,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)
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 2df24f75c..bef0c2cf3 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -697,7 +697,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)
{
@@ -815,7 +815,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)
{
@@ -3383,7 +3383,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)
{