a couple of mode for smbwrapper
[samba.git] / source3 / include / client.h
1 /*
2    Unix SMB/Netbios implementation.
3    Version 1.9.
4    SMB parameters and setup
5    Copyright (C) Andrew Tridgell 1992-1998
6    Copyright (C) Luke Kenneth Casson Leighton 1996-1998
7    Copyright (C) Jeremy Allison 1998
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 #ifndef _CLIENT_H
25 #define _CLIENT_H
26
27 /*
28  * These definitions depend on smb.h
29  */
30
31 typedef struct file_info
32 {
33   SMB_OFF_T size;
34   int mode;
35   uid_t uid;
36   gid_t gid;
37   /* these times are normally kept in GMT */
38   time_t mtime;
39   time_t atime;
40   time_t ctime;
41   pstring name;
42 } file_info;
43
44 struct pwd_info
45 {
46     BOOL null_pwd;
47     BOOL cleartext;
48     BOOL crypted;
49
50     fstring password;
51
52     uchar smb_lm_pwd[16];
53     uchar smb_nt_pwd[16];
54
55     uchar smb_lm_owf[24];
56     uchar smb_nt_owf[24];
57 };
58
59 struct cli_state {
60   int fd;
61   uint16 cnum;
62   uint16 pid;
63   uint16 mid;
64   uint16 vuid;
65   int protocol;
66   int sec_mode;
67   int rap_error;
68   int privilages;
69
70   fstring eff_name;
71   fstring desthost;
72   fstring user_name;
73   fstring domain;
74
75   fstring share;
76   fstring dev;
77   struct nmb_name called;
78   struct nmb_name calling;
79   fstring full_dest_host_name;
80   struct in_addr dest_ip;
81
82   struct pwd_info pwd;
83   unsigned char cryptkey[8];
84   uint32 sesskey;
85   int serverzone;
86   uint32 servertime;
87   int readbraw_supported;
88   int writebraw_supported;
89   int timeout;
90   int max_xmit;
91   char *outbuf;
92   char *inbuf;
93   int bufsize;
94   int initialised;
95   /*
96    * Only used in NT domain calls.
97    */
98   uint32 nt_error;                   /* NT RPC error code. */
99   uint16 nt_pipe_fnum;               /* Pipe handle. */
100   unsigned char sess_key[16];        /* Current session key. */
101   DOM_CRED clnt_cred;                /* Client credential. */
102   fstring mach_acct;                 /* MYNAME$. */
103   fstring srv_name_slash;            /* \\remote server. */
104   fstring clnt_name_slash;            /* \\local client. */
105 };
106
107 #endif /* _CLIENT_H */