summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 21:26:02 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-07-17 21:26:02 +0200
commitc14777c6bfd0a446c85243d3a9835054a259c276 (patch)
tree2021f7d89a6046f81ff1f44d256ecff28282568f /pimd
parentMerge pull request #826 from qlyoung/rm-vtyoutln (diff)
downloadfrr-c14777c6bfd0a446c85243d3a9835054a259c276.tar.xz
frr-c14777c6bfd0a446c85243d3a9835054a259c276.zip
*: reindent pt. 2
w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_assert.c6
-rw-r--r--pimd/pim_cmd.c148
-rw-r--r--pimd/pim_iface.h7
-rw-r--r--pimd/pim_ifchannel.c5
-rw-r--r--pimd/pim_main.c5
-rw-r--r--pimd/pim_msdp.c8
-rw-r--r--pimd/pim_msdp.h12
-rw-r--r--pimd/pim_register.c5
-rw-r--r--pimd/pim_rp.c5
-rw-r--r--pimd/pim_zlookup.c5
10 files changed, 121 insertions, 85 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index f68c252a3..e1c961491 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -404,9 +404,9 @@ int pim_assert_build_msg(uint8_t *pim_msg, int buf_size, struct interface *ifp,
}
/* Metric preference */
- pim_write_uint32(pim_msg_curr,
- rpt_bit_flag ? metric_preference | 0x80000000
- : metric_preference);
+ pim_write_uint32(pim_msg_curr, rpt_bit_flag
+ ? metric_preference | 0x80000000
+ : metric_preference);
pim_msg_curr += 4;
/* Route metric */
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);
}
}
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index e742e68f6..5165f7890 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -78,10 +78,9 @@ struct pim_interface {
struct in_addr update_source; /* user can statically set the primary
* address of the interface */
- int igmp_version; /* IGMP version */
- int igmp_default_robustness_variable; /* IGMPv3 QRV */
- int
- igmp_default_query_interval; /* IGMPv3 secs between general
+ int igmp_version; /* IGMP version */
+ int igmp_default_robustness_variable; /* IGMPv3 QRV */
+ int igmp_default_query_interval; /* IGMPv3 secs between general
queries */
int igmp_query_max_response_time_dsec; /* IGMPv3 Max Response Time in
dsecs for general queries */
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index d4916518e..cd9da1f53 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -814,8 +814,9 @@ void pim_ifchannel_join_add(struct interface *ifp, struct in_addr neigh_addr,
/*
* If we are going to be a LHR, we need to note it
*/
- if (ch->upstream->parent && (ch->upstream->parent->flags
- & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
+ if (ch->upstream->parent
+ && (ch->upstream->parent->flags
+ & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
&& !(ch->upstream->flags
& PIM_UPSTREAM_FLAG_MASK_SRC_LHR)) {
pim_upstream_ref(ch->upstream,
diff --git a/pimd/pim_main.c b/pimd/pim_main.c
index b8e6d8ad3..ecaafaa58 100644
--- a/pimd/pim_main.c
+++ b/pimd/pim_main.c
@@ -53,7 +53,10 @@ struct option longopts[] = {{0}};
/* pimd privileges */
zebra_capabilities_t _caps_p[] = {
- ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN, ZCAP_NET_RAW, ZCAP_BIND,
+ ZCAP_NET_ADMIN,
+ ZCAP_SYS_ADMIN,
+ ZCAP_NET_RAW,
+ ZCAP_BIND,
};
/* pimd privileges to run with */
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index 0f653e70a..648bc1d5b 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -793,10 +793,10 @@ static void pim_msdp_peer_listen(struct pim_msdp_peer *mp)
}
/* this is interntionally asymmetric i.e. we set up listen-socket when
- * the
- * first listening peer is configured; but don't bother tearing it down
- * when
- * all the peers go down */
+ * the
+ * first listening peer is configured; but don't bother tearing it down
+ * when
+ * all the peers go down */
pim_msdp_sock_listen();
}
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
index 66e5457df..971994136 100644
--- a/pimd/pim_msdp.h
+++ b/pimd/pim_msdp.h
@@ -69,7 +69,7 @@ enum pim_msdp_sa_flags {
PIM_MSDP_SAF_PEER = (1 << 1),
PIM_MSDP_SAF_REF = (PIM_MSDP_SAF_LOCAL | PIM_MSDP_SAF_PEER),
PIM_MSDP_SAF_STALE = (1 << 2), /* local entries can get kicked out on
- * misc pim events such as RP change */
+ * misc pim events such as RP change */
PIM_MSDP_SAF_UP_DEL_IN_PROG = (1 << 3)
};
@@ -116,13 +116,13 @@ struct pim_msdp_peer {
#define PIM_MSDP_PEER_HOLD_TIME 75
struct thread *hold_timer; // 5.4
/* $FRR indent$ */
-/* clang-format off */
+ /* clang-format off */
#define PIM_MSDP_PEER_KA_TIME 60
- struct thread *ka_timer; // 5.5
- /* $FRR indent$ */
- /* clang-format off */
+ struct thread *ka_timer; // 5.5
+ /* $FRR indent$ */
+ /* clang-format off */
#define PIM_MSDP_PEER_CONNECT_RETRY_TIME 30
- struct thread *cr_timer; // 5.6
+ struct thread *cr_timer; // 5.6
/* packet thread and buffers */
uint32_t packet_size;
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 1cbe1dcf7..2210a91f9 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -330,8 +330,9 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
pim_str_sg_dump(&sg), src_str, ifp->name, i_am_rp);
}
- if (i_am_rp && (dest_addr.s_addr
- == ((RP(sg.grp))->rpf_addr.u.prefix4.s_addr))) {
+ if (i_am_rp
+ && (dest_addr.s_addr
+ == ((RP(sg.grp))->rpf_addr.u.prefix4.s_addr))) {
sentRegisterStop = 0;
if (*bits & PIM_REGISTER_BORDER_BIT) {
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c
index 2fe0143a8..4c5722e35 100644
--- a/pimd/pim_rp.c
+++ b/pimd/pim_rp.c
@@ -948,8 +948,9 @@ void pim_rp_show_information(struct vty *vty, u_char uj)
inet_ntoa(prev_rp_info->rp.rpf_addr.u.prefix4),
json_rp_rows);
- 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);
}
}
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 027b18e12..5258377cc 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -435,9 +435,8 @@ int zclient_lookup_nexthop(struct pim_zlookup_nexthop nexthop_tab[],
nexthop_tab[0].route_metric);
}
- addr =
- nexthop_addr.u.prefix4; /* use nexthop addr for
- recursive lookup */
+ addr = nexthop_addr.u.prefix4; /* use nexthop addr for
+ recursive lookup */
} /* for (max_lookup) */