vserver 2.0 rc7
[linux-2.6.git] / fs / cifs / ntlmssp.h
index f06edcb..6facb41 100644 (file)
 
 #define NTLMSSP_SIGNATURE "NTLMSSP"
 /* Message Types */
-#define NtLmNegotiate     1
-#define NtLmChallenge     2
-#define NtLmAuthenticate  3
-#define UnknownMessage    8
+#define NtLmNegotiate     cpu_to_le32(1)
+#define NtLmChallenge     cpu_to_le32(2)
+#define NtLmAuthenticate  cpu_to_le32(3)
+#define UnknownMessage    cpu_to_le32(8)
 
 /* Negotiate Flags */
 #define NTLMSSP_NEGOTIATE_UNICODE       0x01   // Text strings are in unicode
@@ -35,7 +35,7 @@
 #define NTLMSSP_NEGOTIATE_SIGN        0x0010   // Request signature capability
 #define NTLMSSP_NEGOTIATE_SEAL        0x0020   // Request confidentiality
 #define NTLMSSP_NEGOTIATE_DGRAM       0x0040
-#define NTLMSSP_NEGOTIATE_LM_KEY      0x0080   // Use LM session key for sign/seal
+#define NTLMSSP_NEGOTIATE_LM_KEY      0x0080 // Use LM session key for sign/seal
 #define NTLMSSP_NEGOTIATE_NTLM        0x0200   // NTLM authentication
 #define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x1000
 #define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x2000
 /* appearance */
 
 typedef struct _SECURITY_BUFFER {
-       __u16 Length;
-       __u16 MaximumLength;
-       __u32 Buffer;           /* offset to buffer */
+       __le16 Length;
+       __le16 MaximumLength;
+       __le32 Buffer;          /* offset to buffer */
 } SECURITY_BUFFER;
 
 typedef struct _NEGOTIATE_MESSAGE {
        __u8 Signature[sizeof (NTLMSSP_SIGNATURE)];
-       __u32 MessageType;     /* 1 */
-       __u32 NegotiateFlags;
+       __le32 MessageType;     /* 1 */
+       __le32 NegotiateFlags;
        SECURITY_BUFFER DomainName;     /* RFC 1001 style and ASCII */
        SECURITY_BUFFER WorkstationName;        /* RFC 1001 and ASCII */
        char DomainString[0];
@@ -77,9 +77,9 @@ typedef struct _NEGOTIATE_MESSAGE {
 
 typedef struct _CHALLENGE_MESSAGE {
        __u8 Signature[sizeof (NTLMSSP_SIGNATURE)];
-       __u32 MessageType;   /* 2 */
+       __le32 MessageType;   /* 2 */
        SECURITY_BUFFER TargetName;
-       __u32 NegotiateFlags;
+       __le32 NegotiateFlags;
        __u8 Challenge[CIFS_CRYPTO_KEY_SIZE];
        __u8 Reserved[8];
        SECURITY_BUFFER TargetInfoArray;
@@ -87,14 +87,14 @@ typedef struct _CHALLENGE_MESSAGE {
 
 typedef struct _AUTHENTICATE_MESSAGE {
        __u8 Signature[sizeof (NTLMSSP_SIGNATURE)];
-       __u32 MessageType;  /* 3 */
+       __le32 MessageType;  /* 3 */
        SECURITY_BUFFER LmChallengeResponse;
        SECURITY_BUFFER NtChallengeResponse;
        SECURITY_BUFFER DomainName;
        SECURITY_BUFFER UserName;
        SECURITY_BUFFER WorkstationName;
        SECURITY_BUFFER SessionKey;
-       __u32 NegotiateFlags;
+       __le32 NegotiateFlags;
        char UserString[0];
 } AUTHENTICATE_MESSAGE, *PAUTHENTICATE_MESSAGE;