rpcclient/cmd_wkssvc.c

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003    NT Domain Authentication SMB / MSRPC client
00004    Copyright (C) Andrew Tridgell 1994-1997
00005    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
00006    
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011    
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016    
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 */
00021 
00022 THIS IS NO LONGER USED - NEEDS REMOVAL.
00023 
00024 #include "includes.h"
00025 
00026 #define DEBUG_TESTING
00027 
00028 extern struct cli_state *smb_cli;
00029 
00030 extern FILE* out_hnd;
00031 
00032 
00033 /****************************************************************************
00034 workstation get info query
00035 ****************************************************************************/
00036 void cmd_wks_query_info(struct client_info *info)
00037 {
00038         fstring dest_wks;
00039         fstring tmp;
00040         WKS_INFO_100 ctr;
00041         uint32 info_level = 100;
00042 
00043         BOOL res = True;
00044 
00045         memset((char *)&ctr, '\0', sizeof(ctr));
00046 
00047         fstrcpy(dest_wks, "\\\\");
00048         fstrcat(dest_wks, info->dest_host);
00049         strupper_m(dest_wks);
00050 
00051         if (next_token_nr(NULL, tmp, NULL, sizeof(tmp)))
00052         {
00053                 info_level = (uint32)strtol(tmp, (char**)NULL, 10);
00054         }
00055 
00056         DEBUG(4,("cmd_wks_query_info: server:%s info level: %d\n",
00057                                 dest_wks, info_level));
00058 
00059         DEBUG(5, ("cmd_wks_query_info: smb_cli->fd:%d\n", smb_cli->fd));
00060 
00061         /* open LSARPC session. */
00062         res = res ? cli_nt_session_open(smb_cli, PI_WKSSVC) : False;
00063 
00064         /* send info level: receive requested info.  hopefully. */
00065         res = res ? do_wks_query_info(smb_cli, 
00066                                 dest_wks, info_level, &ctr) : False;
00067 
00068         /* close the session */
00069         cli_nt_session_close(smb_cli);
00070 
00071         if (res)
00072         {
00073                 DEBUG(5,("cmd_wks_query_info: query succeeded\n"));
00074 
00075 #if 0
00076                 display_wks_info_100(out_hnd, ACTION_HEADER   , &ctr);
00077                 display_wks_info_100(out_hnd, ACTION_ENUMERATE, &ctr);
00078                 display_wks_info_100(out_hnd, ACTION_FOOTER   , &ctr);
00079 #endif
00080 
00081         }
00082         else
00083         {
00084                 DEBUG(5,("cmd_wks_query_info: query failed\n"));
00085         }
00086 }

Sambaに対してSat Aug 29 21:23:23 2009に生成されました。  doxygen 1.4.7