From 574788039f53fada4769731ea3fafe9710417b71 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Jan 2000 03:17:16 +0000 Subject: added the unexpected packet database (unexpected.tdb) this means "nmblookup -S" now always works, even with broken servers the database stores all unexpected replies and these can be accessed by any client. while doing this I cleaned up a couple of functions, and put in place a better trn_id generator. in most places the code got quite a bit simpler due to the addition of simple helper functions. I haven't yet put the code in to take advantage of this for pdc replies - that will be next. Jeremys pdc finding code will then work :) (This used to be commit 280e6359d36c9bc8dcded302f15c3a1db8e3feeb) --- source3/utils/nmblookup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 2f9bbc6c53..6214c0e45b 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -95,7 +95,7 @@ static BOOL query_one(char *lookup, unsigned int lookup_type) printf("querying %s on %s\n", lookup, inet_ntoa(bcast_addr)); ip_list = name_query(ServerFD,lookup,lookup_type,use_bcast, use_bcast?True:recursion_desired, - bcast_addr,&count,NULL); + bcast_addr,&count); } else { struct in_addr *bcast; for (j=iface_count() - 1; @@ -107,7 +107,7 @@ static BOOL query_one(char *lookup, unsigned int lookup_type) ip_list = name_query(ServerFD,lookup,lookup_type, use_bcast, use_bcast?True:recursion_desired, - *bcast,&count,NULL); + *bcast,&count); } } @@ -128,7 +128,7 @@ static BOOL query_one(char *lookup, unsigned int lookup_type) */ if (find_status) { printf("Looking up status of %s\n",inet_ntoa(ip_list[0])); - name_status(ServerFD,lookup,lookup_type,True,ip_list[0],NULL,NULL,NULL); + name_status(ServerFD,lookup,lookup_type,True,ip_list[0],NULL,NULL); printf("\n"); } @@ -243,7 +243,7 @@ int main(int argc,char *argv[]) fstrcpy(lookup,"*"); ip = *interpret_addr2(argv[i]); printf("Looking up status of %s\n",inet_ntoa(ip)); - name_status(ServerFD,lookup,lookup_type,True,ip,NULL,NULL,NULL); + name_status(ServerFD,lookup,lookup_type,True,ip,NULL,NULL); printf("\n"); continue; } -- cgit