summaryrefslogtreecommitdiffstats
path: root/lib/srcdest_table.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 /lib/srcdest_table.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 'lib/srcdest_table.h')
-rw-r--r--lib/srcdest_table.h48
1 files changed, 21 insertions, 27 deletions
diff --git a/lib/srcdest_table.h b/lib/srcdest_table.h
index 0d858d11a..669068a79 100644
--- a/lib/srcdest_table.h
+++ b/lib/srcdest_table.h
@@ -56,45 +56,39 @@ extern route_table_delegate_t _srcdest_srcnode_delegate;
extern struct route_table *srcdest_table_init(void);
extern struct route_node *srcdest_rnode_get(struct route_table *table,
- union prefixptr dst_pu,
- struct prefix_ipv6 *src_p);
+ union prefixptr dst_pu,
+ struct prefix_ipv6 *src_p);
extern struct route_node *srcdest_rnode_lookup(struct route_table *table,
- union prefixptr dst_pu,
- struct prefix_ipv6 *src_p);
-extern void srcdest_rnode_prefixes (struct route_node *rn, struct prefix **p,
- struct prefix **src_p);
-extern const char *srcdest_rnode2str(struct route_node *rn, char *str, int size);
+ union prefixptr dst_pu,
+ struct prefix_ipv6 *src_p);
+extern void srcdest_rnode_prefixes(struct route_node *rn, struct prefix **p,
+ struct prefix **src_p);
+extern const char *srcdest_rnode2str(struct route_node *rn, char *str,
+ int size);
extern struct route_node *srcdest_route_next(struct route_node *rn);
-static inline int
-rnode_is_dstnode (struct route_node *rn)
+static inline int rnode_is_dstnode(struct route_node *rn)
{
- return rn->table->delegate == &_srcdest_dstnode_delegate;
+ return rn->table->delegate == &_srcdest_dstnode_delegate;
}
-static inline int
-rnode_is_srcnode (struct route_node *rn)
+static inline int rnode_is_srcnode(struct route_node *rn)
{
- return rn->table->delegate == &_srcdest_srcnode_delegate;
+ return rn->table->delegate == &_srcdest_srcnode_delegate;
}
-static inline struct route_table *
-srcdest_rnode_table (struct route_node *rn)
+static inline struct route_table *srcdest_rnode_table(struct route_node *rn)
{
- if (rnode_is_srcnode (rn))
- {
- struct route_node *dst_rn = rn->table->info;
- return dst_rn->table;
- }
- else
- {
- return rn->table;
- }
+ if (rnode_is_srcnode(rn)) {
+ struct route_node *dst_rn = rn->table->info;
+ return dst_rn->table;
+ } else {
+ return rn->table;
+ }
}
-static inline void *
-srcdest_rnode_table_info (struct route_node *rn)
+static inline void *srcdest_rnode_table_info(struct route_node *rn)
{
- return srcdest_rnode_table(rn)->info;
+ return srcdest_rnode_table(rn)->info;
}
#endif /* _ZEBRA_SRC_DEST_TABLE_H */