diff options
Diffstat (limited to 'source3/utils/nmblookup.c')
-rw-r--r-- | source3/utils/nmblookup.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 8e4f5aab03..9549d16d04 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -25,7 +25,6 @@ extern BOOL AllowDebugChange; -static BOOL give_flags = False; static BOOL use_bcast = True; static BOOL got_bcast = False; static struct in_addr bcast_addr; @@ -64,7 +63,6 @@ static void usage(void) d_printf("Version %s\n",VERSION); d_printf("\t-d debuglevel set the debuglevel\n"); d_printf("\t-B broadcast address the address to use for broadcasts\n"); - d_printf("\t-f list the NMB flags returned\n"); d_printf("\t-U unicast address the address to use for unicast\n"); d_printf("\t-M searches for a master browser\n"); d_printf("\t-R set recursion desired in packet\n"); @@ -101,24 +99,6 @@ static char *node_status_flags(unsigned char flags) } /**************************************************************************** -turn the NMB Query flags into a string -****************************************************************************/ -static char *query_flags(int flags) -{ - static fstring ret1; - fstrcpy(ret1, ""); - - if (flags & NM_FLAGS_RS) fstrcat(ret1, "Response "); - if (flags & NM_FLAGS_AA) fstrcat(ret1, "Authoritative "); - if (flags & NM_FLAGS_TC) fstrcat(ret1, "Truncated "); - if (flags & NM_FLAGS_RD) fstrcat(ret1, "Recursion_Desired "); - if (flags & NM_FLAGS_RA) fstrcat(ret1, "Recursion_Available "); - if (flags & NM_FLAGS_B) fstrcat(ret1, "Broadcast "); - - return ret1; -} - -/**************************************************************************** do a node status query ****************************************************************************/ static void do_node_status(int fd, char *name, int type, struct in_addr ip) @@ -152,14 +132,14 @@ send out one query ****************************************************************************/ static BOOL query_one(char *lookup, unsigned int lookup_type) { - int j, count, flags = 0; + int j, count; struct in_addr *ip_list=NULL; if (got_bcast) { d_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, &flags, NULL); + bcast_addr,&count); } else { struct in_addr *bcast; for (j=iface_count() - 1; @@ -171,15 +151,12 @@ 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, &flags, NULL); + *bcast,&count); } } if (!ip_list) return False; - if (give_flags) - d_printf("Flags: %s\n", query_flags(flags)); - for (j=0;j<count;j++) { if (translate_addresses) { struct hostent *host = gethostbyaddr((char *)&ip_list[j], sizeof(ip_list[j]), AF_INET); @@ -226,7 +203,7 @@ int main(int argc,char *argv[]) setup_logging(argv[0],True); - while ((opt = getopt(argc, argv, "d:fB:U:i:s:SMrhART")) != EOF) + while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhART")) != EOF) switch (opt) { case 'B': @@ -234,9 +211,6 @@ int main(int argc,char *argv[]) got_bcast = True; use_bcast = True; break; - case 'f': - give_flags = True; - break; case 'U': bcast_addr = *interpret_addr2(optarg); got_bcast = True; |