summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/namequery.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/nbt/namequery.c')
-rw-r--r--source4/libcli/nbt/namequery.c66
1 files changed, 0 insertions, 66 deletions
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<io.out.status.num_names;i++) {
- printf("\t%s#%02x 0x%04x\n",
- io.out.status.names[i].name,
- io.out.status.names[i].type,
- io.out.status.names[i].nb_flags);
- }
- talloc_free(tmp_ctx);
-}
-
-
-void test_name_query(const char *name)
-{
- struct nbt_name_query io;
- NTSTATUS status;
- TALLOC_CTX *tmp_ctx = talloc_new(NULL);
- struct nbt_name_socket *nbtsock;
-
- nbtsock = nbt_name_socket_init(tmp_ctx, NULL);
-
- io.in.name.name = name;
- io.in.name.scope = NULL;
- io.in.name.type = NBT_NAME_SERVER;
- io.in.dest_addr = "255.255.255.255";
- io.in.broadcast = True;
- io.in.wins_lookup = False;
- io.in.timeout = 5;
-
- status = nbt_name_query(nbtsock, tmp_ctx, &io);
- if (!NT_STATUS_IS_OK(status)) {
- printf("query failed for %s - %s\n", name, nt_errstr(status));
- } else {
- printf("response %s is at %s\n", io.out.name.name, io.out.reply_addr);
- test_name_status("*", io.out.reply_addr);
- }
-
- talloc_free(tmp_ctx);
-}
-