libcli/smb: add define for SMB 3.1.1 SMB2_HDR_FLAG_PRIORITY_MASK and helper macros
authorStefan Metzmacher <metze@samba.org>
Fri, 8 May 2015 08:15:52 +0000 (08:15 +0000)
committerMichael Adam <obnox@samba.org>
Fri, 8 May 2015 11:00:28 +0000 (13:00 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
libcli/smb/smb2_constants.h

index 1e4248d92e3b062f48dda8a2513fb3ad2ea01b74..0f4f674e92e4b588a339cae90e2b698c253168a2 100644 (file)
 #define SMB2_HDR_FLAG_ASYNC     0x02
 #define SMB2_HDR_FLAG_CHAINED   0x04
 #define SMB2_HDR_FLAG_SIGNED    0x08
+#define SMB2_HDR_FLAG_PRIORITY_MASK 0x70
 #define SMB2_HDR_FLAG_DFS       0x10000000
 #define SMB2_HDR_FLAG_REPLAY_OPERATION 0x20000000
 
+#define SMB2_PRIORITY_MASK_TO_VALUE(__m) (((__m) & SMB2_HDR_FLAG_PRIORITY_MASK) >> 4)
+#define SMB2_PRIORITY_VALUE_TO_MASK(__v) (((__v) << 4) & SMB2_HDR_FLAG_PRIORITY_MASK)
+
 /* SMB2 opcodes */
 #define SMB2_OP_NEGPROT                0x00
 #define SMB2_OP_SESSSETUP      0x01