preparing for release of alpha.1.4
[Samba.git] / source / rpcclient / cmd_brs.c
blob886d8e7ced020bb4260408b6f78e7d973d855688
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 NT Domain Authentication SMB / MSRPC client
5 Copyright (C) Andrew Tridgell 1994-1999
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1999
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifdef SYSLOG
26 #undef SYSLOG
27 #endif
29 #include "includes.h"
30 #include "rpc_brs.h"
31 #include "nterr.h"
33 extern int DEBUGLEVEL;
35 #define DEBUG_TESTING
37 extern FILE* out_hnd;
40 /****************************************************************************
41 Browser get info query
42 ****************************************************************************/
43 void cmd_brs_query_info(struct client_info *info, int argc, char *argv[])
45 fstring dest_brs;
46 BRS_INFO_100 ctr;
47 uint32 info_level = 100;
49 BOOL res = True;
51 bzero(&ctr, sizeof(ctr));
53 fstrcpy(dest_brs, "\\\\");
54 fstrcat(dest_brs, info->dest_host);
55 strupper(dest_brs);
57 if (argc > 1)
59 info_level = (uint32)strtol(argv[1], (char**)NULL, 10);
62 DEBUG(4,("cmd_brs_query_info: server:%s info level: %d\n",
63 dest_brs, info_level));
65 /* send info level: receive requested info. hopefully. */
66 res = res ? brs_query_info( dest_brs, info_level, &ctr) : False;
68 if (res)
70 DEBUG(5,("cmd_brs_query_info: query succeeded\n"));
72 #if 0
73 display_brs_info_100(out_hnd, ACTION_HEADER , &ctr);
74 display_brs_info_100(out_hnd, ACTION_ENUMERATE, &ctr);
75 display_brs_info_100(out_hnd, ACTION_FOOTER , &ctr);
76 #endif
79 else
81 DEBUG(5,("cmd_brs_query_info: query failed\n"));