summaryrefslogtreecommitdiff
path: root/src/openvpn/session_id.h
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
commit79f3537f69e125f19f59c36aa090120a63186a54 (patch)
tree2089a3b7dac990841dbc2e4d9b2f535b82dbb0af /src/openvpn/session_id.h
parentf2137fedb30cb87448eb03b2f288920df6187571 (diff)
parent3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (diff)
Merge tag 'upstream/2.4.0'
Upstream version 2.4.0
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 */