annotate src/lib-ntlm/ntlm.h @ 2377:8f5be0be3199 HEAD

NTLM authentication. Patch by Andrey Panin
author Timo Sirainen <tss@iki.fi>
date Wed, 28 Jul 2004 18:39:29 +0300
parents
children 529053546752
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 <stdint.h>
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 #include <stddef.h>
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 #include "ntlm-types.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8 #include "ntlm-flags.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 #include "ntlm-byteorder.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10 #include "ntlm-encrypt.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 #include "ntlm-message.h"
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 #define ntlmssp_buffer_data(message, buffer) \
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 __ntlmssp_buffer_data((message), &message->buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
16 static inline const void *
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
17 __ntlmssp_buffer_data(void * message, struct ntlmssp_buffer *buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
18 {
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
19 return ((char *) message) + read_le32(&buffer->offset);
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
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 #define ntlmssp_buffer_length(message, buffer) \
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23 __ntlmssp_buffer_length(&message->buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 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
26 {
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27 return read_le16(&buffer->length);
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28 }
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30 #define ntlmssp_t_str(message, buffer) \
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31 __ntlmssp_t_str((message), &message->buffer)
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
32
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 const char * __ntlmssp_t_str(const void *message,
8f5be0be3199 NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
34 struct ntlmssp_buffer *buffer);
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