summaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2.h
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-10-10 04:39:11 +0000
committerBeno�t Ganne <bganne@cisco.com>2020-10-21 16:11:28 +0000
commitedf2900ac633ae0d8575b04094b1bca40e1a221f (patch)
treec6afab1f6a9162d07aee9835628b90a030f2a33d /src/plugins/ikev2/ikev2.h
parent6ba4e41d33ffda2596d9d4b3a1d7fdd3c9a6b870 (diff)
ikev2: support sending requests from responder
Type: improvement Ticket: VPP-1894 Change-Id: I5a24a48416bca2ffbd346cdaa813fb25801e6c9b Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/ikev2/ikev2.h')
-rw-r--r--src/plugins/ikev2/ikev2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/ikev2/ikev2.h b/src/plugins/ikev2/ikev2.h
index 47c301f33a1..893d9544aa8 100644
--- a/src/plugins/ikev2/ikev2.h
+++ b/src/plugins/ikev2/ikev2.h
@@ -44,6 +44,11 @@ typedef CLIB_PACKED (struct {
}) ike_header_t;
/* *INDENT-ON* */
+#define ike_hdr_is_response(_h) ((_h)->flags & IKEV2_HDR_FLAG_RESPONSE)
+#define ike_hdr_is_request(_h) (!ike_hdr_is_response(_h))
+#define ike_hdr_is_initiator(_h) ((_h)->flags & IKEV2_HDR_FLAG_INITIATOR)
+#define ike_hdr_is_responder(_h) (!(ike_hdr_is_initiator(_h)))
+
/* *INDENT-OFF* */
typedef CLIB_PACKED (struct {
u8 nextpayload;