diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-06 18:11:19 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-06 18:11:19 +0000 |
commit | bd6467154e73412753c22022b1615cf471bfa297 (patch) | |
tree | c288658e2662a52279f65a5fe1227ac296cc430f /source3/include | |
parent | 32dedee7f006351c505801dc207dbc46ca08044a (diff) | |
download | samba-bd6467154e73412753c22022b1615cf471bfa297.tar.gz samba-bd6467154e73412753c22022b1615cf471bfa297.tar.bz2 samba-bd6467154e73412753c22022b1615cf471bfa297.zip |
spoolss openprinterex / closeprinter client-code.
experimental spoolopen <printer name> command added.
jean-francois, f.y.i. i changed the #define for SPOOLSS_OPENPRINTEREX from
op code 0x44 to 0x45.
(This used to be commit ef7fa58fd3c259c765c3bc82424d4c0f192ec90e)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 26 | ||||
-rwxr-xr-x | source3/include/rpc_spoolss.h | 35 |
2 files changed, 32 insertions, 29 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index e9880b55c3..c382d2d6ed 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2037,12 +2037,13 @@ BOOL samr_query_dispinfo(struct cli_state *cli, uint16 fnum, /*The following definitions come from rpc_client/cli_spoolss.c */ -BOOL spoolss_get_printer_data(struct cli_state *cli, uint16 fnum, - PRINTER_HND *hnd, - char *value_name, uint32 size); -BOOL spoolss_get_printer(struct cli_state *cli, uint16 fnum, - PRINTER_HND *hnd, uint32 level, - uint32 buf_size); +BOOL spoolss_open_printer_ex(struct cli_state *cli, uint16 fnum, + char *printername, + uint32 cbbuf, uint32 devmod, uint32 des_access, + char *station, + char *username, + PRINTER_HND *hnd); +BOOL spoolss_closeprinter(struct cli_state *cli, uint16 fnum, PRINTER_HND *hnd); /*The following definitions come from rpc_client/cli_srvsvc.c */ @@ -2926,20 +2927,20 @@ BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF *sec, prs_struct *ps, int depth); 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 spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth); -BOOL make_spoolss_io_q_open_printer(SPOOL_Q_OPEN_PRINTER *q_u, - uint32 unk_0, +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_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u, char *printername, - uint32 unk_1, uint32 cbbuf, uint32 devmod, uint32 des_access, + uint32 cbbuf, uint32 devmod, uint32 des_access, char *station, char *username); -BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth); BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, PRINTER_HND *handle, char *valuename, uint32 size); BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, PRINTER_HND *hnd); BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_startdocprinter(char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth); @@ -3414,8 +3415,7 @@ void cmd_sam_enum_groups(struct client_info *info); /*The following definitions come from rpcclient/cmd_spoolss.c */ -void cmd_spoolss_getprinterdata(struct client_info *info); -void cmd_spoolss_getprinter(struct client_info *info); +void cmd_spoolss_open_printer_ex(struct client_info *info); /*The following definitions come from rpcclient/cmd_srvsvc.c */ diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index e48d114dd1..0afc8d2b5d 100755 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -506,37 +506,40 @@ typedef struct s_buffer typedef struct printer_policy_info { uint8 data[PRINTER_HND_SIZE]; /* printer handle */ + } PRINTER_HND; -/* SPOOL_Q_OPEN_PRINTER request to open a printer */ -typedef struct spool_q_open_printer +/* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */ +typedef struct spool_q_open_printer_ex { - uint32 unknown0; + uint32 ptr; UNISTR2 printername; - uint32 unknown1; + uint32 unknown0; uint32 cbbuf; uint32 devmod; uint32 access_required; + uint32 unknown1; /* 0x0000 0001 */ uint32 unknown2; /* 0x0000 0001 */ - uint32 unknown3; /* 0x0000 0001 */ - uint32 unknown4; /* ??? */ - uint32 unknown5; /* 0x0000 001c */ - uint32 unknown6; /* ??? */ - uint32 unknown7; /* ??? */ - uint32 unknown8; /* 0x0000 0565 */ - uint32 unknown9; /* 0x0000 0002 */ + uint32 unknown3; /* ??? pointer? */ + uint32 unknown4; /* 0x0000 001c */ + uint32 unknown5; /* ??? e.g 0xb94dd0 */ + uint32 unknown6; /* ??? pointer? */ + uint32 unknown7; /* 0x0000 0565 */ + uint32 unknown8; /* 0x0000 0002 */ + uint32 unknown9; /* 0x0000 0000 */ uint32 unknown10; /* 0x0000 0000 */ - uint32 unknown11; /* ??? */ UNISTR2 station; UNISTR2 username; -} SPOOL_Q_OPEN_PRINTER; -/* SPOOL_Q_OPEN_PRINTER reply to an open printer */ -typedef struct spool_r_open_printer +} SPOOL_Q_OPEN_PRINTER_EX; + +/* SPOOL_Q_OPEN_PRINTER_EX reply to an open printer */ +typedef struct spool_r_open_printer_ex { PRINTER_HND handle; /* handle used along all transactions (20*uint8) */ uint32 status; -} SPOOL_R_OPEN_PRINTER; + +} SPOOL_R_OPEN_PRINTER_EX; typedef struct spool_q_getprinterdata { |