summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-24 18:05:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:18 -0500
commit9d009834a63e45e8a348419d4f5313757cff8c8d (patch)
treed0665f66b8d8273879564e0b64c8df7f7df23741 /source3/include
parenteb1adc527bb1b01f28fa86e7caa66c85181df764 (diff)
downloadsamba-9d009834a63e45e8a348419d4f5313757cff8c8d.tar.gz
samba-9d009834a63e45e8a348419d4f5313757cff8c8d.tar.bz2
samba-9d009834a63e45e8a348419d4f5313757cff8c8d.zip
r6040: finish out 'net rpc service list'
(This used to be commit 42588ba50cb1b47a00f3e0bed33ca3431eb8af14)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/rpc_client.h21
-rw-r--r--source3/include/rpc_svcctl.h2
2 files changed, 18 insertions, 5 deletions
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index bce9ec7f27..4ac2f43ee0 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -1,7 +1,7 @@
/*
Unix SMB/CIFS implementation.
SMB parameters and setup
- Copyright (C) Elrond 2000
+ Copyright (C) Gerald (Jerry) Carter 2005.
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
@@ -21,8 +21,21 @@
#ifndef _RPC_CLIENT_H
#define _RPC_CLIENT_H
-#if 0 /* JERRY */
-#include "rpc_client_proto.h"
-#endif
+/* macro to expand cookie-cutter code in cli_xxx() */
+
+#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, q_ps, r_ps, q_io_fn, r_io_fn, default_error) \
+{ r_out.status = default_error;\
+ prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \
+ prs_init( &r_ps, 0, ctx, UNMARSHALL );\
+ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
+ if ( rpc_api_pipe_req(pcli, pipe_num, opnum, &q_ps, &r_ps) ) {\
+ if (!r_io_fn("", &r_out, &r_ps, 0)) {\
+ r_out.status = default_error;\
+ }\
+ }\
+ }\
+ prs_mem_free( &q_ps );\
+ prs_mem_free( &r_ps );\
+}
#endif /* _RPC_CLIENT_H */
diff --git a/source3/include/rpc_svcctl.h b/source3/include/rpc_svcctl.h
index 55b7828d35..069d544b1f 100644
--- a/source3/include/rpc_svcctl.h
+++ b/source3/include/rpc_svcctl.h
@@ -50,7 +50,7 @@
/* SERVER_STATUS - state */
#define SVCCTL_STATE_ACTIVE 0x00000001
#define SVCCTL_STATE_INACTIVE 0x00000002
-#define SVCCTL_STATE_ALL ( SVC_STATE_ACTIVE | SVC_STATE_INACTIVE )
+#define SVCCTL_STATE_ALL ( SVCCTL_STATE_ACTIVE | SVCCTL_STATE_INACTIVE )
/* SERVER_STATUS - CurrentState */