~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to helpers/ntlm_auth/smb_lm/smbval/smblib-common.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2009-09-24 14:51:06 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (20.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090924145106-38jgrzmj0d73pha5
Tags: 3.1.0.13-1
* Upload to experimental

* New upstream release
  - Fixes Follow-X-Forwarded-For support (Closes: #523943)
  - Adds IPv6 support (Closes: #432351)

* debian/rules
  - Removed obsolete configuration options
  - Enable db and radius basic authentication modules

* debian/patches/01-cf.data.debian
  - Adapted to new upstream version

* debian/patches/02-makefile-defaults
  - Adapted to new upstream version

* debian/{squid.postinst,squid.rc,README.Debian,watch}
  - Updated references to squid 3.1

* debian/squid3.install
  - Install CSS file for error pages
  - Install manual pages for new authentication modules

* debian/squid3-common.install
  - Install documented version of configuration file in /usr/share/doc/squid3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SMBLIB_COMMON_H__
 
2
#define __SMBLIB_COMMON_H__
 
3
 
 
4
/* UNIX SMBlib NetBIOS implementation
 
5
 *
 
6
 * Version 1.0
 
7
 * SMBlib Common Defines
 
8
 *
 
9
 * Copyright (C) Richard Sharpe 1996
 
10
 *
 
11
 */
 
12
 
 
13
/*
 
14
 * This program is free software; you can redistribute it and/or modify
 
15
 * it under the terms of the GNU General Public License as published by
 
16
 * the Free Software Foundation; either version 2 of the License, or
 
17
 * (at your option) any later version.
 
18
 *
 
19
 * This program is distributed in the hope that it will be useful,
 
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
22
 * GNU General Public License for more details.
 
23
 *
 
24
 * You should have received a copy of the GNU General Public License
 
25
 * along with this program; if not, write to the Free Software
 
26
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
27
 */
 
28
 
 
29
/* To get the error class we want the first 8 bits */
 
30
/* Because we just grab 4bytes from the SMB header, we have to re-order */
 
31
/* here, but it makes the NtStatus part easier in future                */
 
32
 
 
33
#define SMBlib_Error_Class(p) (p & 0x000000FF)
 
34
 
 
35
/* To get the error code, we want the bottom 16 bits */
 
36
 
 
37
#define SMBlib_Error_Code(p) (((unsigned int)p & 0xFFFF0000) >>16)
 
38
 
 
39
/* Error CLASS codes and etc ... */
 
40
 
 
41
#define SMBC_SUCCESS        0
 
42
#define SMBC_ERRDOS         0x01
 
43
#define SMBC_ERRSRV         0x02
 
44
#define SMBC_ERRHRD         0x03
 
45
#define SMBC_ERRCMD         0xFF
 
46
 
 
47
/* Success error codes    */
 
48
 
 
49
#define SMBS_BUFFERED       0x54
 
50
#define SMBS_LOGGED         0x55
 
51
#define SMBS_DISPLAYED      0x56
 
52
 
 
53
/* ERRDOS Error codes     */
 
54
 
 
55
#define SMBD_badfunc        0x01
 
56
#define SMBD_badfile        0x02
 
57
#define SMBD_badpath        0x03
 
58
#define SMBD_nofids         0x04
 
59
#define SMBD_noaccess       0x05
 
60
#define SMBD_badfid         0x06
 
61
#define SMBD_badmcb         0x07
 
62
#define SMBD_nomem          0x08
 
63
#define SMBD_badmem         0x09
 
64
#define SMBD_badenv         0x0A
 
65
#define SMBD_badformat      0x0B
 
66
#define SMBD_badaccess      0x0C
 
67
#define SMBD_baddata        0x0D
 
68
#define SMBD_reserved       0x0E
 
69
#define SMBD_baddrive       0x0F
 
70
#define SMBD_remcd          0x10
 
71
#define SMBD_diffdevice     0x11
 
72
#define SMBD_nofiles        0x12
 
73
#define SMBD_badshare       0x20
 
74
#define SMBD_errlock        0x21
 
75
#define SMBD_filexists      0x50
 
76
 
 
77
/* Server errors ... */
 
78
 
 
79
#define SMBV_error          0x01        /* Generic error */
 
80
#define SMBV_badpw          0x02
 
81
#define SMBV_badtype        0x03
 
82
#define SMBV_access         0x04
 
83
#define SMBV_invnid         0x05
 
84
#define SMBV_invnetname     0x06
 
85
#define SMBV_invdevice      0x07
 
86
#define SMBV_qfull          0x31
 
87
#define SMBV_qtoobig        0x32
 
88
#define SMBV_qeof           0x33
 
89
#define SMBV_invpfid        0x34
 
90
#define SMBV_paused         0x51
 
91
#define SMBV_msgoff         0x52
 
92
#define SMBV_noroom         0x53
 
93
#define SMBV_rmuns          0x57
 
94
#define SMBV_nosupport      0xFFFF
 
95
 
 
96
/* Hardware error codes ... */
 
97
 
 
98
#define SMBH_nowrite        0x13
 
99
#define SMBH_badunit        0x14
 
100
#define SMBH_notready       0x15
 
101
#define SMBH_badcmd         0x16
 
102
#define SMBH_data           0x17
 
103
#define SMBH_badreq         0x18
 
104
#define SMBH_seek           0x19
 
105
#define SMBH_badmedia       0x1A
 
106
#define SMBH_badsector      0x1B
 
107
#define SMBH_nopaper        0x1C
 
108
#define SMBH_write          0x1D
 
109
#define SMBH_read           0x1E
 
110
#define SMBH_general        0x1F
 
111
#define SMBH_badshare       0x20
 
112
 
 
113
/* Access mode defines ... */
 
114
 
 
115
#define SMB_AMODE_WTRU      0x4000
 
116
#define SMB_AMODE_NOCACHE   0x1000
 
117
#define SMB_AMODE_COMPAT    0x0000
 
118
#define SMB_AMODE_DENYRWX   0x0010
 
119
#define SMB_AMODE_DENYW     0x0020
 
120
#define SMB_AMODE_DENYRX    0x0030
 
121
#define SMB_AMODE_DENYNONE  0x0040
 
122
#define SMB_AMODE_OPENR     0x0000
 
123
#define SMB_AMODE_OPENW     0x0001
 
124
#define SMB_AMODE_OPENRW    0x0002
 
125
#define SMB_AMODE_OPENX     0x0003
 
126
#define SMB_AMODE_FCBOPEN   0x00FF
 
127
#define SMB_AMODE_LOCUNKN   0x0000
 
128
#define SMB_AMODE_LOCMSEQ   0x0100
 
129
#define SMB_AMODE_LOCMRAN   0x0200
 
130
#define SMB_AMODE_LOCRAL    0x0300
 
131
 
 
132
/* File attribute encoding ... */
 
133
 
 
134
#define SMB_FA_ORD          0x00
 
135
#define SMB_FA_ROF          0x01
 
136
#define SMB_FA_HID          0x02
 
137
#define SMB_FA_SYS          0x04
 
138
#define SMB_FA_VOL          0x08
 
139
#define SMB_FA_DIR          0x10
 
140
#define SMB_FA_ARC          0x20
 
141
 
 
142
/* Define the protocol types ... */
 
143
 
 
144
#define SMB_P_Unknown      -1   /* Hmmm, is this smart? */
 
145
#define SMB_P_Core         0
 
146
#define SMB_P_CorePlus     1
 
147
#define SMB_P_DOSLanMan1   2
 
148
#define SMB_P_LanMan1      3
 
149
#define SMB_P_DOSLanMan2   4
 
150
#define SMB_P_LanMan2      5
 
151
#define SMB_P_DOSLanMan2_1 6
 
152
#define SMB_P_LanMan2_1    7
 
153
#define SMB_P_NT1          8
 
154
 
 
155
/* SMBlib return codes */
 
156
/* We want something that indicates whether or not the return code was a   */
 
157
/* remote error, a local error in SMBlib or returned from lower layer ...  */
 
158
/* Wonder if this will work ...                                            */
 
159
/* SMBlibE_Remote = 1 indicates remote error                               */
 
160
/* SMBlibE_ values < 0 indicate local error with more info available       */
 
161
/* SMBlibE_ values >1 indicate local from SMBlib code errors?              */
 
162
 
 
163
#define SMBlibE_Success 0
 
164
#define SMBlibE_Remote  1       /* Remote error, get more info from con        */
 
165
#define SMBlibE_BAD     -1
 
166
#define SMBlibE_LowerLayer 2    /* Lower layer error                           */
 
167
#define SMBlibE_NotImpl 3       /* Function not yet implemented                */
 
168
#define SMBlibE_ProtLow 4       /* Protocol negotiated does not support req    */
 
169
#define SMBlibE_NoSpace 5       /* No space to allocate a structure            */
 
170
#define SMBlibE_BadParam 6      /* Bad parameters                              */
 
171
#define SMBlibE_NegNoProt 7     /* None of our protocols was liked             */
 
172
#define SMBlibE_SendFailed 8    /* Sending an SMB failed                       */
 
173
#define SMBlibE_RecvFailed 9    /* Receiving an SMB failed                     */
 
174
#define SMBlibE_GuestOnly 10    /* Logged in as guest                          */
 
175
#define SMBlibE_CallFailed 11   /* Call remote end failed                     */
 
176
#define SMBlibE_ProtUnknown 12  /* Protocol unknown                          */
 
177
#define SMBlibE_NoSuchMsg  13   /* Keep this up to date                       */
 
178
 
 
179
typedef struct {                /* A structure for a Dirent */
 
180
 
 
181
    unsigned char resume_key[21];       /* Don't touch this          */
 
182
    unsigned char file_attributes;      /* Attributes of file        */
 
183
    unsigned int date_time;     /* date and time of last mod */
 
184
    unsigned int size;
 
185
    char filename[13];          /* The name of the file      */
 
186
 
 
187
} SMB_CP_dirent;
 
188
 
 
189
#endif /* __SMBLIB_COMMON_H__ */