summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_proto.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 /ospf6d/ospf6_proto.h
parent888ac268a0077fc9ebd1218cec6ae472af0bfc40 (diff)
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_proto.h')
-rw-r--r--ospf6d/ospf6_proto.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/ospf6d/ospf6_proto.h b/ospf6d/ospf6_proto.h
index e4f29aa3e8..174b5a4f0f 100644
--- a/ospf6d/ospf6_proto.h
+++ b/ospf6d/ospf6_proto.h
@@ -52,17 +52,16 @@
/* OSPF6 Prefix */
#define OSPF6_PREFIX_MIN_SIZE 4U /* .length == 0 */
-struct ospf6_prefix
-{
- u_int8_t prefix_length;
- u_int8_t prefix_options;
- union {
- u_int16_t _prefix_metric;
- u_int16_t _prefix_referenced_lstype;
- } u;
+struct ospf6_prefix {
+ u_int8_t prefix_length;
+ u_int8_t prefix_options;
+ union {
+ u_int16_t _prefix_metric;
+ u_int16_t _prefix_referenced_lstype;
+ } u;
#define prefix_metric u._prefix_metric
#define prefix_refer_lstype u._prefix_referenced_lstype
- /* followed by one address_prefix */
+ /* followed by one address_prefix */
};
#define OSPF6_PREFIX_OPTION_NU (1 << 0) /* No Unicast */
@@ -77,24 +76,24 @@ struct ospf6_prefix
#define OSPF6_PREFIX_SPACE(x) ((((x) + 31) / 32) * 4)
/* size_t OSPF6_PREFIX_SIZE (struct ospf6_prefix *); */
-#define OSPF6_PREFIX_SIZE(x) \
- (OSPF6_PREFIX_SPACE ((x)->prefix_length) + sizeof (struct ospf6_prefix))
+#define OSPF6_PREFIX_SIZE(x) \
+ (OSPF6_PREFIX_SPACE((x)->prefix_length) + sizeof(struct ospf6_prefix))
/* struct ospf6_prefix *OSPF6_PREFIX_NEXT (struct ospf6_prefix *); */
-#define OSPF6_PREFIX_NEXT(x) \
- ((struct ospf6_prefix *)((caddr_t)(x) + OSPF6_PREFIX_SIZE (x)))
-
-#define ospf6_prefix_in6_addr(in6, op) \
-do { \
- memset (in6, 0, sizeof (struct in6_addr)); \
- memcpy (in6, (caddr_t) (op) + sizeof (struct ospf6_prefix), \
- OSPF6_PREFIX_SPACE ((op)->prefix_length)); \
-} while (0)
-
-extern void ospf6_prefix_apply_mask (struct ospf6_prefix *op);
-extern void ospf6_prefix_options_printbuf (u_int8_t prefix_options,
- char *buf, int size);
-extern void ospf6_capability_printbuf (char capability, char *buf, int size);
-extern void ospf6_options_printbuf (u_char *options, char *buf, int size);
+#define OSPF6_PREFIX_NEXT(x) \
+ ((struct ospf6_prefix *)((caddr_t)(x) + OSPF6_PREFIX_SIZE(x)))
+
+#define ospf6_prefix_in6_addr(in6, op) \
+ do { \
+ memset(in6, 0, sizeof(struct in6_addr)); \
+ memcpy(in6, (caddr_t)(op) + sizeof(struct ospf6_prefix), \
+ OSPF6_PREFIX_SPACE((op)->prefix_length)); \
+ } while (0)
+
+extern void ospf6_prefix_apply_mask(struct ospf6_prefix *op);
+extern void ospf6_prefix_options_printbuf(u_int8_t prefix_options, char *buf,
+ int size);
+extern void ospf6_capability_printbuf(char capability, char *buf, int size);
+extern void ospf6_options_printbuf(u_char *options, char *buf, int size);
#endif /* OSPF6_PROTO_H */