[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2885-g1262ab1
Günther Deschner
gd at samba.org
Tue Jun 17 17:58:12 GMT 2008
The branch, v3-3-test has been updated
via 1262ab1843a8a8cb794f6bbfb113bd2d99ffba22 (commit)
via 78bc98cb55e36ef175f9c0f6fcd943781a514005 (commit)
via 782ab0f1c1c0957a1111a76c2c1ea7bd99d38311 (commit)
via 8dd1a5fabffaea847a348d1467a75d005a16b0bd (commit)
from e0b117200441f842fbc11cc817ab2cde4d63a22e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 1262ab1843a8a8cb794f6bbfb113bd2d99ffba22
Author: Günther Deschner <gd at samba.org>
Date: Fri Jun 6 16:44:35 2008 +0200
netapi: make NetRemoteTOD() headers public.
Guenther
commit 78bc98cb55e36ef175f9c0f6fcd943781a514005
Author: Günther Deschner <gd at samba.org>
Date: Fri Jun 6 13:50:39 2008 +0200
netapi: add NetRemoteTOD() skeleton.
Guenther
commit 782ab0f1c1c0957a1111a76c2c1ea7bd99d38311
Author: Günther Deschner <gd at samba.org>
Date: Fri Jun 6 12:51:12 2008 +0200
re-run make idl.
Guenther
commit 8dd1a5fabffaea847a348d1467a75d005a16b0bd
Author: Günther Deschner <gd at samba.org>
Date: Fri Jun 6 12:50:02 2008 +0200
netapi: add NetRemoteTOD() to IDL.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/lib/netapi/libnetapi.c | 42 +++++++++++++++++++++++++++++++++
source/lib/netapi/libnetapi.h | 6 ++++
source/lib/netapi/netapi.h | 31 ++++++++++++++++++++++++
source/lib/netapi/serverinfo.c | 19 +++++++++++++++
source/librpc/gen_ndr/libnetapi.h | 28 ++++++++++++++++++++++
source/librpc/gen_ndr/ndr_libnetapi.c | 31 ++++++++++++++++++++++++
source/librpc/gen_ndr/ndr_libnetapi.h | 7 ++++-
source/librpc/idl/libnetapi.idl | 19 +++++++++++++++
8 files changed, 182 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/netapi/libnetapi.c b/source/lib/netapi/libnetapi.c
index 097086f..173c4d3 100644
--- a/source/lib/netapi/libnetapi.c
+++ b/source/lib/netapi/libnetapi.c
@@ -1089,3 +1089,45 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
return r.out.result;
}
+/****************************************************************
+ NetRemoteTOD
+****************************************************************/
+
+NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
+ uint8_t **buf /* [out] [ref] */)
+{
+ struct NetRemoteTOD r;
+ struct libnetapi_ctx *ctx = NULL;
+ NET_API_STATUS status;
+ WERROR werr;
+
+ status = libnetapi_getctx(&ctx);
+ if (status != 0) {
+ return status;
+ }
+
+ /* In parameters */
+ r.in.server_name = server_name;
+
+ /* Out parameters */
+ r.out.buf = buf;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(NetRemoteTOD, &r);
+ }
+
+ if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+ werr = NetRemoteTOD_l(ctx, &r);
+ } else {
+ werr = NetRemoteTOD_r(ctx, &r);
+ }
+
+ r.out.result = W_ERROR_V(werr);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(NetRemoteTOD, &r);
+ }
+
+ return r.out.result;
+}
+
diff --git a/source/lib/netapi/libnetapi.h b/source/lib/netapi/libnetapi.h
index 911be74..12be1cc 100644
--- a/source/lib/netapi/libnetapi.h
+++ b/source/lib/netapi/libnetapi.h
@@ -187,4 +187,10 @@ WERROR NetLocalGroupSetInfo_r(struct libnetapi_ctx *ctx,
struct NetLocalGroupSetInfo *r);
WERROR NetLocalGroupSetInfo_l(struct libnetapi_ctx *ctx,
struct NetLocalGroupSetInfo *r);
+NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
+ uint8_t **buf /* [out] [ref] */);
+WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
+ struct NetRemoteTOD *r);
+WERROR NetRemoteTOD_l(struct libnetapi_ctx *ctx,
+ struct NetRemoteTOD *r);
#endif /* __LIBNETAPI_LIBNETAPI__ */
diff --git a/source/lib/netapi/netapi.h b/source/lib/netapi/netapi.h
index d80e78e..d24e159 100644
--- a/source/lib/netapi/netapi.h
+++ b/source/lib/netapi/netapi.h
@@ -157,6 +157,21 @@ struct LOCALGROUP_INFO_1002 {
const char * lgrpi1002_comment;
};
+struct TIME_OF_DAY_INFO {
+ uint32_t tod_elapsedt;
+ uint32_t tod_msecs;
+ uint32_t tod_hours;
+ uint32_t tod_mins;
+ uint32_t tod_secs;
+ uint32_t tod_hunds;
+ int32_t tod_timezone;
+ uint32_t tod_tinterval;
+ uint32_t tod_day;
+ uint32_t tod_month;
+ uint32_t tod_year;
+ uint32_t tod_weekday;
+};
+
#endif /* _HEADER_libnetapi */
/****************************************************************
@@ -710,4 +725,20 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
uint8_t *buf /* [in] [ref] */,
uint32_t *parm_err /* [out] [ref] */);
+/************************************************************//**
+ *
+ * NetRemoteTOD
+ *
+ * @brief Query remote Time of Day
+ *
+ * @param[in] server_name The server name to connect to
+ * @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure
+ * @return NET_API_STATUS
+ *
+ * example server/remote_tod.c
+ ***************************************************************/
+
+NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
+ uint8_t **buf /* [out] [ref] */);
+
#endif
diff --git a/source/lib/netapi/serverinfo.c b/source/lib/netapi/serverinfo.c
index dd7a880..f75779a 100644
--- a/source/lib/netapi/serverinfo.c
+++ b/source/lib/netapi/serverinfo.c
@@ -203,3 +203,22 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
done:
return werr;
}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
+ struct NetRemoteTOD *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetRemoteTOD_l(struct libnetapi_ctx *ctx,
+ struct NetRemoteTOD *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
diff --git a/source/librpc/gen_ndr/libnetapi.h b/source/librpc/gen_ndr/libnetapi.h
index 1004418..8fc812c 100644
--- a/source/librpc/gen_ndr/libnetapi.h
+++ b/source/librpc/gen_ndr/libnetapi.h
@@ -128,6 +128,21 @@ struct LOCALGROUP_INFO_1002 {
const char * lgrpi1002_comment;
};
+struct TIME_OF_DAY_INFO {
+ uint32_t tod_elapsedt;
+ uint32_t tod_msecs;
+ uint32_t tod_hours;
+ uint32_t tod_mins;
+ uint32_t tod_secs;
+ uint32_t tod_hunds;
+ int32_t tod_timezone;
+ uint32_t tod_tinterval;
+ uint32_t tod_day;
+ uint32_t tod_month;
+ uint32_t tod_year;
+ uint32_t tod_weekday;
+};
+
struct NetJoinDomain {
struct {
@@ -477,4 +492,17 @@ struct NetLocalGroupSetInfo {
};
+
+struct NetRemoteTOD {
+ struct {
+ const char * server_name;
+ } in;
+
+ struct {
+ uint8_t **buf;/* [ref] */
+ enum NET_API_STATUS result;
+ } out;
+
+};
+
#endif /* _HEADER_libnetapi */
diff --git a/source/librpc/gen_ndr/ndr_libnetapi.c b/source/librpc/gen_ndr/ndr_libnetapi.c
index 469b0ab..238cfdf 100644
--- a/source/librpc/gen_ndr/ndr_libnetapi.c
+++ b/source/librpc/gen_ndr/ndr_libnetapi.c
@@ -1225,3 +1225,34 @@ _PUBLIC_ void ndr_print_NetLocalGroupSetInfo(struct ndr_print *ndr, const char *
ndr->depth--;
}
+_PUBLIC_ void ndr_print_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct NetRemoteTOD *r)
+{
+ ndr_print_struct(ndr, name, "NetRemoteTOD");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "NetRemoteTOD");
+ ndr->depth++;
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "NetRemoteTOD");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "buf", r->out.buf);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "buf", *r->out.buf);
+ ndr->depth++;
+ if (*r->out.buf) {
+ ndr_print_uint8(ndr, "buf", **r->out.buf);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_NET_API_STATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
diff --git a/source/librpc/gen_ndr/ndr_libnetapi.h b/source/librpc/gen_ndr/ndr_libnetapi.h
index 8ab00f5..422c702 100644
--- a/source/librpc/gen_ndr/ndr_libnetapi.h
+++ b/source/librpc/gen_ndr/ndr_libnetapi.h
@@ -52,7 +52,9 @@
#define NDR_NETLOCALGROUPSETINFO (0x16)
-#define NDR_LIBNETAPI_CALL_COUNT (23)
+#define NDR_NETREMOTETOD (0x17)
+
+#define NDR_LIBNETAPI_CALL_COUNT (24)
enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r);
enum ndr_err_code ndr_pull_NET_API_STATUS(struct ndr_pull *ndr, int ndr_flags, enum NET_API_STATUS *r);
void ndr_print_NET_API_STATUS(struct ndr_print *ndr, const char *name, enum NET_API_STATUS r);
@@ -149,4 +151,7 @@ void ndr_print_NetLocalGroupGetInfo(struct ndr_print *ndr, const char *name, int
enum ndr_err_code ndr_push_NetLocalGroupSetInfo(struct ndr_push *ndr, int flags, const struct NetLocalGroupSetInfo *r);
enum ndr_err_code ndr_pull_NetLocalGroupSetInfo(struct ndr_pull *ndr, int flags, struct NetLocalGroupSetInfo *r);
void ndr_print_NetLocalGroupSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetLocalGroupSetInfo *r);
+enum ndr_err_code ndr_push_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct NetRemoteTOD *r);
+enum ndr_err_code ndr_pull_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct NetRemoteTOD *r);
+void ndr_print_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct NetRemoteTOD *r);
#endif /* _HEADER_NDR_libnetapi */
diff --git a/source/librpc/idl/libnetapi.idl b/source/librpc/idl/libnetapi.idl
index 6c525ff..cbd9193 100644
--- a/source/librpc/idl/libnetapi.idl
+++ b/source/librpc/idl/libnetapi.idl
@@ -289,4 +289,23 @@ interface libnetapi
[out,ref] uint32 *parm_err
);
+ typedef struct {
+ uint32 tod_elapsedt;
+ uint32 tod_msecs;
+ uint32 tod_hours;
+ uint32 tod_mins;
+ uint32 tod_secs;
+ uint32 tod_hunds;
+ int32 tod_timezone;
+ uint32 tod_tinterval;
+ uint32 tod_day;
+ uint32 tod_month;
+ uint32 tod_year;
+ uint32 tod_weekday;
+ } TIME_OF_DAY_INFO;
+
+ [nopush,nopull] NET_API_STATUS NetRemoteTOD(
+ [in] string server_name,
+ [out,ref] uint8 **buf
+ );
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list