summaryrefslogtreecommitdiff
path: root/source3/rpcclient/display_spool.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-31 14:50:53 +0000
committerGerald Carter <jerry@samba.org>2000-07-31 14:50:53 +0000
commita6ef985df4a51c72dc9fc8bebbb9773098e702d6 (patch)
treea82149c214a230df67c611ea2335b7af04ba633a /source3/rpcclient/display_spool.c
parentcf152386f6ffc16e52aeccf04b6c55eed3a6938a (diff)
downloadsamba-a6ef985df4a51c72dc9fc8bebbb9773098e702d6.tar.gz
samba-a6ef985df4a51c72dc9fc8bebbb9773098e702d6.tar.bz2
samba-a6ef985df4a51c72dc9fc8bebbb9773098e702d6.zip
More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry (This used to be commit 45fbf31b698d6e754630590034cff712c0a716b1)
Diffstat (limited to 'source3/rpcclient/display_spool.c')
-rw-r--r--source3/rpcclient/display_spool.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/source3/rpcclient/display_spool.c b/source3/rpcclient/display_spool.c
index f2e9deccbd..1a88eed5ad 100644
--- a/source3/rpcclient/display_spool.c
+++ b/source3/rpcclient/display_spool.c
@@ -298,6 +298,28 @@ void display_printer_info_ctr(FILE *out_hnd, enum action_type action, uint32 lev
/****************************************************************************
connection info level 3 container display function
****************************************************************************/
+static void display_port_info_1_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, PORT_INFO_CTR *ctr)
+{
+ uint32 i = 0;
+ switch (action)
+ {
+ case ACTION_HEADER:
+ report(out_hnd, "Port Info Level 1:\n");
+ break;
+ case ACTION_ENUMERATE:
+ for (i=0; i<count; i++)
+ display_port_info_1(out_hnd, action, &ctr->port.info_1[i]);
+ break;
+ case ACTION_FOOTER:
+ report(out_hnd, "\n");
+ break;
+ }
+}
+
+/****************************************************************************
+connection info level 3 container display function
+****************************************************************************/
static void display_port_info_2_ctr(FILE *out_hnd, enum action_type action,
uint32 count, PORT_INFO_CTR *ctr)
{
@@ -324,6 +346,9 @@ void display_port_info_ctr(FILE *out_hnd, enum action_type action, uint32 level,
uint32 count, PORT_INFO_CTR *ctr)
{
switch (level) {
+ case 1:
+ display_port_info_1_ctr(out_hnd, action, count, ctr);
+ break;
case 2:
display_port_info_2_ctr(out_hnd, action, count, ctr);
break;
@@ -333,6 +358,27 @@ void display_port_info_ctr(FILE *out_hnd, enum action_type action, uint32 level,
}
}
+/****************************************************************************
+connection info container display function
+****************************************************************************/
+void display_port_info_1(FILE *out_hnd, enum action_type action, PORT_INFO_1 *i1)
+{
+ fstring buffer;
+
+ switch (action)
+ {
+ case ACTION_HEADER:
+ report(out_hnd, "Port:\n");
+ break;
+ case ACTION_ENUMERATE:
+ unistr_to_ascii(buffer, i1->port_name.buffer, sizeof(buffer)-1);
+ fprintf (out_hnd, "\tPort Name:\t[%s]\n\n", buffer);
+ break;
+ case ACTION_FOOTER:
+ report(out_hnd, "\n");
+ break;
+ }
+}
/****************************************************************************
connection info container display function