summaryrefslogtreecommitdiffstats
path: root/lib/smux.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/smux.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/smux.h')
-rw-r--r--lib/smux.h81
1 files changed, 36 insertions, 45 deletions
diff --git a/lib/smux.h b/lib/smux.h
index e94a7a9cc..987414c0d 100644
--- a/lib/smux.h
+++ b/lib/smux.h
@@ -41,43 +41,37 @@
#define IN_ADDR_SIZE sizeof(struct in_addr)
#undef REGISTER_MIB
-#define REGISTER_MIB(descr, var, vartype, theoid) \
- smux_register_mib(descr, (struct variable *)var, sizeof(struct vartype), \
- sizeof(var)/sizeof(struct vartype), \
- theoid, sizeof(theoid)/sizeof(oid))
-
-struct trap_object
-{
- int namelen; /* Negative if the object is not indexed */
- oid name[MAX_OID_LEN];
+#define REGISTER_MIB(descr, var, vartype, theoid) \
+ smux_register_mib(descr, (struct variable *)var, \
+ sizeof(struct vartype), \
+ sizeof(var) / sizeof(struct vartype), theoid, \
+ sizeof(theoid) / sizeof(oid))
+
+struct trap_object {
+ int namelen; /* Negative if the object is not indexed */
+ oid name[MAX_OID_LEN];
};
/* Declare SMUX return value. */
-#define SNMP_LOCAL_VARIABLES \
- static long snmp_int_val __attribute__ ((unused)); \
- static struct in_addr snmp_in_addr_val __attribute__ ((unused));
-
-#define SNMP_INTEGER(V) \
- ( \
- *var_len = sizeof (snmp_int_val), \
- snmp_int_val = V, \
- (u_char *) &snmp_int_val \
- )
-
-#define SNMP_IPADDRESS(V) \
- ( \
- *var_len = sizeof (struct in_addr), \
- snmp_in_addr_val = V, \
- (u_char *) &snmp_in_addr_val \
- )
-
-extern void smux_init (struct thread_master *tm);
-extern void smux_register_mib(const char *, struct variable *,
- size_t, int, oid [], size_t);
-extern int smux_header_generic (struct variable *, oid [], size_t *,
- int, size_t *, WriteMethod **);
-extern int smux_header_table (struct variable *, oid *, size_t *,
- int, size_t *, WriteMethod **);
+#define SNMP_LOCAL_VARIABLES \
+ static long snmp_int_val __attribute__((unused)); \
+ static struct in_addr snmp_in_addr_val __attribute__((unused));
+
+#define SNMP_INTEGER(V) \
+ (*var_len = sizeof(snmp_int_val), snmp_int_val = V, \
+ (u_char *)&snmp_int_val)
+
+#define SNMP_IPADDRESS(V) \
+ (*var_len = sizeof(struct in_addr), snmp_in_addr_val = V, \
+ (u_char *)&snmp_in_addr_val)
+
+extern void smux_init(struct thread_master *tm);
+extern void smux_register_mib(const char *, struct variable *, size_t, int,
+ oid[], size_t);
+extern int smux_header_generic(struct variable *, oid[], size_t *, int,
+ size_t *, WriteMethod **);
+extern int smux_header_table(struct variable *, oid *, size_t *, int, size_t *,
+ WriteMethod **);
/* For traps, three OID are provided:
@@ -100,16 +94,13 @@ extern int smux_header_table (struct variable *, oid *, size_t *,
The use of the arguments may differ depending on the implementation
used.
*/
-extern int smux_trap (struct variable *, size_t,
- const oid *, size_t,
- const oid *, size_t,
- const oid *, size_t,
- const struct trap_object *, size_t,
- u_char);
-
-extern int oid_compare (const oid *, int, const oid *, int);
-extern void oid2in_addr (oid [], int, struct in_addr *);
-extern void *oid_copy (void *, const void *, size_t);
-extern void oid_copy_addr (oid [], struct in_addr *, int);
+extern int smux_trap(struct variable *, size_t, const oid *, size_t,
+ const oid *, size_t, const oid *, size_t,
+ const struct trap_object *, size_t, u_char);
+
+extern int oid_compare(const oid *, int, const oid *, int);
+extern void oid2in_addr(oid[], int, struct in_addr *);
+extern void *oid_copy(void *, const void *, size_t);
+extern void oid_copy_addr(oid[], struct in_addr *, int);
#endif /* _ZEBRA_SNMP_H */