#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/ndr_lsa_c.h"
+#include "param/param.h"
+
struct lookup_state {
struct nbt_name hostname;
const char *address;
struct composite_context *c;
struct lookup_state *s;
struct composite_context *cresolve_req;
- const char** methods;
+ struct resolve_context *resolve_ctx;
/* allocate context and state structures */
c = composite_create(ctx, ctx->event_ctx);
s->hostname.scope = NULL;
/* name resolution methods */
- if (io->in.methods) {
- methods = io->in.methods;
+ if (io->in.resolve_ctx) {
+ resolve_ctx = io->in.resolve_ctx;
} else {
- methods = ctx->name_res_methods;
+ resolve_ctx = ctx->resolve_ctx;
}
/* send resolve request */
- cresolve_req = resolve_name_send(&s->hostname, c->event_ctx, methods);
+ cresolve_req = resolve_name_send(resolve_ctx, &s->hostname, c->event_ctx);
if (composite_nomem(cresolve_req, c)) return c;
composite_continue(c, cresolve_req, continue_name_resolved, c);
struct libnet_LookupDCs *io)
{
struct composite_context *c;
- struct messaging_context *msg_ctx = messaging_client_init(mem_ctx, ctx->event_ctx);
+ struct messaging_context *msg_ctx =
+ messaging_client_init(mem_ctx, lp_messaging_path(mem_ctx, ctx->lp_ctx), ctx->event_ctx);
- c = finddcs_send(mem_ctx, io->in.domain_name, io->in.name_type,
- NULL, ctx->name_res_methods, ctx->event_ctx, msg_ctx);
+ c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx),
+ io->in.domain_name, io->in.name_type,
+ NULL, ctx->resolve_ctx, ctx->event_ctx, msg_ctx);
return c;
}
struct composite_context *c;
struct lookup_name_state *s;
struct rpc_request *lookup_req;
- BOOL prereq_met = False;
+ bool prereq_met = false;
c = composite_create(mem_ctx, ctx->event_ctx);
if (c == NULL) return NULL;