/* parser auto-generated by pidl */

#include "replace.h"
#include "bin/default/source3/librpc/gen_ndr/ndr_ads.h"

#include "librpc/gen_ndr/ndr_nbt.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
_PUBLIC_ enum ndr_err_code ndr_push_ads_saslwrap_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ads_saslwrap_type r)
{
	NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ enum ndr_err_code ndr_pull_ads_saslwrap_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ads_saslwrap_type *r)
{
	uint16_t v;
	NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
	*r = v;
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_ads_saslwrap_type(struct ndr_print *ndr, const char *name, enum ads_saslwrap_type r)
{
	const char *val = NULL;

	switch (r) {
		case ADS_SASLWRAP_TYPE_PLAIN: val = "ADS_SASLWRAP_TYPE_PLAIN"; break;
		case ADS_SASLWRAP_TYPE_SIGN: val = "ADS_SASLWRAP_TYPE_SIGN"; break;
		case ADS_SASLWRAP_TYPE_SEAL: val = "ADS_SASLWRAP_TYPE_SEAL"; break;
	}
	ndr_print_enum(ndr, name, "ENUM", val, r);
}

_PUBLIC_ enum ndr_err_code ndr_push_ads_auth_flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
{
	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ enum ndr_err_code ndr_pull_ads_auth_flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
{
	uint32_t v;
	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
	*r = v;
	return NDR_ERR_SUCCESS;
}

_PUBLIC_ void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r)
{
	ndr_print_uint32(ndr, name, r);
	ndr->depth++;
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_NO_BIND", ADS_AUTH_NO_BIND, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_ANON_BIND", ADS_AUTH_ANON_BIND, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_SASL_SIGN", ADS_AUTH_SASL_SIGN, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_SASL_SEAL", ADS_AUTH_SASL_SEAL, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_SASL_FORCE", ADS_AUTH_SASL_FORCE, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_SASL_STARTTLS", ADS_AUTH_SASL_STARTTLS, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_SASL_LDAPS", ADS_AUTH_SASL_LDAPS, r);
	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ADS_AUTH_GENERATE_KRB5_CONFIG", ADS_AUTH_GENERATE_KRB5_CONFIG, r);
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_server(struct ndr_print *ndr, const char *name, const struct ads_server *r)
{
	ndr_print_struct(ndr, name, "ads_server");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_string(ndr, "realm", r->realm);
	ndr_print_string(ndr, "workgroup", r->workgroup);
	ndr_print_string(ndr, "ldap_server", r->ldap_server);
	ndr_print_uint8(ndr, "gc", r->gc);
	ndr_print_uint8(ndr, "no_fallback", r->no_fallback);
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_auth(struct ndr_print *ndr, const char *name, const struct ads_auth *r)
{
	ndr_print_struct(ndr, name, "ads_auth");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_string(ndr, "kdc_server", r->kdc_server);
	ndr_print_ads_auth_flags(ndr, "flags", r->flags);
	ndr_print_NTTIME(ndr, "expire_time", r->expire_time);
	ndr_print_ptr(ndr, "reconnect_state", r->reconnect_state);
	/* [ignore] 'reconnect_state' */
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_config(struct ndr_print *ndr, const char *name, const struct ads_config *r)
{
	ndr_print_struct(ndr, name, "ads_config");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_nbt_server_type(ndr, "server_flags", r->server_flags);
	ndr_print_netr_DsRGetDCName_flags(ndr, "required_flags", r->required_flags);
	ndr_print_string(ndr, "workgroup", r->workgroup);
	ndr_print_string(ndr, "realm", r->realm);
	ndr_print_string(ndr, "bind_path", r->bind_path);
	ndr_print_string(ndr, "ldap_server_name", r->ldap_server_name);
	ndr_print_string(ndr, "server_site_name", r->server_site_name);
	ndr_print_string(ndr, "client_site_name", r->client_site_name);
	ndr_print_time_t(ndr, "current_time", r->current_time);
	ndr_print_int32(ndr, "time_offset", r->time_offset);
	ndr_print_string(ndr, "schema_path", r->schema_path);
	ndr_print_string(ndr, "config_path", r->config_path);
	ndr_print_int32(ndr, "ldap_page_size", r->ldap_page_size);
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_ldap_buf_in(struct ndr_print *ndr, const char *name, const struct ads_ldap_buf_in *r)
{
	ndr_print_struct(ndr, name, "ads_ldap_buf_in");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_uint32(ndr, "ofs", r->ofs);
	ndr_print_uint32(ndr, "needed", r->needed);
	ndr_print_uint32(ndr, "left", r->left);
	ndr_print_uint32(ndr, "max_wrapped", r->max_wrapped);
	ndr_print_uint32(ndr, "min_wrapped", r->min_wrapped);
	ndr_print_uint32(ndr, "size", r->size);
	ndr_print_ptr(ndr, "buf", r->buf);
	ndr->depth++;
	if (r->buf) {
		ndr_print_uint8(ndr, "buf", *r->buf);
	}
	ndr->depth--;
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_ldap_buf_out(struct ndr_print *ndr, const char *name, const struct ads_ldap_buf_out *r)
{
	ndr_print_struct(ndr, name, "ads_ldap_buf_out");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_uint32(ndr, "ofs", r->ofs);
	ndr_print_uint32(ndr, "left", r->left);
	ndr_print_uint32(ndr, "max_unwrapped", r->max_unwrapped);
	ndr_print_uint32(ndr, "sig_size", r->sig_size);
	ndr_print_uint32(ndr, "size", r->size);
	ndr_print_ptr(ndr, "buf", r->buf);
	ndr->depth++;
	if (r->buf) {
		ndr_print_uint8(ndr, "buf", *r->buf);
	}
	ndr->depth--;
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_saslwrap(struct ndr_print *ndr, const char *name, const struct ads_saslwrap *r)
{
	ndr_print_struct(ndr, name, "ads_saslwrap");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_ads_saslwrap_type(ndr, "wrap_type", r->wrap_type);
	ndr_print_ptr(ndr, "wrap_ops", r->wrap_ops);
	/* [ignore] 'wrap_ops' */
	ndr_print_ptr(ndr, "sbiod", r->sbiod);
	/* [ignore] 'sbiod' */
	ndr_print_ptr(ndr, "mem_ctx", r->mem_ctx);
	/* [ignore] 'mem_ctx' */
	ndr_print_ptr(ndr, "wrap_private_data", r->wrap_private_data);
	/* [ignore] 'wrap_private_data' */
	ndr_print_ads_ldap_buf_in(ndr, "in", &r->in);
	ndr_print_ads_ldap_buf_out(ndr, "out", &r->out);
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_tlswrap(struct ndr_print *ndr, const char *name, const struct ads_tlswrap *r)
{
	ndr_print_struct(ndr, name, "ads_tlswrap");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_ptr(ndr, "mem_ctx", r->mem_ctx);
	/* [ignore] 'mem_ctx' */
	ndr_print_timeval(ndr, "endtime", &r->endtime);
	ndr_print_ptr(ndr, "sbiod", r->sbiod);
	/* [ignore] 'sbiod' */
	ndr_print_ptr(ndr, "tls_params", r->tls_params);
	/* [ignore] 'tls_params' */
	ndr_print_ptr(ndr, "tls_sync", r->tls_sync);
	/* [ignore] 'tls_sync' */
	ndr->depth--;
}

_PUBLIC_ void ndr_print_ads_ldap(struct ndr_print *ndr, const char *name, const struct ads_ldap *r)
{
	ndr_print_struct(ndr, name, "ads_ldap");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_ptr(ndr, "ld", r->ld);
	/* [ignore] 'ld' */
	ndr_print_sockaddr_storage(ndr, "ss", &r->ss);
	ndr_print_time_t(ndr, "last_attempt", r->last_attempt);
	ndr_print_int32(ndr, "port", r->port);
	ndr->depth--;
}

static void ndr_print_flags_ads_struct(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ads_struct *r)
{
	ndr_print_ads_struct(ndr, name, r);
}

_PUBLIC_ void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r)
{
	ndr_print_struct(ndr, name, "ads_struct");
	if (r == NULL) { ndr_print_null(ndr); return; }
	ndr->depth++;
	ndr_print_ads_server(ndr, "server", &r->server);
	ndr_print_ads_auth(ndr, "auth", &r->auth);
	ndr_print_ads_config(ndr, "config", &r->config);
	ndr_print_ads_saslwrap(ndr, "ldap_wrap_data", &r->ldap_wrap_data);
	ndr_print_ads_tlswrap(ndr, "ldap_tls_data", &r->ldap_tls_data);
	ndr_print_ads_ldap(ndr, "ldap", &r->ldap);
	ndr->depth--;
}

#ifndef SKIP_NDR_TABLE_ads
static const struct ndr_interface_public_struct ads_public_structs[] = {
	{
		.name = "ads_struct",
		.struct_size = sizeof(struct ads_struct ),
		.ndr_push = (ndr_push_flags_fn_t) ndr_push_ads_struct,
		.ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ads_struct,
		.ndr_print = (ndr_print_function_t) ndr_print_flags_ads_struct,
	},
	{ .name = NULL }
};

static const struct ndr_interface_call ads_calls[] = {
	{ .name = NULL }
};

static const char * const ads_endpoint_strings[] = {
	"ncacn_np:[\\pipe\\ads]", 
};

static const struct ndr_interface_string_array ads_endpoints = {
	.count	= 1,
	.names	= ads_endpoint_strings
};

static const char * const ads_authservice_strings[] = {
	"host", 
};

static const struct ndr_interface_string_array ads_authservices = {
	.count	= 1,
	.names	= ads_authservice_strings
};


const struct ndr_interface_table ndr_table_ads = {
	.name		= "ads",
	.num_calls	= 0,
	.calls		= ads_calls,
	.num_public_structs	= 1,
	.public_structs		= ads_public_structs,
	.endpoints	= &ads_endpoints,
	.authservices	= &ads_authservices
};

#endif /* SKIP_NDR_TABLE_ads */
