summaryrefslogtreecommitdiffstats
path: root/pimd/pim_upstream.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /pimd/pim_upstream.h
parent*: add indent control files (diff)
downloadfrr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.tar.xz
frr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.zip
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_upstream.h')
-rw-r--r--pimd/pim_upstream.h162
1 files changed, 84 insertions, 78 deletions
diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h
index acb4b17c7..b6a9729f0 100644
--- a/pimd/pim_upstream.h
+++ b/pimd/pim_upstream.h
@@ -70,100 +70,102 @@
#define PIM_UPSTREAM_FLAG_UNSET_SRC_LHR(flags) ((flags) &= ~PIM_UPSTREAM_FLAG_MASK_SRC_LHR)
enum pim_upstream_state {
- PIM_UPSTREAM_NOTJOINED,
- PIM_UPSTREAM_JOINED,
+ PIM_UPSTREAM_NOTJOINED,
+ PIM_UPSTREAM_JOINED,
};
enum pim_reg_state {
- PIM_REG_NOINFO,
- PIM_REG_JOIN,
- PIM_REG_JOIN_PENDING,
- PIM_REG_PRUNE,
+ PIM_REG_NOINFO,
+ PIM_REG_JOIN,
+ PIM_REG_JOIN_PENDING,
+ PIM_REG_PRUNE,
};
enum pim_upstream_sptbit {
- PIM_UPSTREAM_SPTBIT_FALSE,
- PIM_UPSTREAM_SPTBIT_TRUE
+ PIM_UPSTREAM_SPTBIT_FALSE,
+ PIM_UPSTREAM_SPTBIT_TRUE
};
/*
Upstream (S,G) channel in Joined state
-
+
(S,G) in the "Not Joined" state is not represented
-
+
See RFC 4601: 4.5.7. Sending (S,G) Join/Prune Message
*/
struct pim_upstream {
- struct pim_upstream *parent;
- struct in_addr upstream_addr;/* Who we are talking to */
- struct in_addr upstream_register; /*Who we received a register from*/
- struct prefix_sg sg; /* (S,G) group key */
- char sg_str[PIM_SG_LEN];
- uint32_t flags;
- struct channel_oil *channel_oil;
- struct list *sources;
- struct list *ifchannels;
-
- enum pim_upstream_state join_state;
- enum pim_reg_state reg_state;
- enum pim_upstream_sptbit sptbit;
-
- int ref_count;
-
- struct pim_rpf rpf;
-
- struct thread *t_join_timer;
-
- /*
- * RST(S,G)
- */
- struct thread *t_rs_timer;
+ struct pim_upstream *parent;
+ struct in_addr upstream_addr; /* Who we are talking to */
+ struct in_addr upstream_register; /*Who we received a register from*/
+ struct prefix_sg sg; /* (S,G) group key */
+ char sg_str[PIM_SG_LEN];
+ uint32_t flags;
+ struct channel_oil *channel_oil;
+ struct list *sources;
+ struct list *ifchannels;
+
+ enum pim_upstream_state join_state;
+ enum pim_reg_state reg_state;
+ enum pim_upstream_sptbit sptbit;
+
+ int ref_count;
+
+ struct pim_rpf rpf;
+
+ struct thread *t_join_timer;
+
+ /*
+ * RST(S,G)
+ */
+ struct thread *t_rs_timer;
#define PIM_REGISTER_SUPPRESSION_PERIOD (60)
#define PIM_REGISTER_PROBE_PERIOD (15)
- /*
- * KAT(S,G)
- */
- struct thread *t_ka_timer;
+ /*
+ * KAT(S,G)
+ */
+ struct thread *t_ka_timer;
#define PIM_KEEPALIVE_PERIOD (210)
#define PIM_RP_KEEPALIVE_PERIOD ( 3 * qpim_register_suppress_time + qpim_register_probe_time )
- /* on the RP we restart a timer to indicate if registers are being rxed for
- * SG. This is needed by MSDP to determine its local SA cache */
- struct thread *t_msdp_reg_timer;
+ /* on the RP we restart a timer to indicate if registers are being rxed
+ * for
+ * SG. This is needed by MSDP to determine its local SA cache */
+ struct thread *t_msdp_reg_timer;
#define PIM_MSDP_REG_RXED_PERIOD (3 * (1.5 * qpim_register_suppress_time))
- int64_t state_transition; /* Record current state uptime */
+ int64_t state_transition; /* Record current state uptime */
};
struct list *pim_upstream_list;
struct hash *pim_upstream_hash;
void pim_upstream_free(struct pim_upstream *up);
-struct pim_upstream *pim_upstream_find (struct prefix_sg *sg);
-struct pim_upstream *pim_upstream_find_or_add (struct prefix_sg *sg,
- struct interface *ifp, int flags,
- const char *name);
-struct pim_upstream *pim_upstream_add (struct prefix_sg *sg,
- struct interface *ifp, int flags,
- const char *name);
-void pim_upstream_ref (struct pim_upstream *up, int flags, const char *name);
-struct pim_upstream *pim_upstream_del(struct pim_upstream *up, const char *name);
+struct pim_upstream *pim_upstream_find(struct prefix_sg *sg);
+struct pim_upstream *pim_upstream_find_or_add(struct prefix_sg *sg,
+ struct interface *ifp, int flags,
+ const char *name);
+struct pim_upstream *pim_upstream_add(struct prefix_sg *sg,
+ struct interface *ifp, int flags,
+ const char *name);
+void pim_upstream_ref(struct pim_upstream *up, int flags, const char *name);
+struct pim_upstream *pim_upstream_del(struct pim_upstream *up,
+ const char *name);
int pim_upstream_evaluate_join_desired(struct pim_upstream *up);
int pim_upstream_evaluate_join_desired_interface(struct pim_upstream *up,
- struct pim_ifchannel *ch,
- struct pim_ifchannel *starch);
+ struct pim_ifchannel *ch,
+ struct pim_ifchannel *starch);
void pim_upstream_update_join_desired(struct pim_upstream *up);
void pim_upstream_join_suppress(struct pim_upstream *up,
- struct in_addr rpf_addr,
- int holdtime);
+ struct in_addr rpf_addr, int holdtime);
void pim_upstream_join_timer_decrease_to_t_override(const char *debug_label,
- struct pim_upstream *up);
+ struct pim_upstream *up);
-void pim_upstream_join_timer_restart(struct pim_upstream *up, struct pim_rpf *old);
+void pim_upstream_join_timer_restart(struct pim_upstream *up,
+ struct pim_rpf *old);
void pim_upstream_rpf_genid_changed(struct in_addr neigh_addr);
void pim_upstream_rpf_interface_changed(struct pim_upstream *up,
struct interface *old_rpf_ifp);
@@ -171,40 +173,44 @@ void pim_upstream_rpf_interface_changed(struct pim_upstream *up,
void pim_upstream_update_could_assert(struct pim_upstream *up);
void pim_upstream_update_my_assert_metric(struct pim_upstream *up);
-void pim_upstream_keep_alive_timer_start (struct pim_upstream *up, uint32_t time);
+void pim_upstream_keep_alive_timer_start(struct pim_upstream *up,
+ uint32_t time);
-int pim_upstream_switch_to_spt_desired (struct prefix_sg *sg);
+int pim_upstream_switch_to_spt_desired(struct prefix_sg *sg);
#define SwitchToSptDesired(sg) pim_upstream_switch_to_spt_desired (sg)
-int pim_upstream_is_sg_rpt (struct pim_upstream *up);
+int pim_upstream_is_sg_rpt(struct pim_upstream *up);
-void pim_upstream_set_sptbit (struct pim_upstream *up, struct interface *incoming);
+void pim_upstream_set_sptbit(struct pim_upstream *up,
+ struct interface *incoming);
-void pim_upstream_start_register_stop_timer (struct pim_upstream *up, int null_register);
+void pim_upstream_start_register_stop_timer(struct pim_upstream *up,
+ int null_register);
-void pim_upstream_send_join (struct pim_upstream *up);
+void pim_upstream_send_join(struct pim_upstream *up);
-void pim_upstream_switch (struct pim_upstream *up, enum pim_upstream_state new_state);
+void pim_upstream_switch(struct pim_upstream *up,
+ enum pim_upstream_state new_state);
-const char *pim_upstream_state2str (enum pim_upstream_state join_state);
+const char *pim_upstream_state2str(enum pim_upstream_state join_state);
#define PIM_REG_STATE_STR_LEN 12
-const char *pim_reg_state2str (enum pim_reg_state state, char *state_str);
+const char *pim_reg_state2str(enum pim_reg_state state, char *state_str);
-int pim_upstream_inherited_olist_decide (struct pim_upstream *up);
-int pim_upstream_inherited_olist (struct pim_upstream *up);
-int pim_upstream_empty_inherited_olist (struct pim_upstream *up);
+int pim_upstream_inherited_olist_decide(struct pim_upstream *up);
+int pim_upstream_inherited_olist(struct pim_upstream *up);
+int pim_upstream_empty_inherited_olist(struct pim_upstream *up);
-void pim_upstream_find_new_rpf (void);
+void pim_upstream_find_new_rpf(void);
void pim_upstream_msdp_reg_timer_start(struct pim_upstream *up);
-void pim_upstream_init (void);
-void pim_upstream_terminate (void);
+void pim_upstream_init(void);
+void pim_upstream_terminate(void);
-void join_timer_start (struct pim_upstream *up);
-int pim_upstream_compare (void *arg1, void *arg2);
-void pim_upstream_register_reevaluate (void);
+void join_timer_start(struct pim_upstream *up);
+int pim_upstream_compare(void *arg1, void *arg2);
+void pim_upstream_register_reevaluate(void);
-void pim_upstream_add_lhr_star_pimreg (void);
-void pim_upstream_remove_lhr_star_pimreg (const char *nlist);
+void pim_upstream_add_lhr_star_pimreg(void);
+void pim_upstream_remove_lhr_star_pimreg(const char *nlist);
-void pim_upstream_spt_prefix_list_update (struct prefix_list *pl);
+void pim_upstream_spt_prefix_list_update(struct prefix_list *pl);
#endif /* PIM_UPSTREAM_H */