diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-11-19 23:50:02 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-11-19 23:50:02 +0000 |
commit | 4561b8242e12c63401d008e7fdb2442457bd366d (patch) | |
tree | 67c988bc31345efb8225aa964baa57365b569b34 /source/utils/nmblookup.c | |
parent | 02721a9f1be6aed11a68b70c910056f054c64f67 (diff) | |
download | samba-4561b8242e12c63401d008e7fdb2442457bd366d.tar.gz samba-4561b8242e12c63401d008e7fdb2442457bd366d.tar.xz samba-4561b8242e12c63401d008e7fdb2442457bd366d.zip |
changed nmblookup to only set recursion_desired in queries if the -R
option is used.
Diffstat (limited to 'source/utils/nmblookup.c')
-rw-r--r-- | source/utils/nmblookup.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c index a44dad511e2..1f74d7a130f 100644 --- a/source/utils/nmblookup.c +++ b/source/utils/nmblookup.c @@ -77,7 +77,9 @@ static void usage(void) printf("Version %s\n",VERSION); printf("\t-d debuglevel set the debuglevel\n"); printf("\t-B broadcast address the address to use for broadcasts\n"); + printf("\t-U unicast address the address to use for unicast\n"); printf("\t-M searches for a master browser\n"); + printf("\t-R set recursion desired in packet\n"); printf("\t-S lookup node status as well\n"); printf("\t-r Use root port 137 (Win95 only replies to this)\n"); printf("\t-A Do a node status on <name> as an IP Address\n"); @@ -103,7 +105,8 @@ int main(int argc,char *argv[]) BOOL use_bcast = True; BOOL got_bcast = False; BOOL lookup_by_ip = False; - + BOOL recursion_desired = False; + DEBUGLEVEL = 1; *lookup = 0; @@ -113,7 +116,7 @@ int main(int argc,char *argv[]) charset_initialise(); - while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhA")) != EOF) + while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhAR")) != EOF) switch (opt) { case 'B': @@ -138,6 +141,9 @@ int main(int argc,char *argv[]) case 'S': find_status = True; break; + case 'R': + recursion_desired = True; + break; case 'd': DEBUGLEVEL = atoi(optarg); break; @@ -213,7 +219,7 @@ int main(int argc,char *argv[]) retries = 1; } - if (name_query(ServerFD,lookup,lookup_type,use_bcast,True, + if (name_query(ServerFD,lookup,lookup_type,use_bcast,recursion_desired, bcast_addr,&ip,NULL)) { printf("%s %s\n",inet_ntoa(ip),lookup); |