00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
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
00062 res = res ? cli_nt_session_open(smb_cli, PI_WKSSVC) : False;
00063
00064
00065 res = res ? do_wks_query_info(smb_cli,
00066 dest_wks, info_level, &ctr) : False;
00067
00068
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 }