From 2383787f199c51cdc202a3cef5822a9fe6b8774c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 11:18:56 +0000 Subject: r4891: - added a generic resolve_name() async interface in libcli/resolve/, which will eventually try all resolution methods setup in smb.conf - only resolution backend at the moment is bcast, which does a parallel broadcast to all configured network interfaces, and takes the first reply that comes in (this nicely demonstrates how to do parallel requests using the async APIs) - converted all the existing code to use the new resolve_name() api - removed all the old nmb code (yay!) (This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3) --- source4/libcli/nbt/namequery.c | 66 ------------------------------------------ 1 file changed, 66 deletions(-) (limited to 'source4/libcli/nbt/namequery.c') diff --git a/source4/libcli/nbt/namequery.c b/source4/libcli/nbt/namequery.c index 23a63ede11..05d5e55491 100644 --- a/source4/libcli/nbt/namequery.c +++ b/source4/libcli/nbt/namequery.c @@ -209,69 +209,3 @@ NTSTATUS nbt_name_status(struct nbt_name_socket *nbtsock, } -/* - some test functions - will be removed when nbt is hooked in everywhere -*/ -void test_name_status(const char *name, const char *addr) -{ - struct nbt_name_status io; - NTSTATUS status; - TALLOC_CTX *tmp_ctx = talloc_new(NULL); - struct nbt_name_socket *nbtsock; - int i; - - nbtsock = nbt_name_socket_init(tmp_ctx, NULL); - - io.in.name.name = name; - io.in.name.scope = NULL; - io.in.name.type = NBT_NAME_CLIENT; - io.in.dest_addr = addr; - io.in.timeout = 5; - - status = nbt_name_status(nbtsock, tmp_ctx, &io); - if (!NT_STATUS_IS_OK(status)) { - printf("status failed for %s - %s\n", name, nt_errstr(status)); - talloc_free(tmp_ctx); - exit(1); - return; - } - - printf("Received %d names for %s\n", io.out.status.num_names, io.out.name.name); - for (i=0;i