static struct ldb_dn *winsdb_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
				const struct nbt_name *name)
{
	struct ldb_dn *dn;

	dn = ldb_dn_new_fmt(mem_ctx, ldb, "type=0x%02X", name->type);
	if (ldb_dn_is_valid(dn) && name->name && *name->name) {
		ldb_dn_add_child_fmt(dn, "name=%s", name->name);
	}
	if (ldb_dn_is_valid(dn) && name->scope && *name->scope) {
		ldb_dn_add_child_fmt(dn, "scope=%s", name->scope);
	}
	return dn;
}
static struct ldb_dn *winsdb_dn(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
				const struct nbt_name *name)
{
	struct ldb_dn *dn;

	dn = ldb_dn_new_fmt(mem_ctx, ldb, "type=0x%02X", name->type);
	if (ldb_dn_is_valid(dn) && name->name && *name->name) {
		ldb_dn_add_child_fmt(dn, "name=%s", name->name);
	}
	if (ldb_dn_is_valid(dn) && name->scope && *name->scope) {
		ldb_dn_add_child_fmt(dn, "scope=%s", name->scope);
	}
	return dn;
}