#include "libcli/resolve/resolve.h"
#include "nbt_server/dgram/proto.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "param/param.h"
/*
a list of mailslots that we have static handlers for
const char *mailslot_name;
dgram_mailslot_handler_t handler;
} mailslot_handlers[] = {
+ /* Handle both NTLOGON and NETLOGON in the same function, as
+ * they are very similar */
{ NBT_MAILSLOT_NETLOGON, nbtd_mailslot_netlogon_handler },
- { NBT_MAILSLOT_NTLOGON, nbtd_mailslot_ntlogon_handler },
+ { NBT_MAILSLOT_NTLOGON, nbtd_mailslot_netlogon_handler },
{ NBT_MAILSLOT_BROWSE, nbtd_mailslot_browse_handler }
};
}
bcast_addr = socket_address_from_strings(tmp_ctx, bcast_dgmsock->sock->backend_name,
- iface->bcast_address, lp_dgram_port());
+ iface->bcast_address,
+ lp_dgram_port(iface->nbtsrv->task->lp_ctx));
if (!bcast_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- iface->bcast_address, lp_dgram_port(), nt_errstr(status)));
+ iface->bcast_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx),
+ nt_errstr(status)));
return status;
}
}
bind_addr = socket_address_from_strings(tmp_ctx, iface->dgmsock->sock->backend_name,
- bind_address, lp_dgram_port());
+ bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx));
if (!bind_addr) {
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
DEBUG(0,("Failed to bind to %s:%d - %s\n",
- bind_address, lp_dgram_port(), nt_errstr(status)));
+ bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx), nt_errstr(status)));
return status;
}