smbd: Add conn_using_smb2()
[samba.git] / source3 / smbd / conn.c
index e6c1fa72dcbfc728b92c13e51b1ebf69cd6f0908..b7a745a951e85f2731ba25373ae4b915714b5df8 100644 (file)
@@ -84,6 +84,12 @@ enum protocol_types conn_protocol(struct smbd_server_connection *sconn)
        return PROTOCOL_COREPLUS;
 }
 
+bool conn_using_smb2(struct smbd_server_connection *sconn)
+{
+       enum protocol_types proto = conn_protocol(sconn);
+       return (proto >= PROTOCOL_SMB2_02);
+}
+
 /****************************************************************************
  Find first available connection slot, starting from a random position.
  The randomisation stops problems with the server dying and clients