From 72520c7339f04849633114d9dca644e32f85e9fb Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Thu, 3 Aug 2017 05:40:23 +0200 Subject: implemented mtype return mask; fixed nasty ctype bug in conn create --- code/core/core.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'code/core/core.h') diff --git a/code/core/core.h b/code/core/core.h index 46f0d70..9cf3cf2 100644 --- a/code/core/core.h +++ b/code/core/core.h @@ -53,11 +53,21 @@ #define ECP_ECDH_IDX_INV 0xFF #define ECP_ECDH_IDX_PERMA 0x0F +#define ECP_MTYPE_MASK 0x7f +#define ECP_MTYPE_FLAG_REP 0x80 + #define ECP_MTYPE_OPEN 0x00 #define ECP_MTYPE_KGET 0x01 #define ECP_MTYPE_KPUT 0x02 #define ECP_MTYPE_EXEC 0x03 +#define ECP_MTYPE_OPEN_REQ (ECP_MTYPE_OPEN) +#define ECP_MTYPE_OPEN_REP (ECP_MTYPE_OPEN | ECP_MTYPE_FLAG_REP) +#define ECP_MTYPE_KGET_REQ (ECP_MTYPE_KGET) +#define ECP_MTYPE_KGET_REP (ECP_MTYPE_KGET | ECP_MTYPE_FLAG_REP) +#define ECP_MTYPE_KPUT_REQ (ECP_MTYPE_KPUT) +#define ECP_MTYPE_KPUT_REP (ECP_MTYPE_KPUT | ECP_MTYPE_FLAG_REP) + #define ECP_SIZE_PLD(X) ((X) < ECP_MIN_MSG ? ECP_MIN_MSG + ECP_SIZE_MSG_HDR : (X) + ECP_SIZE_MSG_HDR) #define ECP_SIZE_PKT(X) ((X) < ECP_MIN_MSG ? ECP_MIN_MSG + ECP_SIZE_PKT_HDR+ECP_SIZE_MSG_HDR+ECP_AEAD_SIZE_TAG : (X) + ECP_SIZE_PKT_HDR+ECP_SIZE_MSG_HDR+ECP_AEAD_SIZE_TAG) -- cgit v1.2.3