summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr/srv_srvsvc.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-21 14:07:38 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-21 14:07:38 +0100
commit1d59fd4d733007ccabb69c945e1da2208c376b96 (patch)
treec9e7cd077b232c781ba1fc28f326998fba6669e0 /librpc/gen_ndr/srv_srvsvc.c
parentb64b78e4cc2aaed779a07dbcb180323bfb3652d6 (diff)
parent11a25f90500b64f4b43907f6f311dc5e9731da39 (diff)
downloadsamba-1d59fd4d733007ccabb69c945e1da2208c376b96.tar.gz
samba-1d59fd4d733007ccabb69c945e1da2208c376b96.tar.bz2
samba-1d59fd4d733007ccabb69c945e1da2208c376b96.zip
Merge branch 'v4-0-test' of /home/jelmer/samba4
Diffstat (limited to 'librpc/gen_ndr/srv_srvsvc.c')
-rw-r--r--librpc/gen_ndr/srv_srvsvc.c492
1 files changed, 492 insertions, 0 deletions
diff --git a/librpc/gen_ndr/srv_srvsvc.c b/librpc/gen_ndr/srv_srvsvc.c
index 501754d1d6..1286aad739 100644
--- a/librpc/gen_ndr/srv_srvsvc.c
+++ b/librpc/gen_ndr/srv_srvsvc.c
@@ -4190,6 +4190,498 @@ void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
*n_fns = sizeof(api_srvsvc_cmds) / sizeof(struct api_struct);
}
+NTSTATUS rpc_srvsvc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
+{
+ if (cli->pipes_struct == NULL) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ switch (opnum)
+ {
+ case NDR_SRVSVC_NETCHARDEVENUM: {
+ struct srvsvc_NetCharDevEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetCharDevEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVGETINFO: {
+ struct srvsvc_NetCharDevGetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetCharDevGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVCONTROL: {
+ struct srvsvc_NetCharDevControl *r = _r;
+ r->out.result = _srvsvc_NetCharDevControl(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVQENUM: {
+ struct srvsvc_NetCharDevQEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetCharDevQEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVQGETINFO: {
+ struct srvsvc_NetCharDevQGetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetCharDevQGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVQSETINFO: {
+ struct srvsvc_NetCharDevQSetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.parm_error = r->in.parm_error;
+ r->out.result = _srvsvc_NetCharDevQSetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVQPURGE: {
+ struct srvsvc_NetCharDevQPurge *r = _r;
+ r->out.result = _srvsvc_NetCharDevQPurge(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCHARDEVQPURGESELF: {
+ struct srvsvc_NetCharDevQPurgeSelf *r = _r;
+ r->out.result = _srvsvc_NetCharDevQPurgeSelf(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETCONNENUM: {
+ struct srvsvc_NetConnEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetConnEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETFILEENUM: {
+ struct srvsvc_NetFileEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetFileEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETFILEGETINFO: {
+ struct srvsvc_NetFileGetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetFileGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETFILECLOSE: {
+ struct srvsvc_NetFileClose *r = _r;
+ r->out.result = _srvsvc_NetFileClose(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSESSENUM: {
+ struct srvsvc_NetSessEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetSessEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSESSDEL: {
+ struct srvsvc_NetSessDel *r = _r;
+ r->out.result = _srvsvc_NetSessDel(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREADD: {
+ struct srvsvc_NetShareAdd *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.parm_error = r->in.parm_error;
+ r->out.result = _srvsvc_NetShareAdd(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREENUMALL: {
+ struct srvsvc_NetShareEnumAll *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetShareEnumAll(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREGETINFO: {
+ struct srvsvc_NetShareGetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetShareGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHARESETINFO: {
+ struct srvsvc_NetShareSetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.parm_error = r->in.parm_error;
+ r->out.result = _srvsvc_NetShareSetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREDEL: {
+ struct srvsvc_NetShareDel *r = _r;
+ r->out.result = _srvsvc_NetShareDel(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREDELSTICKY: {
+ struct srvsvc_NetShareDelSticky *r = _r;
+ r->out.result = _srvsvc_NetShareDelSticky(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHARECHECK: {
+ struct srvsvc_NetShareCheck *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.type = talloc_zero(mem_ctx, enum srvsvc_ShareType);
+ if (r->out.type == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetShareCheck(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSRVGETINFO: {
+ struct srvsvc_NetSrvGetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetSrvGetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSRVSETINFO: {
+ struct srvsvc_NetSrvSetInfo *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.parm_error = r->in.parm_error;
+ r->out.result = _srvsvc_NetSrvSetInfo(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETDISKENUM: {
+ struct srvsvc_NetDiskEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = r->in.info;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetDiskEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSERVERSTATISTICSGET: {
+ struct srvsvc_NetServerStatisticsGet *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.stats = talloc_zero(mem_ctx, struct srvsvc_Statistics *);
+ if (r->out.stats == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetServerStatisticsGet(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETTRANSPORTADD: {
+ struct srvsvc_NetTransportAdd *r = _r;
+ r->out.result = _srvsvc_NetTransportAdd(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETTRANSPORTENUM: {
+ struct srvsvc_NetTransportEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.transports = r->in.transports;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetTransportEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETTRANSPORTDEL: {
+ struct srvsvc_NetTransportDel *r = _r;
+ r->out.result = _srvsvc_NetTransportDel(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETREMOTETOD: {
+ struct srvsvc_NetRemoteTOD *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, struct srvsvc_NetRemoteTODInfo *);
+ if (r->out.info == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetRemoteTOD(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSETSERVICEBITS: {
+ struct srvsvc_NetSetServiceBits *r = _r;
+ r->out.result = _srvsvc_NetSetServiceBits(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETPATHTYPE: {
+ struct srvsvc_NetPathType *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.pathtype = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.pathtype == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetPathType(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETPATHCANONICALIZE: {
+ struct srvsvc_NetPathCanonicalize *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.pathtype = r->in.pathtype;
+ r->out.can_path = talloc_zero_array(mem_ctx, uint8_t, r->in.maxbuf);
+ if (r->out.can_path == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetPathCanonicalize(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETPATHCOMPARE: {
+ struct srvsvc_NetPathCompare *r = _r;
+ r->out.result = _srvsvc_NetPathCompare(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETNAMEVALIDATE: {
+ struct srvsvc_NetNameValidate *r = _r;
+ r->out.result = _srvsvc_NetNameValidate(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRPRNAMECANONICALIZE: {
+ struct srvsvc_NETRPRNAMECANONICALIZE *r = _r;
+ r->out.result = _srvsvc_NETRPRNAMECANONICALIZE(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETPRNAMECOMPARE: {
+ struct srvsvc_NetPRNameCompare *r = _r;
+ r->out.result = _srvsvc_NetPRNameCompare(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREENUM: {
+ struct srvsvc_NetShareEnum *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
+ r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.totalentries == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetShareEnum(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREDELSTART: {
+ struct srvsvc_NetShareDelStart *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.hnd = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.hnd == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetShareDelStart(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSHAREDELCOMMIT: {
+ struct srvsvc_NetShareDelCommit *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.hnd = r->in.hnd;
+ r->out.result = _srvsvc_NetShareDelCommit(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETGETFILESECURITY: {
+ struct srvsvc_NetGetFileSecurity *r = _r;
+ ZERO_STRUCT(r->out);
+ r->out.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf *);
+ if (r->out.sd_buf == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _srvsvc_NetGetFileSecurity(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSETFILESECURITY: {
+ struct srvsvc_NetSetFileSecurity *r = _r;
+ r->out.result = _srvsvc_NetSetFileSecurity(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSERVERTRANSPORTADDEX: {
+ struct srvsvc_NetServerTransportAddEx *r = _r;
+ r->out.result = _srvsvc_NetServerTransportAddEx(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETSERVERSETSERVICEBITSEX: {
+ struct srvsvc_NetServerSetServiceBitsEx *r = _r;
+ r->out.result = _srvsvc_NetServerSetServiceBitsEx(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSGETVERSION: {
+ struct srvsvc_NETRDFSGETVERSION *r = _r;
+ r->out.result = _srvsvc_NETRDFSGETVERSION(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSCREATELOCALPARTITION: {
+ struct srvsvc_NETRDFSCREATELOCALPARTITION *r = _r;
+ r->out.result = _srvsvc_NETRDFSCREATELOCALPARTITION(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSDELETELOCALPARTITION: {
+ struct srvsvc_NETRDFSDELETELOCALPARTITION *r = _r;
+ r->out.result = _srvsvc_NETRDFSDELETELOCALPARTITION(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE: {
+ struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r = _r;
+ r->out.result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSSETSERVERINFO: {
+ struct srvsvc_NETRDFSSETSERVERINFO *r = _r;
+ r->out.result = _srvsvc_NETRDFSSETSERVERINFO(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSCREATEEXITPOINT: {
+ struct srvsvc_NETRDFSCREATEEXITPOINT *r = _r;
+ r->out.result = _srvsvc_NETRDFSCREATEEXITPOINT(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSDELETEEXITPOINT: {
+ struct srvsvc_NETRDFSDELETEEXITPOINT *r = _r;
+ r->out.result = _srvsvc_NETRDFSDELETEEXITPOINT(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSMODIFYPREFIX: {
+ struct srvsvc_NETRDFSMODIFYPREFIX *r = _r;
+ r->out.result = _srvsvc_NETRDFSMODIFYPREFIX(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSFIXLOCALVOLUME: {
+ struct srvsvc_NETRDFSFIXLOCALVOLUME *r = _r;
+ r->out.result = _srvsvc_NETRDFSFIXLOCALVOLUME(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO: {
+ struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r = _r;
+ r->out.result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ case NDR_SRVSVC_NETRSERVERTRANSPORTDELEX: {
+ struct srvsvc_NETRSERVERTRANSPORTDELEX *r = _r;
+ r->out.result = _srvsvc_NETRSERVERTRANSPORTDELEX(cli->pipes_struct, r);
+ return NT_STATUS_OK;
+ }
+
+ default:
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+}
+
NTSTATUS rpc_srvsvc_init(void)
{
return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", &ndr_table_srvsvc, api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct));