[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-913-g7a98fde

Jeremy Allison jra at samba.org
Thu Oct 1 11:36:10 MDT 2009


The branch, v3-5-test has been updated
       via  7a98fdebe454ec55e93868ca319615bf442b2ff8 (commit)
       via  f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d (commit)
       via  11f56f48433951046a79683eda08ab8a4246d487 (commit)
       via  ca90b480da3f5d813186d3b7be22a5a0ae1057f6 (commit)
       via  1a0db7a957682782bd915526c69c0779e7b8335f (commit)
       via  d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec (commit)
       via  62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0 (commit)
      from  87b31c0266360f311ae6207b9ec5bce9d8e01be7 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 7a98fdebe454ec55e93868ca319615bf442b2ff8
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 1 10:21:17 2009 +0200

    s3-perfcount: more cleanup.
    
    Guenther

commit f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 1 03:39:07 2009 +0200

    s3-perfcount: only pass down prs_struct when really required.
    
    Guenther

commit 11f56f48433951046a79683eda08ab8a4246d487
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 1 02:09:33 2009 +0200

    s3: add perfcount idl and generated files.
    
    Guenther

commit ca90b480da3f5d813186d3b7be22a5a0ae1057f6
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 1 01:30:45 2009 +0200

    s3-registry: move rpccli_winreg_Connect to the only file it belongs.
    
    Guenther

commit 1a0db7a957682782bd915526c69c0779e7b8335f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 30 20:01:54 2009 +0200

    s3: remove unused rpcstr_pull and rpcstr_pull_talloc.
    
    Guenther

commit d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 30 20:01:35 2009 +0200

    s3-printing: more use of pull_reg_sz().
    
    Guenther

commit 62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 30 20:00:52 2009 +0200

    s3-registry: use pull_reg_sz() where appropriate.
    
    (and move away from rpcstr_pull and rpcstr_pull_talloc).
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 examples/perfcounter/Makefile           |    6 +-
 examples/perfcounter/perf.h             |    4 +-
 source3/Makefile.in                     |    6 +-
 source3/include/includes.h              |    3 +-
 source3/include/proto.h                 |   30 +--
 source3/include/rpc_perfcount.h         |  126 --------
 source3/include/rpc_perfcount_defs.h    |   93 ------
 source3/lib/util_unistr.c               |   35 ---
 source3/librpc/gen_ndr/ndr_perfcount.c  |  493 +++++++++++++++++++++++++++++++
 source3/librpc/gen_ndr/ndr_perfcount.h  |   26 ++
 source3/librpc/gen_ndr/perfcount.h      |  129 ++++++++
 source3/librpc/idl/perfcount.idl        |  172 +++++++++++
 source3/printing/nt_printing.c          |    9 +-
 source3/registry/reg_backend_printing.c |   39 ++-
 source3/registry/reg_objects.c          |    9 +-
 source3/registry/reg_perfcount.c        |  235 +++++++++------
 source3/rpc_client/cli_reg.c            |   62 ----
 source3/rpc_parse/parse_misc.c          |   42 ---
 source3/rpcclient/cmd_spoolss.c         |   12 +-
 source3/services/services_db.c          |   14 +-
 source3/utils/net_rpc_printer.c         |   12 +-
 source3/utils/net_rpc_registry.c        |   50 +++-
 22 files changed, 1071 insertions(+), 536 deletions(-)
 delete mode 100644 source3/include/rpc_perfcount.h
 delete mode 100644 source3/include/rpc_perfcount_defs.h
 create mode 100644 source3/librpc/gen_ndr/ndr_perfcount.c
 create mode 100644 source3/librpc/gen_ndr/ndr_perfcount.h
 create mode 100644 source3/librpc/gen_ndr/perfcount.h
 create mode 100644 source3/librpc/idl/perfcount.idl
 delete mode 100644 source3/rpc_client/cli_reg.c


Changeset truncated at 500 lines:

diff --git a/examples/perfcounter/Makefile b/examples/perfcounter/Makefile
index 925e2ea..bb7022e 100644
--- a/examples/perfcounter/Makefile
+++ b/examples/perfcounter/Makefile
@@ -15,10 +15,10 @@
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 # 
 
-SAMBA_SRC_DIR=../../source
-TDB_SRC_DIR=$(SAMBA_SRC_DIR)/tdb
+SAMBA_SRC_DIR=../../source3
+TDB_SRC_DIR=$(SAMBA_SRC_DIR)/../lib/tdb
 
-CFLAGS = -g -I$(SAMBA_SRC_DIR)/include -I$(TDB_SRC_DIR)/include
+CFLAGS = -g -I$(SAMBA_SRC_DIR) -I$(SAMBA_SRC_DIR)/include -I$(TDB_SRC_DIR)/include -I../../
 CC = gcc
 
 PROGS = perfcount
diff --git a/examples/perfcounter/perf.h b/examples/perfcounter/perf.h
index 2c24d31..7f06b05 100644
--- a/examples/perfcounter/perf.h
+++ b/examples/perfcounter/perf.h
@@ -36,8 +36,8 @@
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <limits.h>
-#include "tdb.h"
-#include <rpc_perfcount_defs.h>
+#include <tdb.h>
+#include "librpc/gen_ndr/perfcount.h"
 #include <sys/statfs.h>
 #include <sys/times.h>
 #include <sys/sysinfo.h>
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0a48b01..b552a9b 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -519,7 +519,8 @@ RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o \
 		  $(SCHANNEL_OBJ)
 
 LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
-	       $(RPC_CLIENT_OBJ1) rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
+	       $(RPC_CLIENT_OBJ1) \
+	       $(RPC_CLIENT_OBJ) \
 	       rpc_client/cli_spoolss.o \
 	       rpc_client/init_spoolss.o \
 	       rpc_client/init_samr.o \
@@ -592,6 +593,7 @@ REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \
 	       $(REG_INIT_FULL_OBJ) \
 	       registry/reg_eventlog.o \
 	       registry/reg_perfcount.o \
+	       librpc/gen_ndr/ndr_perfcount.o \
 	       registry/reg_util_legacy.o
 
 LIB_EVENTLOG_OBJ = lib/eventlog/eventlog.o
@@ -1394,7 +1396,7 @@ samba3-idl::
 	@PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
 	 srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh \
 		librpc/idl/messaging.idl librpc/idl/libnetapi.idl librpc/idl/notify.idl \
-		librpc/idl/wbint.idl
+		librpc/idl/wbint.idl librpc/idl/perfcount.idl
 
 #####################################################################
 
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 7112514..453c8b3 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -672,8 +672,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "ntdomain.h"
 #include "reg_objects.h"
 #include "reg_db.h"
-#include "rpc_perfcount.h"
-#include "rpc_perfcount_defs.h"
+#include "librpc/gen_ndr/perfcount.h"
 #include "librpc/gen_ndr/notify.h"
 #include "librpc/gen_ndr/xattr.h"
 #include "librpc/gen_ndr/messaging.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 05651e2..e7ad877 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1576,12 +1576,6 @@ void load_case_tables(void);
 void init_valid_table(void);
 size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate);
 char *skip_unibuf(char *src, size_t len);
-int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags);
-int rpcstr_pull_talloc(TALLOC_CTX *ctx,
-			char **dest,
-			void *src,
-			int src_len,
-			int flags);
 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
 smb_ucs2_t toupper_w(smb_ucs2_t val);
@@ -5125,7 +5119,7 @@ int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
 struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
 					const char *name);
 uint32 regval_dword(struct regval_blob *val);
-char *regval_sz(struct regval_blob *val);
+const char *regval_sz(struct regval_blob *val);
 
 /* The following definitions come from registry/reg_perfcount.c  */
 
@@ -5135,20 +5129,6 @@ uint32 reg_perfcount_get_last_counter(uint32 base_index);
 uint32 reg_perfcount_get_last_help(uint32 last_counter);
 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
-bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data);
-bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst,
-				      prs_struct *ps,
-				      int instId,
-				      PERF_OBJECT_TYPE *obj,
-				      TDB_CONTEXT *names);
-bool _reg_perfcount_add_instance(PERF_OBJECT_TYPE *obj,
-				 prs_struct *ps,
-				 int instInd,
-				 TDB_CONTEXT *names);
-uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 
-					 prs_struct *ps, 
-					 PERF_DATA_BLOCK *block,
-					 const char *object_ids);
 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
 
 /* The following definitions come from registry/reg_util.c  */
@@ -5421,12 +5401,6 @@ NTSTATUS rpc_transport_smbd_init(TALLOC_CTX *mem_ctx,
 NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd,
 				 struct rpc_cli_transport **presult);
 
-/* The following definitions come from rpc_client/cli_reg.c  */
-
-NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                         uint32 reg_type, uint32 access_mask,
-                         struct policy_handle *reg_hnd);
-
 /* The following definitions come from rpc_client/cli_samr.c  */
 
 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
@@ -5647,8 +5621,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 /* The following definitions come from rpc_parse/parse_misc.c  */
 
 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
-bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
-bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
 		 prs_struct *ps, int depth);
 
diff --git a/source3/include/rpc_perfcount.h b/source3/include/rpc_perfcount.h
deleted file mode 100644
index 0cb2fdc..0000000
--- a/source3/include/rpc_perfcount.h
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef _RPC_PERFCOUNT_H
-#define _RPC_PERFCOUNT_H
-/* 
- *  Unix SMB/CIFS implementation.
- *  Virtual Windows Registry Layer
- *
- *  Copyright (C) Marcin Krzysztof Porwit    2005,
- *  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
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-typedef struct perf_counter_definition
-{
-	/* sizeof(PERF_COUNTER_DEFINITION) */
-	uint32 ByteLength;
-	uint32 CounterNameTitleIndex;
-	uint32 CounterNameTitlePointer;
-	uint32 CounterHelpTitleIndex;
-	uint32 CounterHelpTitlePointer;
-	uint32 DefaultScale;
-	uint32 DetailLevel;
-	uint32 CounterType;
-	uint32 CounterSize;
-	uint32 CounterOffset;
-}
-PERF_COUNTER_DEFINITION;
-
-typedef struct perf_counter_block
-{
-	/* Total size of the data block, including all data plus this header */
-	uint32 ByteLength;
-	uint8 *data;
-}
-PERF_COUNTER_BLOCK;
-
-typedef struct perf_instance_definition
-{
-	/* Total size of the instance definition, including the length of the terminated Name string */
-	uint32 ByteLength;
-	uint32 ParentObjectTitleIndex;
-	uint32 ParentObjectTitlePointer;
-	uint32 UniqueID;
-	/* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
-	uint32 NameOffset;
-	uint32 NameLength;
-	/* Unicode string containing the name for the instance */
-	uint8 *data;
-	PERF_COUNTER_BLOCK counter_data;
-}
-PERF_INSTANCE_DEFINITION;
-
-typedef struct perf_object_type
-{
-	/* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
-	   PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
-	uint32 TotalByteLength;
-	/* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
-	uint32 DefinitionLength;
-	/* Size of this PERF_OBJECT_TYPE */
-	uint32 HeaderLength;
-	uint32 ObjectNameTitleIndex;
-	uint32 ObjectNameTitlePointer;
-	uint32 ObjectHelpTitleIndex;
-	uint32 ObjectHelpTitlePointer;
-	uint32 DetailLevel;
-	uint32 NumCounters;
-	uint32 DefaultCounter;
-	uint32 NumInstances;
-	uint32 CodePage;
-	uint64 PerfTime;
-	uint64 PerfFreq;
-	PERF_COUNTER_DEFINITION *counters;
-	PERF_INSTANCE_DEFINITION *instances;
-	PERF_COUNTER_BLOCK counter_data;
-}
-PERF_OBJECT_TYPE;
-
-/* PerfCounter Inner Buffer structs */
-typedef struct perf_data_block
-{
-	/* hardcoded to read "P.E.R.F" */
-	uint16 Signature[4];
-	uint32 LittleEndian;
-	/* both currently hardcoded to 1 */
-	uint32 Version;
-	uint32 Revision;
-	/* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
-	uint32 TotalByteLength;
-	/* size of PERF_DATA_BLOCK including the uint8 *data */
-	uint32 HeaderLength;
-	/* number of PERF_OBJECT_TYPE structures encoded */
-	uint32 NumObjectTypes;
-	uint32 DefaultObject;
-	SYSTEMTIME SystemTime;
-	/* This will guarantee that we're on a 64-bit boundary before we encode
-	   PerfTime, and having it there will make my offset math much easier. */
-	uint32 Padding;
-	/* Now when I'm marshalling this, I'll need to call prs_align_uint64() 
-	   before I start encodint the uint64 structs */
-	/* clock rate * seconds uptime */
-	uint64 PerfTime;
-	/* The clock rate of the CPU */
-	uint64 PerfFreq; 
-	/* used for high-res timers -- for now PerfTime * 10e7 */
-	uint64 PerfTime100nSec;
-	uint32 SystemNameLength;
-	uint32 SystemNameOffset;
-	/* The SystemName, in unicode, terminated */
-	uint8* data;
-	PERF_OBJECT_TYPE *objects;
-} 
-PERF_DATA_BLOCK;
-
-#endif /* _RPC_PERFCOUNT_H */
diff --git a/source3/include/rpc_perfcount_defs.h b/source3/include/rpc_perfcount_defs.h
deleted file mode 100644
index 6c84c27..0000000
--- a/source3/include/rpc_perfcount_defs.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef _RPC_PERFCOUNT_DEFS_H
-#define _RPC_PERFCOUNT_DEFS_H
-/* 
- *  Unix SMB/CIFS implementation.
- *  Virtual Windows Registry Layer
- *
- *  Copyright (C) Marcin Krzysztof Porwit    2005,
- *  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
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * The following #defines match what is in winperf.h. 
- * See that include file for more details, or look up
- * "Performance Data Format" on MSDN
- * 
- * Rather than including them in rpc_perfcount.h, they
- * were broken out into a separate .h file so that they
- * can be included by other programs that need this info
- * without pulling in everything else samba-related.
- */
-
-#define PERF_NO_INSTANCES             -1
-#define PERF_NO_UNIQUE_ID	      -1
-
-/* These determine the data size */
-#define PERF_SIZE_DWORD               0x00000000
-#define PERF_SIZE_LARGE               0x00000100
-#define PERF_SIZE_ZERO                0x00000200
-#define PERF_SIZE_VARIABLE_LEN        0x00000300
-
-/* These determine the usage of the counter */
-#define PERF_TYPE_NUMBER              0x00000000
-#define PERF_TYPE_COUNTER             0x00000400
-#define PERF_TYPE_TEXT                0x00000800
-#define PERF_TYPE_ZERO                0x00000C00
-
-/* If PERF_TYPE_NUMBER was selected, these provide display information */
-#define PERF_NUMBER_HEX               0x00000000
-#define PERF_NUMBER_DECIMAL           0x00010000
-#define PERF_NUMBER_DEC_1000          0x00020000
-
-/* If PERF_TYPE_COUNTER was selected, these provide display information */
-#define PERF_COUNTER_VALUE            0x00000000
-#define PERF_COUNTER_RATE             0x00010000
-#define PERF_COUNTER_FRACTION         0x00020000
-#define PERF_COUNTER_BASE             0x00030000
-#define PERF_COUNTER_ELAPSED          0x00040000
-#define PERF_COUNTER_QUEUELEN         0x00050000
-#define PERF_COUNTER_HISTOGRAM        0x00060000
-#define PERF_COUNTER_PRECISION        0x00070000
-
-/* If PERF_TYPE_TEXT was selected, these provide display information */
-#define PERF_TEXT_UNICODE             0x00000000
-#define PERF_TEXT_ASCII               0x00010000
-
-/* These provide information for which tick count to use when computing elapsed interval */
-#define PERF_TIMER_TICK               0x00000000
-#define PERF_TIMER_100NS              0x00100000
-#define PERF_OBJECT_TIMER             0x00200000
-
-/* These affect how the data is manipulated prior to being displayed */
-#define PERF_DELTA_COUNTER            0x00400000
-#define PERF_DELTA_BASE               0x00800000
-#define PERF_INVERSE_COUNTER          0x01000000
-#define PERF_MULTI_COUNTER            0x02000000
-
-/* These determine if any text gets added when the value is displayed */
-#define PERF_DISPLAY_NO_SUFFIX        0x00000000
-#define PERF_DISPLAY_PER_SEC          0x10000000
-#define PERF_DISPLAY_PERCENT          0x20000000
-#define PERF_DISPLAY_SECONDS          0x30000000
-#define PERF_DISPLAY_NOSHOW           0x40000000
-
-/* These determine the DetailLevel of the counter */
-#define PERF_DETAIL_NOVICE            100
-#define PERF_DETAIL_ADVANCED          200
-#define PERF_DETAIL_EXPERT            300
-#define PERF_DETAIL_WIZARD            400
-
-#endif /* _RPC_PERFCOUNT_DEFS_H */
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index 7d80b3c..f53ef94 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -256,41 +256,6 @@ char *skip_unibuf(char *src, size_t len)
 	return src;
 }
 
