diff options
author | Luke Leighton <lkcl@samba.org> | 2000-04-03 11:31:17 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-04-03 11:31:17 +0000 |
commit | 7879877518b9ca0e14286128a48ccea87ca0d252 (patch) | |
tree | a7d1d475ec754b7a5d174d157839e5ee847af9c0 /source/include | |
parent | 70eedfacb2efa41aaaadbff355e11ee7f2f7c1bd (diff) | |
download | samba-7879877518b9ca0e14286128a48ccea87ca0d252.tar.gz |
merge from cvs main of jean-francois' spoolss work.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/lib_smb_proto.h | 1 | ||||
-rw-r--r-- | source/include/nt_printing.h | 30 | ||||
-rw-r--r-- | source/include/proto.h | 19 | ||||
-rw-r--r-- | source/include/rpc_parse_proto.h | 9 | ||||
-rwxr-xr-x | source/include/rpc_spoolss.h | 107 |
5 files changed, 113 insertions, 53 deletions
diff --git a/source/include/lib_smb_proto.h b/source/include/lib_smb_proto.h index 4cc87907056..c384f4098f2 100644 --- a/source/include/lib_smb_proto.h +++ b/source/include/lib_smb_proto.h @@ -632,6 +632,7 @@ BOOL prs_append_data(prs_struct * ps, const char *data, int len); BOOL prs_add_data(prs_struct * ps, const char *data, int len); void prs_switch_type(prs_struct *ps, BOOL io); void prs_force_dynamic(prs_struct *ps); +uint32 prs_data_size(prs_struct *ps); uint32 prs_offset(prs_struct *ps); BOOL prs_set_offset(prs_struct *ps, uint32 offset); void prs_mem_free(prs_struct *ps); diff --git a/source/include/nt_printing.h b/source/include/nt_printing.h index 22c837c7481..7d4c4e9dd55 100644 --- a/source/include/nt_printing.h +++ b/source/include/nt_printing.h @@ -1,3 +1,28 @@ +/* + 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_ + #define ORIENTATION 0x00000001L #define PAPERSIZE 0x00000002L #define PAPERLENGTH 0x00000004L @@ -192,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; @@ -202,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 @@ -235,3 +262,4 @@ typedef struct _form UNISTR2 name; } FORM; */ +#endif /* NT_PRINTING_H_ */ diff --git a/source/include/proto.h b/source/include/proto.h index 146e964c8b1..9b25b9b55cc 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -930,6 +930,11 @@ const char *get_sid_name_use_str(uint32 sid_name_use); BOOL do_file_lock(int fd, int waitsecs, int type); BOOL file_lock(int fd, int type, int secs, int *plock_depth); BOOL file_unlock(int fd, int *plock_depth); +uint32 map_lock_offset(uint32 high, uint32 low); +SMB_OFF_T get_lock_count(char *data, int data_offset, BOOL large_file_format, + BOOL *err); +SMB_OFF_T get_lock_offset(char *data, int data_offset, BOOL large_file_format, + BOOL *err); BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); void *startfileent(char *pfile, char *s_readbuf, int bufsize, int *file_lock_depth, BOOL update); @@ -3784,6 +3789,7 @@ BOOL prs_append_data(prs_struct * ps, const char *data, int len); BOOL prs_add_data(prs_struct * ps, const char *data, int len); void prs_switch_type(prs_struct *ps, BOOL io); void prs_force_dynamic(prs_struct *ps); +uint32 prs_data_size(prs_struct *ps); uint32 prs_offset(prs_struct *ps); BOOL prs_set_offset(prs_struct *ps, uint32 offset); void prs_mem_free(prs_struct *ps); @@ -4752,10 +4758,6 @@ int reply_copy(connection_struct * conn, char *inbuf, char *outbuf, int dum_size, int dum_buffsize); int reply_setdir(connection_struct * conn, char *inbuf, char *outbuf, int dum_size, int dum_buffsize); -SMB_OFF_T get_lock_count(char *data, int data_offset, BOOL large_file_format, - BOOL *err); -SMB_OFF_T get_lock_offset(char *data, int data_offset, BOOL large_file_format, - BOOL *err); int reply_lockingX(connection_struct * conn, char *inbuf, char *outbuf, int length, int bufsize); int reply_readbmpx(connection_struct * conn, char *inbuf, char *outbuf, @@ -4956,9 +4958,10 @@ uint32 _spoolss_enumprinters( uint32 flags, const UNISTR2 *servername, uint32 le uint32 *needed, uint32 *returned); uint32 _spoolss_getprinter(POLICY_HND *handle, uint32 level, NEW_BUFFER *buffer, uint32 offered, uint32 *needed); -uint32 _spoolss_getprinterdriver2(const POLICY_HND *handle, const UNISTR2 *uni_arch, uint32 level, uint32 unknown, +uint32 _spoolss_getprinterdriver2(const POLICY_HND *handle, const UNISTR2 *uni_arch, uint32 level, + uint32 clientmajorversion, uint32 clientminorversion, NEW_BUFFER *buffer, uint32 offered, - uint32 *needed, uint32 *unknown0, uint32 *unknown1); + uint32 *needed, uint32 *servermajorversion, uint32 *serverminorversion); uint32 _spoolss_startpageprinter(const POLICY_HND *handle); uint32 _spoolss_endpageprinter(const POLICY_HND *handle); uint32 _spoolss_startdocprinter( const POLICY_HND *handle, uint32 level, @@ -4996,7 +4999,7 @@ uint32 _spoolss_enumports( UNISTR2 *name, uint32 level, uint32 _spoolss_addprinterex( const UNISTR2 *uni_srv_name, uint32 level, const SPOOL_PRINTER_INFO_LEVEL *info, uint32 unk0, uint32 unk1, uint32 unk2, uint32 unk3, - uint32 user_switch, const SPOOL_USER_CTR *user, + uint32 user_switch, const SPOOL_USER_CTR *user, POLICY_HND *handle); uint32 _spoolss_addprinterdriver( const UNISTR2 *server_name, uint32 level, @@ -5008,7 +5011,7 @@ 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_pdata, 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/source/include/rpc_parse_proto.h b/source/include/rpc_parse_proto.h index cd1f0a44fbc..ab36786297b 100644 --- a/source/include/rpc_parse_proto.h +++ b/source/include/rpc_parse_proto.h @@ -937,7 +937,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 cli_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, @@ -999,6 +999,10 @@ uint32 spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1 *info); uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info); uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info); uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info); +BOOL make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, + const POLICY_HND *hnd, fstring architecture, + uint32 level, uint32 clientmajor, uint32 clientminor, + NEW_BUFFER *buffer, uint32 offered); BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_getprinterdriver2(char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_enumprinters(SPOOL_Q_ENUMPRINTERS *q_u, uint32 flags, @@ -1008,6 +1012,8 @@ BOOL spoolss_io_q_enumprinters(char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct BOOL new_spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth); BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_getprinter(char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_getprinter(SPOOL_Q_GETPRINTER *q_u, const POLICY_HND *hnd, uint32 level, + NEW_BUFFER *buffer, uint32 offered); BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth); @@ -1032,6 +1038,7 @@ BOOL spoolss_io_q_enumforms(char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, BOOL new_spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth); BOOL new_spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_enumports(char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth); +BOOL spool_io_printer_info_level_1(char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth); BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth); BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth); BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth); diff --git a/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index e25eabe4412..0100fb007ef 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -332,6 +332,7 @@ #define PRINTER_ENUM_NETWORK 0x00000040 /* the flags of each printers */ +#define PRINTER_ENUM_UNKNOWN_8 0x00000008 #define PRINTER_ENUM_EXPAND 0x00004000 #define PRINTER_ENUM_CONTAINER 0x00008000 #define PRINTER_ENUM_ICONMASK 0x00ff0000 @@ -711,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 { @@ -789,6 +804,7 @@ SPOOL_Q_ENUMPRINTERS; typedef struct printer_info_ctr_info { + PRINTER_INFO_0 *printers_0; PRINTER_INFO_1 *printers_1; PRINTER_INFO_2 *printers_2; } @@ -829,9 +845,7 @@ typedef struct spool_r_getprinter NEW_BUFFER *buffer; uint32 needed; uint32 status; - -} -SPOOL_R_GETPRINTER; +} SPOOL_R_GETPRINTER; struct s_notify_info_data_table { @@ -839,16 +853,15 @@ struct s_notify_info_data_table uint16 field; char *name; uint32 size; - void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA * data, - 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 { @@ -858,8 +871,7 @@ typedef struct driver_info_2 UNISTR driverpath; UNISTR datafile; UNISTR configfile; -} -DRIVER_INFO_2; +} DRIVER_INFO_2; typedef struct driver_info_3 { @@ -870,7 +882,7 @@ typedef struct driver_info_3 UNISTR datafile; UNISTR configfile; UNISTR helpfile; - UNISTR **dependentfiles; + uint16 *dependentfiles; UNISTR monitorname; UNISTR defaultdatatype; } @@ -878,16 +890,11 @@ DRIVER_INFO_3; typedef struct driver_info_info { - union - { - DRIVER_INFO_1 *info1; - DRIVER_INFO_2 *info2; - DRIVER_INFO_3 *info3; - } - driver; - + DRIVER_INFO_1 *info1; + DRIVER_INFO_2 *info2; + DRIVER_INFO_3 *info3; } -DRIVER_INFO; +PRINTER_DRIVER_CTR; typedef struct spool_q_getprinterdriver2 { @@ -897,7 +904,8 @@ typedef struct spool_q_getprinterdriver2 uint32 level; NEW_BUFFER *buffer; uint32 offered; - uint32 unknown; + uint32 clientmajorversion; + uint32 clientminorversion; } SPOOL_Q_GETPRINTERDRIVER2; @@ -905,8 +913,8 @@ typedef struct spool_r_getprinterdriver2 { NEW_BUFFER *buffer; uint32 needed; - uint32 unknown0; - uint32 unknown1; + uint32 servermajorversion; + uint32 serverminorversion; uint32 status; } SPOOL_R_GETPRINTERDRIVER2; @@ -1180,6 +1188,17 @@ typedef struct spool_r_enumforms SPOOL_R_ENUMFORMS; +typedef struct spool_printer_info_level_1 +{ + uint32 flags; + uint32 description_ptr; + uint32 name_ptr; + uint32 comment_ptr; + UNISTR2 description; + UNISTR2 name; + UNISTR2 comment; +} SPOOL_PRINTER_INFO_LEVEL_1; + typedef struct spool_printer_info_level_2 { uint32 servername_ptr; @@ -1222,6 +1241,7 @@ typedef struct spool_printer_info_level { uint32 level; uint32 info_ptr; + SPOOL_PRINTER_INFO_LEVEL_1 *info_1; SPOOL_PRINTER_INFO_LEVEL_2 *info_2; } SPOOL_PRINTER_INFO_LEVEL; @@ -1525,7 +1545,6 @@ typedef struct spool_q_setprinterdata uint8 *data; uint32 real_len; uint32 numeric_data; - } SPOOL_Q_SETPRINTERDATA; @@ -1597,9 +1616,11 @@ typedef struct pjob_info_info JOB_INFO_1 *job_info_1; JOB_INFO_2 *job_info_2; void *info; - } job; + } + job; -} PJOB_INFO; +} +PJOB_INFO; typedef struct spool_r_getjob { |