summaryrefslogtreecommitdiff
path: root/src/openvpn/session_id.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn/session_id.h')
-rw-r--r--src/openvpn/session_id.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/openvpn/session_id.h b/src/openvpn/session_id.h
index 2a1f41f..2b0ceb8 100644
--- a/src/openvpn/session_id.h
+++ b/src/openvpn/session_id.h
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+ * Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -40,47 +40,47 @@
struct session_id
{
- uint8_t id[8];
+ uint8_t id[8];
};
extern const struct session_id x_session_id_zero;
-#define SID_SIZE (sizeof (x_session_id_zero.id))
+#define SID_SIZE (sizeof(x_session_id_zero.id))
static inline bool
-session_id_equal (const struct session_id *sid1,
- const struct session_id *sid2)
+session_id_equal(const struct session_id *sid1,
+ const struct session_id *sid2)
{
- return !memcmp (sid1->id, sid2->id, SID_SIZE);
+ return !memcmp(sid1->id, sid2->id, SID_SIZE);
}
static inline bool
-session_id_defined (const struct session_id *sid1)
+session_id_defined(const struct session_id *sid1)
{
- return memcmp (sid1->id, &x_session_id_zero.id, SID_SIZE) != 0;
+ return memcmp(sid1->id, &x_session_id_zero.id, SID_SIZE) != 0;
}
static inline bool
-session_id_read (struct session_id *sid, struct buffer *buf)
+session_id_read(struct session_id *sid, struct buffer *buf)
{
- return buf_read (buf, sid->id, SID_SIZE);
+ return buf_read(buf, sid->id, SID_SIZE);
}
static inline bool
-session_id_write_prepend (const struct session_id *sid, struct buffer *buf)
+session_id_write_prepend(const struct session_id *sid, struct buffer *buf)
{
- return buf_write_prepend (buf, sid->id, SID_SIZE);
+ return buf_write_prepend(buf, sid->id, SID_SIZE);
}
static inline bool
-session_id_write (const struct session_id *sid, struct buffer *buf)
+session_id_write(const struct session_id *sid, struct buffer *buf)
{
- return buf_write (buf, sid->id, SID_SIZE);
+ return buf_write(buf, sid->id, SID_SIZE);
}
-void session_id_random (struct session_id *sid);
+void session_id_random(struct session_id *sid);
-const char *session_id_print (const struct session_id *sid, struct gc_arena *gc);
+const char *session_id_print(const struct session_id *sid, struct gc_arena *gc);
#endif /* SESSION_ID_H */
#endif /* ENABLE_CRYPTO */