summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-03-10 17:12:24 +0000
committerJean-François Micouleau <jfm@samba.org>2000-03-10 17:12:24 +0000
commite0ebb76a7453c07c16e8f736233226a774ab58e8 (patch)
tree4fd3de938678780c5c443e68ebb0e258b1ca9447 /source3/include
parent115d98e639b94fdd0773bfb9516af14d857c59d2 (diff)
downloadsamba-e0ebb76a7453c07c16e8f736233226a774ab58e8.tar.gz
samba-e0ebb76a7453c07c16e8f736233226a774ab58e8.tar.bz2
samba-e0ebb76a7453c07c16e8f736233226a774ab58e8.zip
getprinter level 0: was to short, found most of the fields, undocumented,
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/nt_printing.h26
-rw-r--r--source3/include/nterr.h11
-rw-r--r--source3/include/proto.h16
-rwxr-xr-xsource3/include/rpc_spoolss.h66
-rw-r--r--source3/include/smb.h15
5 files changed, 82 insertions, 52 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 99a427c32d..7d4c4e9dd5 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -1,3 +1,25 @@
+/*
+ Unix SMB/Netbios implementation.
+ Version 1.9.
+ SMB parameters and setup
+ Copyright (C) Andrew Tridgell 1992-2000,
+ Copyright (C) Jean Francois Micouleau 1998-2000.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
#ifndef NT_PRINTING_H_
#define NT_PRINTING_H_
@@ -195,7 +217,6 @@ typedef struct nt_printer_info_level_2
fstring sharename;
fstring portname;
fstring drivername;
- fstring comment;
fstring location;
NT_DEVICEMODE *devmode;
fstring sepfile;
@@ -205,6 +226,9 @@ typedef struct nt_printer_info_level_2
NT_PRINTER_PARAM *specific;
/* SEC_DESC_BUF *secdesc; */
/* not used but ... and how ??? */
+ uint32 changeid;
+ uint32 c_setprinter;
+ time_t setuptime;
} NT_PRINTER_INFO_LEVEL_2;
typedef struct nt_printer_info_level
diff --git a/source3/include/nterr.h b/source3/include/nterr.h
index df2cde61f7..d2fe621b29 100644
--- a/source3/include/nterr.h
+++ b/source3/include/nterr.h
@@ -4,17 +4,6 @@
#define STATUS_BUFFER_OVERFLOW (5)
#define STATUS_MORE_ENTRIES (0x105)
-/* Win32 Error codes. */
-
-#define ERROR_ACCESS_DENIED (5)
-#define ERROR_INVALID_HANDLE (6)
-#define ERROR_INVALID_PARAMETER (87)
-#define ERROR_INSUFFICIENT_BUFFER (122)
-#define ERROR_INVALID_NAME (123)
-#define ERROR_NO_MORE_ITEMS (259)
-#define ERROR_INVALID_PRINTER_NAME (1801)
-#define ERROR_INVALID_DATATYPE (1804)
-
/* these are the NT error codes less than 1000. They are here for when
we start supporting NT error codes in Samba. They were extracted
using a loop in smbclient then printing a netmon sniff to a file */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 20a459120f..6a09935226 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -820,15 +820,15 @@ BOOL msdfs_open(BOOL update);
BOOL add_junction_entry(struct junction_map* junction);
BOOL get_junction_entry(struct junction_map* junction);
BOOL isDfsShare(char* svc,char* vol);
-void msdfs_close();
-void msdfs_end();
+void msdfs_close(void);
+void msdfs_end(void);
/*The following definitions come from msdfs/parse_dfs_map.c */
BOOL parse_referral(char* s, struct referral* ref);
-void load_dfsmaps();
+void load_dfsmaps(void);
BOOL load_dfsmap(char* fname, int snum);
-void load_dfsmaps();
+void load_dfsmaps(void);
/*The following definitions come from nmbd/asyncdns.c */
@@ -2338,7 +2338,7 @@ BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data,
prs_struct *ps, int depth);
BOOL make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u, fstring printername, fstring datatype,
- uint32 access_required, fstring client_name, fstring user_name);
+ uint32 access_required, fstring clientname, fstring user_name);
BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth);
BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
@@ -2458,7 +2458,7 @@ BOOL spoolss_io_q_enumprintmonitors(char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u,
BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
BOOL spoolss_io_q_enumprinterdata(char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth);
-BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u, POLICY_HND *hnd, uint32 index, uint32 valuelen, uint32 datalen);
+BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u, POLICY_HND *hnd, uint32 idx, uint32 valuelen, uint32 datalen);
BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value,
@@ -2704,11 +2704,11 @@ uint32 _spoolss_addprinterdriver( const UNISTR2 *server_name,
uint32 _spoolss_getprinterdriverdirectory(UNISTR2 *name, UNISTR2 *uni_environment, uint32 level,
NEW_BUFFER *buffer, uint32 offered,
uint32 *needed);
-uint32 _spoolss_enumprinterdata(const POLICY_HND *handle, uint32 index,
+uint32 _spoolss_enumprinterdata(const POLICY_HND *handle, uint32 idx,
uint32 in_value_len, uint32 in_data_len,
uint32 *out_max_value_len, uint16 **out_value, uint32 *out_value_len,
uint32 *out_type,
- uint32 *out_max_data_len, uint8 **out_data, uint32 *out_data_len);
+ uint32 *out_max_data_len, uint8 **data_out, uint32 *out_data_len);
uint32 _spoolss_setprinterdata( const POLICY_HND *handle,
const UNISTR2 *value,
uint32 type,
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index f9423245eb..21fa9b5586 100755
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -712,35 +712,49 @@ typedef struct printer_info_0
UNISTR printername;
UNISTR servername;
uint32 cjobs;
- uint32 attributes;
- uint32 unknown0;
- uint32 unknown1;
- uint32 unknown2;
- uint32 unknown3;
- uint32 unknown4;
- uint32 unknown5;
- uint32 unknown6;
- uint16 majorversion;
- uint16 buildversion;
+ uint32 total_jobs;
+ uint32 total_bytes;
+
+ uint16 year;
+ uint16 month;
+ uint16 dayofweek;
+ uint16 day;
+ uint16 hour;
+ uint16 minute;
+ uint16 second;
+ uint16 milliseconds;
+
+ uint32 global_counter;
+ uint32 total_pages;
+
+ uint16 major_version;
+ uint16 build_version;
+
uint32 unknown7;
uint32 unknown8;
uint32 unknown9;
- uint32 unknown10;
+ uint32 session_counter;
uint32 unknown11;
- uint32 unknown12;
+ uint32 printer_errors;
uint32 unknown13;
uint32 unknown14;
uint32 unknown15;
uint32 unknown16;
- uint32 unknown17;
+ uint32 change_id;
uint32 unknown18;
uint32 status;
uint32 unknown20;
- uint32 unknown21;
+ uint32 c_setprinter;
+
uint16 unknown22;
- uint32 unknown23;
-}
-PRINTER_INFO_0;
+ uint16 unknown23;
+ uint16 unknown24;
+ uint16 unknown25;
+ uint16 unknown26;
+ uint16 unknown27;
+ uint16 unknown28;
+ uint16 unknown29;
+} PRINTER_INFO_0;
typedef struct printer_info_1
{
@@ -830,11 +844,7 @@ typedef struct spool_r_getprinter
NEW_BUFFER *buffer;
uint32 needed;
uint32 status;
-
-}
-SPOOL_R_GETPRINTER;
-
-struct _print_queue_struct;
+} SPOOL_R_GETPRINTER;
struct s_notify_info_data_table
{
@@ -842,16 +852,15 @@ struct s_notify_info_data_table
uint16 field;
char *name;
uint32 size;
- void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA * data,
- struct _print_queue_struct * queue,
- NT_PRINTER_INFO_LEVEL * printer);
+ void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data,
+ print_queue_struct *queue,
+ NT_PRINTER_INFO_LEVEL *printer);
};
typedef struct driver_info_1
{
UNISTR name;
-}
-DRIVER_INFO_1;
+} DRIVER_INFO_1;
typedef struct driver_info_2
{
@@ -861,8 +870,7 @@ typedef struct driver_info_2
UNISTR driverpath;
UNISTR datafile;
UNISTR configfile;
-}
-DRIVER_INFO_2;
+} DRIVER_INFO_2;
typedef struct driver_info_3
{
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 447f2bd3a6..53454cc414 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -169,11 +169,20 @@ implemented */
#define ERRnotconnected 233 /* No process on other end of named pipe */
#define ERRmoredata 234 /* More data to be returned */
#define ERRbaddirectory 267 /* Invalid directory name in a path. */
-#define ERROR_EAS_DIDNT_FIT 275 /* Extended attributes didn't fit */
-#define ERROR_EAS_NOT_SUPPORTED 282 /* Extended attributes not supported */
-#define ERROR_NOTIFY_ENUM_DIR 1022 /* Buffer too small to return change notify. */
#define ERRunknownipc 2142
+#define ERROR_ACCESS_DENIED (5)
+#define ERROR_INVALID_HANDLE (6)
+#define ERROR_INVALID_PARAMETER (87)
+#define ERROR_INSUFFICIENT_BUFFER (122)
+#define ERROR_INVALID_NAME (123)
+#define ERROR_INVALID_LEVEL (124)
+#define ERROR_NO_MORE_ITEMS (259)
+#define ERROR_EAS_DIDNT_FIT (275) /* Extended attributes didn't fit */
+#define ERROR_EAS_NOT_SUPPORTED (282) /* Extended attributes not supported */
+#define ERROR_NOTIFY_ENUM_DIR (1022) /* Buffer too small to return change notify. */
+#define ERROR_INVALID_PRINTER_NAME (1801)
+#define ERROR_INVALID_DATATYPE (1804)
/* here's a special one from observing NT */
#define ERRnoipc 66 /* don't support ipc */