diff options
author | Günther Deschner <gd@samba.org> | 2008-04-08 02:26:21 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-08 03:08:49 +0200 |
commit | 6e379f5db93289e129737b90d09653881ab0c658 (patch) | |
tree | 6f206b2c73ac4a0bc16173088255f1b1ebbc9b33 /source3 | |
parent | ec0a34864ec8f77cf90c9d52b022293949253e55 (diff) | |
download | samba-6e379f5db93289e129737b90d09653881ab0c658.tar.gz samba-6e379f5db93289e129737b90d09653881ab0c658.tar.bz2 samba-6e379f5db93289e129737b90d09653881ab0c658.zip |
Add libnetapi generated files.
Guenther
(This used to be commit 78da087b3a04f25bd0ea3195debf5c46731bac74)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/gen_ndr/libnetapi.h | 140 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_libnetapi.c | 377 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_libnetapi.h | 53 |
3 files changed, 570 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/libnetapi.h b/source3/librpc/gen_ndr/libnetapi.h new file mode 100644 index 0000000000..8247e9e64f --- /dev/null +++ b/source3/librpc/gen_ndr/libnetapi.h @@ -0,0 +1,140 @@ +/* header auto-generated by pidl */ + +#include <stdint.h> + +#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x)) +#ifndef _HEADER_libnetapi +#define _HEADER_libnetapi + +enum NET_API_STATUS +#ifndef USE_UINT_ENUMS + { + NERR_Success=0 +} +#else + { __donnot_use_enum_NET_API_STATUS=0x7FFFFFFF} +#define NERR_Success ( 0 ) +#endif +; + + +struct NetJoinDomain { + struct { + const char * server;/* [unique] */ + const char * domain;/* [ref] */ + const char * account_ou;/* [unique] */ + const char * account;/* [unique] */ + const char * password;/* [unique] */ + uint32_t join_flags; + } in; + + struct { + enum NET_API_STATUS result; + } out; + +}; + + +struct NetUnjoinDomain { + struct { + const char * server_name;/* [unique] */ + const char * account;/* [unique] */ + const char * password;/* [unique] */ + uint32_t unjoin_flags; + } in; + + struct { + enum NET_API_STATUS result; + } out; + +}; + + +struct NetGetJoinInformation { + struct { + const char * server_name;/* [unique] */ + } in; + + struct { + const char * *name_buffer;/* [ref] */ + uint16_t *name_type;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + + +struct NetGetJoinableOUs { + struct { + const char * server_name;/* [unique] */ + const char * domain;/* [ref] */ + const char * account;/* [unique] */ + const char * password;/* [unique] */ + } in; + + struct { + uint32_t *ou_count;/* [ref] */ + const char * **ous;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + + +struct NetServerGetInfo { + struct { + const char * server_name;/* [unique] */ + uint32_t level; + } in; + + struct { + uint8_t **buffer;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + + +struct NetServerSetInfo { + struct { + const char * server_name;/* [unique] */ + uint32_t level; + uint8_t *buffer;/* [ref] */ + } in; + + struct { + uint32_t *parm_error;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + + +struct NetGetDCName { + struct { + const char * server_name;/* [unique] */ + const char * domain_name;/* [unique] */ + } in; + + struct { + uint8_t **buffer;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + + +struct NetGetAnyDCName { + struct { + const char * server_name;/* [unique] */ + const char * domain_name;/* [unique] */ + } in; + + struct { + uint8_t **buffer;/* [ref] */ + enum NET_API_STATUS result; + } out; + +}; + +#endif /* _HEADER_libnetapi */ diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.c b/source3/librpc/gen_ndr/ndr_libnetapi.c new file mode 100644 index 0000000000..5dc3c3d826 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_libnetapi.c @@ -0,0 +1,377 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_libnetapi.h" + +_PUBLIC_ enum ndr_err_code ndr_push_NET_API_STATUS(struct ndr_push *ndr, int ndr_flags, enum NET_API_STATUS r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_NET_API_STATUS(struct ndr_pull *ndr, int ndr_flags, enum NET_API_STATUS *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_NET_API_STATUS(struct ndr_print *ndr, const char *name, enum NET_API_STATUS r) +{ + const char *val = NULL; + + switch (r) { + case NERR_Success: val = "NERR_Success"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ void ndr_print_NetJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetJoinDomain *r) +{ + ndr_print_struct(ndr, name, "NetJoinDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetJoinDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_string(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain", r->in.domain); + ndr->depth++; + ndr_print_string(ndr, "domain", r->in.domain); + ndr->depth--; + ndr_print_ptr(ndr, "account_ou", r->in.account_ou); + ndr->depth++; + if (r->in.account_ou) { + ndr_print_string(ndr, "account_ou", r->in.account_ou); + } + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + if (r->in.account) { + ndr_print_string(ndr, "account", r->in.account); + } + ndr->depth--; + ndr_print_ptr(ndr, "password", r->in.password); + ndr->depth++; + if (r->in.password) { + ndr_print_string(ndr, "password", r->in.password); + } + ndr->depth--; + ndr_print_uint32(ndr, "join_flags", r->in.join_flags); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetJoinDomain"); + ndr->depth++; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetUnjoinDomain *r) +{ + ndr_print_struct(ndr, name, "NetUnjoinDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetUnjoinDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + if (r->in.account) { + ndr_print_string(ndr, "account", r->in.account); + } + ndr->depth--; + ndr_print_ptr(ndr, "password", r->in.password); + ndr->depth++; + if (r->in.password) { + ndr_print_string(ndr, "password", r->in.password); + } + ndr->depth--; + ndr_print_uint32(ndr, "unjoin_flags", r->in.unjoin_flags); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetUnjoinDomain"); + ndr->depth++; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinInformation *r) +{ + ndr_print_struct(ndr, name, "NetGetJoinInformation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetGetJoinInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetGetJoinInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "name_buffer", r->out.name_buffer); + ndr->depth++; + ndr_print_ptr(ndr, "name_buffer", *r->out.name_buffer); + ndr->depth++; + if (*r->out.name_buffer) { + ndr_print_string(ndr, "name_buffer", *r->out.name_buffer); + } + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "name_type", r->out.name_type); + ndr->depth++; + ndr_print_uint16(ndr, "name_type", *r->out.name_type); + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetGetJoinableOUs(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinableOUs *r) +{ + ndr_print_struct(ndr, name, "NetGetJoinableOUs"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetGetJoinableOUs"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain", r->in.domain); + ndr->depth++; + ndr_print_string(ndr, "domain", r->in.domain); + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + if (r->in.account) { + ndr_print_string(ndr, "account", r->in.account); + } + ndr->depth--; + ndr_print_ptr(ndr, "password", r->in.password); + ndr->depth++; + if (r->in.password) { + ndr_print_string(ndr, "password", r->in.password); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetGetJoinableOUs"); + ndr->depth++; + ndr_print_ptr(ndr, "ou_count", r->out.ou_count); + ndr->depth++; + ndr_print_uint32(ndr, "ou_count", *r->out.ou_count); + ndr->depth--; + ndr_print_ptr(ndr, "ous", r->out.ous); + ndr->depth++; + ndr_print_ptr(ndr, "ous", *r->out.ous); + ndr->depth++; + if (*r->out.ous) { + ndr_print_ptr(ndr, "ous", **r->out.ous); + ndr->depth++; + if (**r->out.ous) { + ndr_print_string(ndr, "ous", **r->out.ous); + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetServerGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerGetInfo *r) +{ + ndr_print_struct(ndr, name, "NetServerGetInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetServerGetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetServerGetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->out.buffer); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", *r->out.buffer); + ndr->depth++; + if (*r->out.buffer) { + ndr_print_uint8(ndr, "buffer", **r->out.buffer); + } + ndr->depth--; + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetServerSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerSetInfo *r) +{ + ndr_print_struct(ndr, name, "NetServerSetInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetServerSetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "buffer", r->in.buffer); + ndr->depth++; + ndr_print_uint8(ndr, "buffer", *r->in.buffer); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetServerSetInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "parm_error", r->out.parm_error); + ndr->depth++; + ndr_print_uint32(ndr, "parm_error", *r->out.parm_error); + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetDCName *r) +{ + ndr_print_struct(ndr, name, "NetGetDCName"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetGetDCName"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain_name", r->in.domain_name); + ndr->depth++; + if (r->in.domain_name) { + ndr_print_string(ndr, "domain_name", r->in.domain_name); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetGetDCName"); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->out.buffer); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", *r->out.buffer); + ndr->depth++; + if (*r->out.buffer) { + ndr_print_uint8(ndr, "buffer", **r->out.buffer); + } + ndr->depth--; + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ void ndr_print_NetGetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetAnyDCName *r) +{ + ndr_print_struct(ndr, name, "NetGetAnyDCName"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "NetGetAnyDCName"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain_name", r->in.domain_name); + ndr->depth++; + if (r->in.domain_name) { + ndr_print_string(ndr, "domain_name", r->in.domain_name); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "NetGetAnyDCName"); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->out.buffer); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", *r->out.buffer); + ndr->depth++; + if (*r->out.buffer) { + ndr_print_uint8(ndr, "buffer", **r->out.buffer); + } + ndr->depth--; + ndr->depth--; + ndr_print_NET_API_STATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.h b/source3/librpc/gen_ndr/ndr_libnetapi.h new file mode 100644 index 0000000000..890c7d0d34 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_libnetapi.h @@ -0,0 +1,53 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/libnetapi.h" + +#ifndef _HEADER_NDR_libnetapi +#define _HEADER_NDR_libnetapi + +#define NDR_NETJOINDOMAIN (0x00) + +#define NDR_NETUNJOINDOMAIN (0x01) + +#define NDR_NETGETJOININFORMATION (0x02) + +#define NDR_NETGETJOINABLEOUS (0x03) + +#define NDR_NETSERVERGETINFO (0x04) + +#define NDR_NETSERVERSETINFO (0x05) + +#define NDR_NETGETDCNAME (0x06) + +#define NDR_NETGETANYDCNAME (0x07) + +#define NDR_LIBNETAPI_CALL_COUNT (8) +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); +enum ndr_err_code ndr_push_NetJoinDomain(struct ndr_push *ndr, int flags, const struct NetJoinDomain *r); +enum ndr_err_code ndr_pull_NetJoinDomain(struct ndr_pull *ndr, int flags, struct NetJoinDomain *r); +void ndr_print_NetJoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetJoinDomain *r); +enum ndr_err_code ndr_push_NetUnjoinDomain(struct ndr_push *ndr, int flags, const struct NetUnjoinDomain *r); +enum ndr_err_code ndr_pull_NetUnjoinDomain(struct ndr_pull *ndr, int flags, struct NetUnjoinDomain *r); +void ndr_print_NetUnjoinDomain(struct ndr_print *ndr, const char *name, int flags, const struct NetUnjoinDomain *r); +enum ndr_err_code ndr_push_NetGetJoinInformation(struct ndr_push *ndr, int flags, const struct NetGetJoinInformation *r); +enum ndr_err_code ndr_pull_NetGetJoinInformation(struct ndr_pull *ndr, int flags, struct NetGetJoinInformation *r); +void ndr_print_NetGetJoinInformation(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinInformation *r); +enum ndr_err_code ndr_push_NetGetJoinableOUs(struct ndr_push *ndr, int flags, const struct NetGetJoinableOUs *r); +enum ndr_err_code ndr_pull_NetGetJoinableOUs(struct ndr_pull *ndr, int flags, struct NetGetJoinableOUs *r); +void ndr_print_NetGetJoinableOUs(struct ndr_print *ndr, const char *name, int flags, const struct NetGetJoinableOUs *r); +enum ndr_err_code ndr_push_NetServerGetInfo(struct ndr_push *ndr, int flags, const struct NetServerGetInfo *r); +enum ndr_err_code ndr_pull_NetServerGetInfo(struct ndr_pull *ndr, int flags, struct NetServerGetInfo *r); +void ndr_print_NetServerGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerGetInfo *r); +enum ndr_err_code ndr_push_NetServerSetInfo(struct ndr_push *ndr, int flags, const struct NetServerSetInfo *r); +enum ndr_err_code ndr_pull_NetServerSetInfo(struct ndr_pull *ndr, int flags, struct NetServerSetInfo *r); +void ndr_print_NetServerSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct NetServerSetInfo *r); +enum ndr_err_code ndr_push_NetGetDCName(struct ndr_push *ndr, int flags, const struct NetGetDCName *r); +enum ndr_err_code ndr_pull_NetGetDCName(struct ndr_pull *ndr, int flags, struct NetGetDCName *r); +void ndr_print_NetGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetDCName *r); +enum ndr_err_code ndr_push_NetGetAnyDCName(struct ndr_push *ndr, int flags, const struct NetGetAnyDCName *r); +enum ndr_err_code ndr_pull_NetGetAnyDCName(struct ndr_pull *ndr, int flags, struct NetGetAnyDCName *r); +void ndr_print_NetGetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct NetGetAnyDCName *r); +#endif /* _HEADER_NDR_libnetapi */ |