diff options
author | Günther Deschner <gd@samba.org> | 2009-02-17 14:26:56 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-18 16:12:27 +0100 |
commit | 1cd34565d0ae07dfba773bc9e5679668137b724f (patch) | |
tree | 428861c3d8fbc18f882dec4d6a76409648fe5c27 /source3 | |
parent | 73123420623b5d6bfb5d39f9a937c71976bdc450 (diff) | |
download | samba-1cd34565d0ae07dfba773bc9e5679668137b724f.tar.gz samba-1cd34565d0ae07dfba773bc9e5679668137b724f.tar.bz2 samba-1cd34565d0ae07dfba773bc9e5679668137b724f.zip |
s3-spoolss: remove old spoolss_XcvData.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/nt_printing.h | 22 | ||||
-rw-r--r-- | source3/include/proto.h | 4 | ||||
-rw-r--r-- | source3/include/rpc_spoolss.h | 38 | ||||
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 170 |
4 files changed, 0 insertions, 234 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index f515a408f5..3bf51f2c9d 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -347,28 +347,6 @@ typedef struct #define SAMBA_PRINTER_PORT_NAME "Samba Printer Port" #endif - -/* - * Structures for the XcvDataPort() calls - */ - -#define PORT_PROTOCOL_DIRECT 1 -#define PORT_PROTOCOL_LPR 2 - -typedef struct { - fstring name; - uint32 version; - uint32 protocol; - fstring hostaddr; - fstring snmpcommunity; - fstring queue; - uint32 dblspool; - fstring ipaddr; - uint32 port; - bool enable_snmp; - uint32 snmp_index; -} NT_PORT_DATA_1; - /* DOS header format */ #define DOS_HEADER_SIZE 64 #define DOS_HEADER_MAGIC_OFFSET 0 diff --git a/source3/include/proto.h b/source3/include/proto.h index 04182fba24..3da5b987d1 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6042,10 +6042,6 @@ bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, uint32 flags, uint32 options, const char *localmachine, uint32 printerlocal, SPOOL_NOTIFY_OPTION *option); -bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth); -bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname ); -bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ; /* The following definitions come from rpc_server/srv_eventlog_lib.c */ diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index ba66e4213e..8eb8785bd6 100644 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -1497,44 +1497,6 @@ SPOOL_R_GETPRINTPROCESSORDIRECTORY; /**************************************/ -#define MAX_PORTNAME 64 -#define MAX_NETWORK_NAME 49 -#define MAX_SNMP_COMM_NAME 33 -#define MAX_QUEUE_NAME 33 -#define MAX_IPADDR_STRING 17 - -typedef struct { - uint16 portname[MAX_PORTNAME]; - uint32 version; - uint32 protocol; - uint32 size; - uint32 reserved; - uint16 hostaddress[MAX_NETWORK_NAME]; - uint16 snmpcommunity[MAX_SNMP_COMM_NAME]; - uint32 dblspool; - uint16 queue[MAX_QUEUE_NAME]; - uint16 ipaddress[MAX_IPADDR_STRING]; - uint32 port; - uint32 snmpenabled; - uint32 snmpdevindex; -} SPOOL_PORT_DATA_1; - -typedef struct { - POLICY_HND handle; - UNISTR2 dataname; - RPC_BUFFER indata; - uint32 indata_len; - uint32 offered; - uint32 unknown; -} SPOOL_Q_XCVDATAPORT; - -typedef struct { - RPC_BUFFER outdata; - uint32 needed; - uint32 unknown; - WERROR status; -} SPOOL_R_XCVDATAPORT; - #define PRINTER_DRIVER_VERSION 2 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86" diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 08613bb57f..2862b550fc 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -5543,173 +5543,3 @@ bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, return True; } - - -/******************************************************************* - ********************************************************************/ - -bool spoolss_io_q_xcvdataport(const char *desc, SPOOL_Q_XCVDATAPORT *q_u, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "spoolss_io_q_xcvdataport"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth)) - return False; - - if(!smb_io_unistr2("", &q_u->dataname, True, ps, depth)) - return False; - - if (!prs_align(ps)) - return False; - - if(!prs_rpcbuffer("", ps, depth, &q_u->indata)) - return False; - - if (!prs_align(ps)) - return False; - - if (!prs_uint32("indata_len", ps, depth, &q_u->indata_len)) - return False; - if (!prs_uint32("offered", ps, depth, &q_u->offered)) - return False; - if (!prs_uint32("unknown", ps, depth, &q_u->unknown)) - return False; - - return True; -} - -/******************************************************************* - ********************************************************************/ - -bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "spoolss_io_r_xcvdataport"); - depth++; - - if(!prs_align(ps)) - return False; - if(!prs_rpcbuffer("", ps, depth, &r_u->outdata)) - return False; - - if (!prs_align(ps)) - return False; - - if (!prs_uint32("needed", ps, depth, &r_u->needed)) - return False; - if (!prs_uint32("unknown", ps, depth, &r_u->unknown)) - return False; - - if(!prs_werror("status", ps, depth, &r_u->status)) - return False; - - return True; -} - -/******************************************************************* - ********************************************************************/ - -bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname ) -{ - UNISTR string; - - if ( !buf ) - return False; - - init_unistr( &string, dllname ); - - if ( !prs_unistr( "ui_dll", &buf->prs, 0, &string ) ) - return False; - - return True; -} - -/******************************************************************* - ********************************************************************/ - -#define PORT_DATA_1_PAD 540 - -static bool smb_io_port_data_1( const char *desc, RPC_BUFFER *buf, int depth, SPOOL_PORT_DATA_1 *p1 ) -{ - prs_struct *ps = &buf->prs; - uint8 padding[PORT_DATA_1_PAD]; - - prs_debug(ps, depth, desc, "smb_io_port_data_1"); - depth++; - - if(!prs_align(ps)) - return False; - - if( !prs_uint16s(True, "portname", ps, depth, p1->portname, MAX_PORTNAME)) - return False; - - if (!prs_uint32("version", ps, depth, &p1->version)) - return False; - if (!prs_uint32("protocol", ps, depth, &p1->protocol)) - return False; - if (!prs_uint32("size", ps, depth, &p1->size)) - return False; - if (!prs_uint32("reserved", ps, depth, &p1->reserved)) - return False; - - if( !prs_uint16s(True, "hostaddress", ps, depth, p1->hostaddress, MAX_NETWORK_NAME)) - return False; - if( !prs_uint16s(True, "snmpcommunity", ps, depth, p1->snmpcommunity, MAX_SNMP_COMM_NAME)) - return False; - - if (!prs_uint32("dblspool", ps, depth, &p1->dblspool)) - return False; - - if( !prs_uint16s(True, "queue", ps, depth, p1->queue, MAX_QUEUE_NAME)) - return False; - if( !prs_uint16s(True, "ipaddress", ps, depth, p1->ipaddress, MAX_IPADDR_STRING)) - return False; - - if( !prs_uint8s(False, "", ps, depth, padding, PORT_DATA_1_PAD)) - return False; - - if (!prs_uint32("port", ps, depth, &p1->port)) - return False; - if (!prs_uint32("snmpenabled", ps, depth, &p1->snmpenabled)) - return False; - if (!prs_uint32("snmpdevindex", ps, depth, &p1->snmpdevindex)) - return False; - - return True; -} - -/******************************************************************* - ********************************************************************/ - -bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) -{ - SPOOL_PORT_DATA_1 spdata_1; - - ZERO_STRUCT( spdata_1 ); - - if ( !smb_io_port_data_1( "port_data_1", buf, 0, &spdata_1 ) ) - return False; - - rpcstr_pull(port1->name, spdata_1.portname, sizeof(port1->name), -1, 0); - rpcstr_pull(port1->queue, spdata_1.queue, sizeof(port1->queue), -1, 0); - rpcstr_pull(port1->hostaddr, spdata_1.hostaddress, sizeof(port1->hostaddr), -1, 0); - - port1->port = spdata_1.port; - - switch ( spdata_1.protocol ) { - case 1: - port1->protocol = PORT_PROTOCOL_DIRECT; - break; - case 2: - port1->protocol = PORT_PROTOCOL_LPR; - break; - default: - DEBUG(3,("convert_port_data_1: unknown protocol [%d]!\n", - spdata_1.protocol)); - return False; - } - - return True; -} |