annotate src/lib-ntlm/ntlm.h @ 2808:48250919bbc4 HEAD

support OEM encoding in NTLM messages. Patch by Andrey Panin.
author Timo Sirainen <tss@iki.fi>
date Fri, 22 Oct 2004 16:34:06 +0300
parents 529053546752
children 55df57c028d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2377
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #ifndef __NTLM_H__
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #define __NTLM_H__
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 #include <stddef.h>
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 #include "ntlm-types.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 #include "ntlm-flags.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8 #include "ntlm-byteorder.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 #include "ntlm-encrypt.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10 #include "ntlm-message.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 #define ntlmssp_buffer_data(message, buffer) \
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 __ntlmssp_buffer_data((message), &message->buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15 static inline const void *
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
16 __ntlmssp_buffer_data(void * message, struct ntlmssp_buffer *buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
17 {
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
18 return ((char *) message) + read_le32(&buffer->offset);
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
19 }
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21 #define ntlmssp_buffer_length(message, buffer) \
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 __ntlmssp_buffer_length(&message->buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24 static inline unsigned int __ntlmssp_buffer_length(struct ntlmssp_buffer *buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 {
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
26 return read_le16(&buffer->length);
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27 }
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28
2808
48250919bbc4 support OEM encoding in NTLM messages. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2388
diff changeset
29 #define ntlmssp_t_str(message, buffer, unicode) \
48250919bbc4 support OEM encoding in NTLM messages. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2388
diff changeset
30 __ntlmssp_t_str((message), &(message)->buffer, (unicode))
2377
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
32 const char * __ntlmssp_t_str(const void *message,
2808
48250919bbc4 support OEM encoding in NTLM messages. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2388
diff changeset
33 struct ntlmssp_buffer *buffer,
48250919bbc4 support OEM encoding in NTLM messages. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents: 2388
diff changeset
34 int unicode);
2377
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
35
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36 #endif