diff options
author | Gerald Carter <jerry@samba.org> | 2006-03-04 00:05:40 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-03-04 00:05:40 +0000 |
commit | d7bdd3fd148ce146b84b4d79d09d174392de2e6f (patch) | |
tree | b5404189ff1c39f48eed1576ec57a4ac6b06dc87 /source/include | |
parent | 1302b1bfa4cbd0fc0f266e50ccbdcf69f7c74f3a (diff) | |
download | samba-d7bdd3fd148ce146b84b4d79d09d174392de2e6f.tar.gz samba-d7bdd3fd148ce146b84b4d79d09d174392de2e6f.tar.xz samba-d7bdd3fd148ce146b84b4d79d09d174392de2e6f.zip |
r13829: From the "It's not pretty but it works" category
* Finish prototype of the "add port command" implementation
Format is "addportcommand portname deviceURI"
* DeviceURI is either
- socket://hostname:port/
- lpr://hostname/queue
depending on what the client sent in the request
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/nt_printing.h | 22 | ||||
-rwxr-xr-x | source/include/rpc_spoolss.h | 20 |
2 files changed, 40 insertions, 2 deletions
diff --git a/source/include/nt_printing.h b/source/include/nt_printing.h index a2aba3ed26e..5bd64ae7be3 100644 --- a/source/include/nt_printing.h +++ b/source/include/nt_printing.h @@ -348,6 +348,28 @@ 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/source/include/rpc_spoolss.h b/source/include/rpc_spoolss.h index f2f789a49e0..4d24ee4f0f8 100755 --- a/source/include/rpc_spoolss.h +++ b/source/include/rpc_spoolss.h @@ -2174,7 +2174,23 @@ SPOOL_R_GETPRINTPROCESSORDIRECTORY; /**************************************/ -typedef struct spool_q_xcvdataport { +typedef struct { + UNISTR portname; /* constant 64 wchars */ + uint32 version; + uint32 protocol; + uint32 size; + uint32 reserved; + UNISTR hostaddress; /* constant 49 wchars */ + UNISTR snmpcommunity; /* constant 33 wchars */ + uint32 dblspool; + UNISTR queue; /* constant 33 wchars */ + UNISTR ipaddress; /* constant 17 wchars */ + uint32 port; + uint32 snmpenabled; + uint32 snmpdevindex; +} SPOOL_PORT_DATA_1; + +typedef struct { POLICY_HND handle; UNISTR2 dataname; RPC_BUFFER indata; @@ -2183,7 +2199,7 @@ typedef struct spool_q_xcvdataport { uint32 unknown; } SPOOL_Q_XCVDATAPORT; -typedef struct spool_r_xcvdataport { +typedef struct { RPC_BUFFER outdata; uint32 needed; uint32 unknown; |