-/* Copy a string from little-endian or big-endian unicode source (depending
- * on flags) to internal samba format destination
- */ 
-
-int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags)
-{
-	if (!src) {
-		dest[0] = 0;
-		return 0;
-	}
-	if(dest_len==-1) {
-		dest_len=MAXUNI-3;
-	}
-	return pull_ucs2(NULL, dest, src, dest_len, src_len, flags|STR_UNICODE|STR_NOALIGN);
-}
-
-/* Copy a string from little-endian or big-endian unicode source (depending
- * on flags) to internal samba format destination. Allocates on talloc ctx.
- */
-
-int rpcstr_pull_talloc(TALLOC_CTX *ctx,
-			char **dest,
-			void *src,
-			int src_len,
-			int flags)
-{
-	return pull_ucs2_base_talloc(ctx,
-			NULL,
-			dest,
-			src,
-			src_len,
-			flags|STR_UNICODE|STR_NOALIGN);
-
-}
-
 /* Converts a string from internal samba format to unicode
  */
 
diff --git a/source3/librpc/gen_ndr/ndr_perfcount.c b/source3/librpc/gen_ndr/ndr_perfcount.c
new file mode 100644
index 0000000..9944434
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_perfcount.c
@@ -0,0 +1,493 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_perfcount.h"
+
+static enum ndr_err_code ndr_push_SYSTEMTIME(struct ndr_push *ndr, int ndr_flags, const struct SYSTEMTIME *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 2));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->dayofweek));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->milliseconds));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_SYSTEMTIME(struct ndr_pull *ndr, int ndr_flags, struct SYSTEMTIME *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 2));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->dayofweek));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->milliseconds));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SYSTEMTIME(struct ndr_print *ndr, const char *name, const struct SYSTEMTIME *r)
+{
+	ndr_print_struct(ndr, name, "SYSTEMTIME");
+	ndr->depth++;
+	ndr_print_uint16(ndr, "year", r->year);
+	ndr_print_uint16(ndr, "month", r->month);
+	ndr_print_uint16(ndr, "dayofweek", r->dayofweek);
+	ndr_print_uint16(ndr, "day", r->day);
+	ndr_print_uint16(ndr, "hour", r->hour);
+	ndr_print_uint16(ndr, "minute", r->minute);
+	ndr_print_uint16(ndr, "second", r->second);
+	ndr_print_uint16(ndr, "milliseconds", r->milliseconds);
+	ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PERF_COUNTER_DEFINITION(struct ndr_push *ndr, int ndr_flags, const struct PERF_COUNTER_DEFINITION *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ByteLength));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitleIndex));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterNameTitlePointer));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitleIndex));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterHelpTitlePointer));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DefaultScale));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DetailLevel));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterType));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterSize));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CounterOffset));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list