From bf2c5e2bdeaeee3f157657be701a3e3cba480e15 Mon Sep 17 00:00:00 2001 From: Rishi Srivatsavai Date: Mon, 17 Dec 2007 22:09:09 -0800 Subject: Add smbclient support for basic mDNS browsing. Patch from Rishi Srivatsavai (bugzilla #4150), with tallocification and minor syle changes by me. (This used to be commit db74b99d0ef1a60894c838b4c9d0d454db6cf620) --- source3/client/client.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index d59af9e6cf..97d7cf0e0b 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -28,10 +28,13 @@ #define REGISTER 0 #endif +extern int do_smb_browse(void); /* mDNS browsing */ + extern bool AllowDebugChange; extern bool override_logfile; extern char tar_type; extern bool in_client; + static int port = 0; static char *service; static char *desthost; @@ -4512,6 +4515,7 @@ static int do_message_op(void) { "send-buffer", 'b', POPT_ARG_INT, &io_bufsize, 'b', "Changes the transmit/send buffer", "BYTES" }, { "port", 'p', POPT_ARG_INT, &port, 'p', "Port to connect to", "PORT" }, { "grepable", 'g', POPT_ARG_NONE, NULL, 'g', "Produce grepable output" }, + { "browse", 'B', POPT_ARG_NONE, NULL, 'B', "Browse SMB servers using DNS" }, POPT_COMMON_SAMBA POPT_COMMON_CONNECTION POPT_COMMON_CREDENTIALS @@ -4654,6 +4658,9 @@ static int do_message_op(void) case 'g': grepable=true; break; + case 'B': + return(do_smb_browse()); + } } -- cgit