dinput: Move IDirectInput7 WtoA wrappers to ansi.c.
[wine.git] / dlls / msv1_0 / unixlib.h
blob92f42f4b0bdd12a46000a9241325536fc722502f
1 /*
2 * Copyright 2005, 2006 Kai Blin
3 * Copyright 2021 Hans Leidekker for CodeWeavers
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <sys/types.h>
22 enum sign_direction
24 SIGN_SEND,
25 SIGN_RECV,
28 enum mode
30 MODE_INVALID = -1,
31 MODE_CLIENT,
32 MODE_SERVER,
35 struct ntlm_cred
37 enum mode mode;
38 char *username_arg;
39 char *domain_arg;
40 char *password;
41 int password_len;
42 int no_cached_credentials; /* don't try to use cached Samba credentials */
45 struct arc4_info
47 char x;
48 char y;
49 char state[256];
52 #define FLAG_NEGOTIATE_SIGN 0x00000010
53 #define FLAG_NEGOTIATE_SEAL 0x00000020
54 #define FLAG_NEGOTIATE_ALWAYS_SIGN 0x00008000
55 #define FLAG_NEGOTIATE_NTLM2 0x00080000
56 #define FLAG_NEGOTIATE_KEY_EXCHANGE 0x40000000
58 struct ntlm_ctx
60 enum mode mode;
61 int pid;
62 unsigned int attrs;
63 int pipe_in;
64 int pipe_out;
65 char *com_buf;
66 unsigned int com_buf_size;
67 unsigned int com_buf_offset;
68 char session_key[16];
69 unsigned int flags;
70 struct
72 struct
74 unsigned int seq_no;
75 struct arc4_info arc4info;
76 } ntlm;
77 struct
79 char send_sign_key[16];
80 char send_seal_key[16];
81 char recv_sign_key[16];
82 char recv_seal_key[16];
83 unsigned int send_seq_no;
84 unsigned int recv_seq_no;
85 struct arc4_info send_arc4info;
86 struct arc4_info recv_arc4info;
87 } ntlm2;
88 } crypt;
91 struct ntlm_funcs
93 SECURITY_STATUS (CDECL *chat)( struct ntlm_ctx *, char *, unsigned int, unsigned int * );
94 void (CDECL *cleanup)( struct ntlm_ctx * );
95 SECURITY_STATUS (CDECL *fork)( char **, struct ntlm_ctx ** );
98 extern const struct ntlm_funcs *ntlm_funcs;