From 205876345537ce80b24cc65dd1b610c22a117767 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 26 Oct 1997 07:50:28 +0000 Subject: added -U option to nmblookup. This is similar to -B except that it forces the client to send a unicast instead of a broadcast netbios packet. This is useful for diagnostics. (This used to be commit 57e0fac61414c032df35c8a4c0ba4d3a9f55c5b8) --- source3/utils/nmblookup.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index d26d199695..a44dad511e 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -100,6 +100,7 @@ int main(int argc,char *argv[]) int i; static pstring servicesf = CONFIGFILE; struct in_addr bcast_addr; + BOOL use_bcast = True; BOOL got_bcast = False; BOOL lookup_by_ip = False; @@ -112,13 +113,20 @@ int main(int argc,char *argv[]) charset_initialise(); - while ((opt = getopt(argc, argv, "d:B:i:s:SMrhA")) != EOF) + while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhA")) != EOF) switch (opt) { case 'B': iface_set_default(NULL,optarg,NULL); bcast_addr = *interpret_addr2(optarg); got_bcast = True; + use_bcast = True; + break; + case 'U': + iface_set_default(NULL,optarg,NULL); + bcast_addr = *interpret_addr2(optarg); + got_bcast = True; + use_bcast = False; break; case 'i': fstrcpy(scope,optarg); @@ -172,7 +180,6 @@ int main(int argc,char *argv[]) for (i=optind;i