2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Server Service (srvsvc) client side RPC library interface. The 2N/A * srvsvc interface allows a client to query a server for information 2N/A * on shares, sessions, connections and files on the server. Some 2N/A * functions are available via anonymous IPC while others require 2N/A * administrator privilege. Also, some functions return NT status 2N/A * values while others return Win32 errors codes. 2N/A * Information level for NetShareGetInfo. 2N/A * Bind to the the SRVSVC. 2N/A * If username argument is NULL, an anonymous connection will be established. 2N/A * Otherwise, an authenticated connection will be established. 2N/A * Unbind the SRVSVC connection. 2N/A * This is a client side routine for NetShareGetInfo enumeration. 2N/A * Only level 1 request is supported. 2N/A * This is a client side routine for NetShareGetInfo. 2N/A * Levels 0 and 1 work with an anonymous connection but 2N/A * level 2 requires administrator access. 2N/A * This is a client side routine for NetFilesEnum. 2N/A * NetFilesEnum requires administrator rights. 2N/A * Level 2 and 3 requests are supported. 2N/A * The basepath parameter specifies a qualifier for the returned information. 2N/A * If this parameter is not NULL, the server MUST enumerate only resources that 2N/A * have basepath as a prefix. 2N/A * If username parameter is specified, the server MUST limit the files returned 2N/A * to those that were opened by a session whose user name matches username. 2N/A * This is a client side routine for NetConnectEnum. 2N/A * NetConnectEnum requires administrator rights. 2N/A * Level 0 and 1 requests are supported. 2N/A * The qualifier parameter specifies a share name or computer name for 2N/A * connections of interest to the client. Qualifiers that begin with \\ are 2N/A * considered server names and anything else is considered a share name. 2N/A * Share names MUST NOT begin with \\. 2N/A * The qualifier parameter must not be NULL. 2N/A * This is a client side routine for NetSessionEnum. 2N/A * NetSessionEnum requires administrator rights. 2N/A * Only level 1 request is supported. 2N/A * The clientname parameter specifies a qualifier for the returned information. 2N/A * If a clientname is specified (i.e. it is not a NULL (zero-length) string), 2N/A * the client computer name MUST match the ClientName for the session to be 2N/A * returned. If a clientname is specified, it MUST start with "\\". 2N/A * The username parameter specifies a qualifier for the returned information. 2N/A * If a username is specified (that is, not a NULL (zero-length) string), the 2N/A * user name MUST match the username parameter for the session to be returned. 2N/A * Windows 95+ and Windows NT4.0 both report the version as 4.0. 2N/A * Windows 2000+ reports the version as 5.x. 2N/A * NetRemoteTOD to get the current GMT time from a Windows NT server. 2N/A * Wrapper function for srvsvc_net_remote_tod() that gets the time and 2N/A * date from the selected DC. The time information is returned in 2N/A * the timeval and tm. 2N/A * Upon detection of a DC failure, reports the failed DC to DC failover 2N/A * service and retries with a newly selected DC after DC failover completes. 2N/A * This is a client side routine for NetRemoteTOD, which gets the time 2N/A * and date from a remote system. The time information is returned in 2N/A * the timeval and tm. 2N/A * typedef struct _TIME_OF_DAY_INFO { 2N/A * DWORD tod_elapsedt; // seconds since 00:00:00 January 1 1970 GMT 2N/A * DWORD tod_msecs; // arbitrary milliseconds (since reset) 2N/A * DWORD tod_hours; // current hour [0-23] 2N/A * DWORD tod_mins; // current minute [0-59] 2N/A * DWORD tod_secs; // current second [0-59] 2N/A * DWORD tod_hunds; // current hundredth (0.01) second [0-99] 2N/A * LONG tod_timezone; // time zone of the server 2N/A * DWORD tod_tinterval; // clock tick time interval 2N/A * DWORD tod_day; // day of the month [1-31] 2N/A * DWORD tod_month; // month of the year [1-12] 2N/A * DWORD tod_year; // current year 2N/A * DWORD tod_weekday; // day of the week since sunday [0-6] 2N/A * } TIME_OF_DAY_INFO; 2N/A * The time zone of the server is calculated in minutes from Greenwich 2N/A * Mean Time (GMT). For time zones west of Greenwich, the value is 2N/A * positive; for time zones east of Greenwich, the value is negative. 2N/A * A value of -1 indicates that the time zone is undefined. 2N/A * The clock tick value represents a resolution of one ten-thousandth 2N/A * We're assigning milliseconds to microseconds 2N/A * here but the value's not really relevant.