summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ism.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 /ospfd/ospf_ism.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 'ospfd/ospf_ism.h')
-rw-r--r--ospfd/ospf_ism.h80
1 files changed, 39 insertions, 41 deletions
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h
index f099fe875..5ae99ab32 100644
--- a/ospfd/ospf_ism.h
+++ b/ospfd/ospf_ism.h
@@ -47,62 +47,60 @@
#define ISM_InterfaceDown 7
#define OSPF_ISM_EVENT_MAX 8
-#define OSPF_ISM_WRITE_ON(O) \
- do \
- { \
- if (oi->on_write_q == 0) \
- { \
- listnode_add ((O)->oi_write_q, oi); \
- oi->on_write_q = 1; \
- } \
- thread_add_write (master, ospf_write, (O), (O)->fd, &(O)->t_write); \
- } while (0)
-
+#define OSPF_ISM_WRITE_ON(O) \
+ do { \
+ if (oi->on_write_q == 0) { \
+ listnode_add((O)->oi_write_q, oi); \
+ oi->on_write_q = 1; \
+ } \
+ thread_add_write(master, ospf_write, (O), (O)->fd, \
+ &(O)->t_write); \
+ } while (0)
+
/* Macro for OSPF ISM timer turn on. */
-#define OSPF_ISM_TIMER_ON(T,F,V) \
- thread_add_timer (master, (F), oi, (V), &(T))
+#define OSPF_ISM_TIMER_ON(T, F, V) thread_add_timer(master, (F), oi, (V), &(T))
-#define OSPF_ISM_TIMER_MSEC_ON(T,F,V) \
- thread_add_timer_msec (master, (F), oi, (V), &(T))
+#define OSPF_ISM_TIMER_MSEC_ON(T, F, V) \
+ thread_add_timer_msec(master, (F), oi, (V), &(T))
/* convenience macro to set hello timer correctly, according to
* whether fast-hello is set or not
*/
-#define OSPF_HELLO_TIMER_ON(O) \
- do { \
- if (OSPF_IF_PARAM ((O), fast_hello)) \
- OSPF_ISM_TIMER_MSEC_ON ((O)->t_hello, ospf_hello_timer, \
- 1000 / OSPF_IF_PARAM ((O), fast_hello)); \
- else \
- OSPF_ISM_TIMER_ON ((O)->t_hello, ospf_hello_timer, \
- OSPF_IF_PARAM ((O), v_hello)); \
- } while (0)
+#define OSPF_HELLO_TIMER_ON(O) \
+ do { \
+ if (OSPF_IF_PARAM((O), fast_hello)) \
+ OSPF_ISM_TIMER_MSEC_ON( \
+ (O)->t_hello, ospf_hello_timer, \
+ 1000 / OSPF_IF_PARAM((O), fast_hello)); \
+ else \
+ OSPF_ISM_TIMER_ON((O)->t_hello, ospf_hello_timer, \
+ OSPF_IF_PARAM((O), v_hello)); \
+ } while (0)
/* Macro for OSPF ISM timer turn off. */
-#define OSPF_ISM_TIMER_OFF(X) \
- do { \
- if (X) \
- { \
- thread_cancel (X); \
- (X) = NULL; \
- } \
- } while (0)
+#define OSPF_ISM_TIMER_OFF(X) \
+ do { \
+ if (X) { \
+ thread_cancel(X); \
+ (X) = NULL; \
+ } \
+ } while (0)
/* Macro for OSPF schedule event. */
-#define OSPF_ISM_EVENT_SCHEDULE(I,E) \
- thread_add_event (master, ospf_ism_event, (I), (E), NULL)
+#define OSPF_ISM_EVENT_SCHEDULE(I, E) \
+ thread_add_event(master, ospf_ism_event, (I), (E), NULL)
/* Macro for OSPF execute event. */
-#define OSPF_ISM_EVENT_EXECUTE(I,E) \
- thread_execute (master, ospf_ism_event, (I), (E))
+#define OSPF_ISM_EVENT_EXECUTE(I, E) \
+ thread_execute(master, ospf_ism_event, (I), (E))
/* Prototypes. */
-extern int ospf_ism_event (struct thread *);
-extern void ism_change_status (struct ospf_interface *, int);
-extern int ospf_hello_timer (struct thread *thread);
+extern int ospf_ism_event(struct thread *);
+extern void ism_change_status(struct ospf_interface *, int);
+extern int ospf_hello_timer(struct thread *thread);
DECLARE_HOOK(ospf_ism_change,
- (struct ospf_interface *oi, int state, int oldstate),
- (oi, state, oldstate))
+ (struct ospf_interface * oi, int state, int oldstate),
+ (oi, state, oldstate))
#endif /* _ZEBRA_OSPF_ISM_H */