Sunteți pe pagina 1din 49

Microsoft Ò

Internet
Information
Server Ô

Web Server for Windows NT Server

Administration API Specification

Lester Waters
March 29, 1996
Version 0.12

Microsoft Confidential Page 0


Legal Notice
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of
publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This document is for information purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
IN THIS DOCUMENT.

Microsoft, Win32, Windows NT, and Windows are registered trademarks and BackOffice, and the BackOffice logo are trademarks of
Microsoft Corporation.

0396 Part No. 098-xxxxx

Printed in the United States of America.

Microsoft Confidential Page 1


1Overview
This document provides administrative programming information for the Microsoft Internet Information
Server v1.0. The administration APIs documented herein are subject to change without notice. It is
strongly recommended that the InetInfoGetVersion() API be called and the version number checked prior
to doing any other API calls. Also, unused optional and reserved parameters should be set to either NULL
or zero (depending on the parameter type).

Since the API is used over RPC, one should be prepared to handle unexpected errors from the API (such as
network errors, etc.) and not assume that the set of possible errors described herein are exclusive. Note
that Personal Web Servers running on NT Workstation machines may not be remotely administered. In
such a case, the server name parameter in the APIs must be NULL.

Note that you need to be an Administrator in order to use most (if not all) of the APIs documented herein.

Origin (MS Confidential)


API headers were taken from INETCOM.H and INETINFO.H

NET_API_STATUS needs defining… == Win32 Error codes??

The chapters in this document are organized by service. There is a separate chapter for IIS Server (as
opposed to service) administration. Each chapter summarizes the service and covers constants, data
structures, and APIs. Although every attempt has been made to verify the contents herein, Microsoft
cannot ensure 100% accuracy of this document. Should customer support be required, contact Microsoft
Product Support Services to inquire about the support packages available.

Microsoft Confidential Page 2


2IIS General Items
This chapter covers the administration APIs which are global to IIS and not specific to any one of the IIS
services (i.e., WWW, FTP, Gopher).

APIs include:

InetInfoGetVersion()
InetInfoGetGlobalAdminInformation()
InetInfoSetGlobalAdminInformation()
InetInfoGetAdminInformation()
InetInfoSetAdminInformation()
InetInfoQueryStatistics()
InetInfoClearStatistics()
InetInfoFlushMemoryCache()

2.1Constants
What is PWLEN’s value?

//
// Authentication requirements values
//

#define INET_INFO_AUTH_ANONYMOUS 0x00000001


#define INET_INFO_AUTH_CLEARTEXT 0x00000002 // Includes HTTP Basic
#define INET_INFO_AUTH_NT_AUTH 0x00000004

//
// Simple macro that sets the ith bit
//

#define BitFlag(i) ((0x1) << (i))

//
// Field control values for the INET_INFO_CONFIG_INFO structure
//
typedef DWORD FIELD_CONTROL;
typedef DWORD FIELD_FLAG;
#define FC_INET_INFO_AUTHENTICATION ((FIELD_CONTROL)BitFlag(16))
#define FC_INET_INFO_ALLOW_ANONYMOUS ((FIELD_CONTROL)BitFlag(17))
#define FC_INET_INFO_LOG_ANONYMOUS ((FIELD_CONTROL)BitFlag(18))
#define FC_INET_INFO_LOG_NONANONYMOUS ((FIELD_CONTROL)BitFlag(19))
#define FC_INET_INFO_ANON_USER_NAME ((FIELD_CONTROL)BitFlag(20))
#define FC_INET_INFO_ANON_PASSWORD ((FIELD_CONTROL)BitFlag(21))
#define FC_INET_INFO_PORT_NUMBER ((FIELD_CONTROL)BitFlag(22))
#define FC_INET_INFO_SITE_SECURITY ((FIELD_CONTROL)BitFlag(23))
#define FC_INET_INFO_VIRTUAL_ROOTS ((FIELD_CONTROL)BitFlag(24))

// common parameters for publishing servers only


# define FC_INET_INFO_PUBLISHING_SVCS_ALL (FC_INET_INFO_AUTHENTICATION
| \
FC_INET_INFO_ALLOW_ANONYMOUS | \
FC_INET_INFO_LOG_ANONYMOUS | \
FC_INET_INFO_LOG_NONANONYMOUS | \
FC_INET_INFO_ANON_USER_NAME | \
FC_INET_INFO_ANON_PASSWORD | \

Microsoft Confidential Page 3


FC_INET_INFO_PORT_NUMBER | \
FC_INET_INFO_SITE_SECURITY | \
FC_INET_INFO_VIRTUAL_ROOTS \
)

//
// Virtual root access mask values
//
#define VROOT_MASK_READ 0x00000001
#define VROOT_MASK_WRITE 0x00000002
#define VROOT_MASK_EXECUTE 0x00000004
#define VROOT_MASK_SSL 0x00000008

#define VROOT_MASK_MASK 0x0000000f

#define FC_GINET_INFO_BANDWIDTH_LEVEL ((FIELD_CONTROL)BitFlag(0))


#define FC_GINET_INFO_MEMORY_CACHE_SIZE ((FIELD_CONTROL)BitFlag(1))

#define FC_GINET_INFO_ALL \
( FC_GINET_INFO_BANDWIDTH_LEVEL | \
FC_GINET_INFO_MEMORY_CACHE_SIZE | \
0 \
)

//
// Server bitfield mask definitions
//
#define INET_FTP 0x0001
#define INET_GOPHER 0x0002
#define INET_HTTP 0x0004

// Log File Periods -- options identifying logging periods for InetaLogToFile


#define INET_LOG_PERIOD_NONE 0
#define INET_LOG_PERIOD_DAILY 1
#define INET_LOG_PERIOD_WEEKLY 2
#define INET_LOG_PERIOD_MONTHLY 3
#define INET_LOG_PERIOD_YEARLY 4

# define MAX_TABLE_NAME_LEN ( 30) // Most DBs support only 30 bytes


# define MAX_USER_NAME_LEN ( UNLEN + 1)
# define MAX_PASSWORD_LEN ( PWLEN + 1)

//
// Field Control common for Gateway services
//
#define FC_INET_COM_CONNECTION_TIMEOUT ((FIELD_CONTROL)BitFlag(0))
#define FC_INET_COM_MAX_CONNECTIONS ((FIELD_CONTROL)BitFlag(1))
#define FC_INET_COM_LOG_CONFIG ((FIELD_CONTROL)BitFlag(2))
#define FC_INET_COM_ADMIN_NAME ((FIELD_CONTROL)BitFlag(3))
#define FC_INET_COM_SERVER_COMMENT ((FIELD_CONTROL)BitFlag(4))
#define FC_INET_COM_ADMIN_EMAIL ((FIELD_CONTROL)BitFlag(5))

Microsoft Confidential Page 4


#define FC_INET_COM_ALL \
( FC_INET_COM_CONNECTION_TIMEOUT |\
FC_INET_COM_MAX_CONNECTIONS |\
FC_INET_COM_LOG_CONFIG |\
FC_INET_COM_ADMIN_NAME |\
FC_INET_COM_SERVER_COMMENT |\
FC_INET_COM_ADMIN_EMAIL \
)

2.2Structures
Origin (MS Confidential)
See inetcom.h

2.2.1INET_LOG_CONFIGURATION
typedef struct _INET_LOG_CONFIGURATION
{

DWORD inetLogType; // type of log.

// File specific logging. (valid if inetLogType == INET_LOG_TO_FILE)


DWORD ilPeriod; // one of Log File Periods

// Empty string means do not modify existing default


WCHAR rgchLogFileDirectory[MAX_PATH]; // dest for log files

// Zero value means do not modify the existing default.


DWORD cbSizeForTruncation; // max size for each log file.

// Sql specific logging (valid if inetLogType == INET_LOG_TO_SQL)


// Empty string means do not modify existing default
WCHAR rgchDataSource[MAX_PATH]; // ODBC data source name
WCHAR rgchTableName[MAX_TABLE_NAME_LEN]; // table name on data source
WCHAR rgchUserName[MAX_USER_NAME_LEN];
// name of user for ODBC connections
WCHAR rgchPassword[MAX_PASSWORD_LEN]; // password for ODBC
connection

} INET_LOG_CONFIGURATION, * LPINET_LOG_CONFIGURATION;

Microsoft Confidential Page 5


2.2.2INET_COM_CONFIG_INFO
typedef struct _INET_COM_CONFIG_INFO
{
DWORD dwConnectionTimeout; // how long to hold connections
DWORD dwMaxConnections; // max connections allowed

LPWSTR lpszAdminName;
LPWSTR lpszAdminEmail;
LPWSTR lpszServerComment;

LPINET_LOG_CONFIGURATION lpLogConfig;

LANGID LangId; // These are read only


LCID LocalId;
BYTE ProductId[64];

} INET_COM_CONFIG_INFO, *LPINET_COM_CONFIG_INFO;

2.2.3INET_COMMON_CONFIG_INFO
typedef struct _INET_COMMON_CONFIG_INFO
{
FIELD_CONTROL FieldControl;
INET_COM_CONFIG_INFO CommonConfigInfo;

} *LPINET_COMMON_CONFIG_INFO;

2.2.4INET_COM_CACHE_STATISTICS
typedef struct _INET_COM_CACHE_STATISTICS {

//
// These are memory cache counters
//

DWORD CacheBytesTotal; // Only returned for global


statistics
DWORD CacheBytesInUse;
DWORD CurrentOpenFileHandles;
DWORD CurrentDirLists;
DWORD CurrentObjects;
DWORD FlushesFromDirChanges;
DWORD CacheHits;
DWORD CacheMisses;

} INET_COM_CACHE_STATISTICS;

2.2.5INET_COM_ATQ_STATISTICS
typedef struct _INET_COM_ATQ_STATISTICS {

// Numbers related to Atq Blocking, Rejections of requests


DWORD TotalBlockedRequests;
DWORD TotalRejectedRequests;
DWORD TotalAllowedRequests;
DWORD CurrentBlockedRequests;

Microsoft Confidential Page 6


DWORD MeasuredBandwidth;

} INET_COM_ATQ_STATISTICS;

2.2.6INET_INFO_IP_SEC_ENTRY
typedef struct _INET_INFO_IP_SEC_ENTRY
{
DWORD dwMask; // Mask and network number in
DWORD dwNetwork; // network order

} INET_INFO_IP_SEC_ENTRY, *LPINET_INFO_IP_SEC_ENTRY;

2.2.7INET_INFO_IP_SEC_LIST
typedef struct _INET_INFO_IP_SEC_LIST
{
DWORD cEntries;
INET_INFO_IP_SEC_ENTRY aIPSecEntry[];

} INET_INFO_IP_SEC_LIST, *LPINET_INFO_IP_SEC_LIST;

2.2.8INET_INFO_VIRTUAL_ROOT_ENTRY
typedef struct _INET_INFO_VIRTUAL_ROOT_ENTRY
{
LPWSTR pszRoot; // Virtual root name
LPWSTR pszAddress; // Optional IP address
LPWSTR pszDirectory; // Physical direcotry
DWORD dwMask; // Mask for this virtual root
LPWSTR pszAccountName; // Account to connect as
WCHAR AccountPassword[PWLEN+1]; // Password for pszAccountName
DWORD dwError; // Error code if entry wasn't added
// only used for gets

} INET_INFO_VIRTUAL_ROOT_ENTRY, *LPINET_INFO_VIRTUAL_ROOT_ENTRY;

2.2.9INET_INFO_VIRTUAL_ROOT_LIST
typedef struct _INET_INFO_VIRTUAL_ROOT_LIST
{
DWORD cEntries;
INET_INFO_VIRTUAL_ROOT_ENTRY aVirtRootEntry[];

} INET_INFO_VIRTUAL_ROOT_LIST, *LPINET_INFO_VIRTUAL_ROOT_LIST;

Microsoft Confidential Page 7


2.2.10INET_INFO_CONFIG_INFO

typedef struct _INET_INFO_CONFIG_INFO


{
FIELD_CONTROL FieldControl;

INET_COM_CONFIG_INFO CommonConfigInfo;

BOOL fLogAnonymous; // Log Anonymous users?


BOOL fLogNonAnonymous; // Log Non anonymous users?

LPWSTR lpszAnonUserName; // Anonymous user name?


WCHAR szAnonPassword[PWLEN+1]; // Password for the anonymous user

DWORD dwAuthentication; // What authentication is enabled?

short sPort; // Port Number for service

LPINET_INFO_IP_SEC_LIST DenyIPList; // Site security deny list


LPINET_INFO_IP_SEC_LIST GrantIPList; // Site security grant list

LPINET_INFO_VIRTUAL_ROOT_LIST VirtualRoots; // Symlinks to other data dirs

} INET_INFO_CONFIG_INFO, * LPINET_INFO_CONFIG_INFO;

2.2.11INET_INFO_GLOBAL_CONFIG_INFO
typedef struct _INET_INFO_GLOBAL_CONFIG_INFO
{
FIELD_CONTROL FieldControl;

DWORD BandwidthLevel; // Bandwidth Level used.


DWORD cbMemoryCacheSize;

} INET_INFO_GLOBAL_CONFIG_INFO, * LPINET_INFO_GLOBAL_CONFIG_INFO;

2.2.12INET_INFO_STATISTICS_0
typedef struct _INET_INFO_STATISTICS_0
{

INET_COM_CACHE_STATISTICS CacheCtrs;
INET_COM_ATQ_STATISTICS AtqCtrs;

# ifndef NO_AUX_PERF ??Does the retail version have this??


DWORD nAuxCounters; // number of active counters in rgCounters
DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
# endif // NO_AUX_PERF

} INET_INFO_STATISTICS_0, * LPINET_INFO_STATISTICS_0;

2.3IIS Service APIs

Microsoft Confidential Page 8


Origin (MS Confidential)
/src/internet/svcs/dll/info/server/rpcsupp.cxx

2.3.1InetInfoGetVersion()

This API returns the version of the server OR IS THIS THE INFOCOM version # for RPC purposes?.
Primarily intended to detect downlevel servers for future versions of the admin tool.

NET_API_STATUS
NET_API_FUNCTION
InetInfoGetVersion(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwReserved,
OUT DWORD * pdwVersion
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwReserved Reserved. Must be zero.

pdwVersion Pointer to the DWORD where the version number will be returned. The high
order byte is the major version number (0x01) and the low order byte is the
minor version number (0x00). VERIFY THIS

Returns

NO_ERROR is typically returned, unless an RPC / network error occurs..

Comments

None.

2.3.2InetInfoGetGlobalAdminInformation()

This API returns the current global service operating values for the server.

NET_API_STATUS
NET_API_FUNCTION
InetInfoGetGlobalAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwReserved,
OUT LPINET_INFO_GLOBAL_CONFIG_INFO * ppConfig
);

Parameters

Microsoft Confidential Page 9


pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwReserved Reserved. Must be zero.

ppConfig Pointer to a location where a pointer to the


INET_INFO_GLOBAL_CONFIG_INFO structure will be returned. The
structure pointed to contains the current configuration information.

Returns

NET_API_STATUS indicates the result code.

2.3.3InetInfoSetGlobalAdminInformation()

This API sets the current global service operating values for the server.

NET_API_STATUS
NET_API_FUNCTION
InetInfoSetGlobalAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwReserved,
IN INET_INFO_GLOBAL_CONFIG_INFO * pConfig
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwReserved Reserved. Must be zero.

pConfig Pointer to the INET_INFO_GLOBAL_CONFIG_INFO structure containing the


configuration information to be set.

Returns

NET_API_STATUS indicates the result code.

2.3.4InetInfoGetAdminInformation()

This API returns the current common service admin information for the specified server in dwServerMask.

NET_API_STATUS
NET_API_FUNCTION
InetInfoGetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwServerMask,
OUT LPINET_INFO_CONFIG_INFO * ppConfig
);

Microsoft Confidential Page 10


Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwServerMask Bitfield of server to get the information for. ???

ppConfig Pointer to a location where a pointer to the INET_INFO_CONFIG_INFO


structure will be returned. The structure pointed to contains the current
configuration information.

Returns

NET_API_STATUS indicates the result code. Only one structure is returned (for which server of the
bitmask?)

2.3.5InetInfoSetAdminInformation()

This API sets the current common service admin information for the servers specified in dwServerMask.

NET_API_STATUS
NET_API_FUNCTION
InetInfoSetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwServerMask,
IN INET_INFO_CONFIG_INFO * pConfig
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwServerMask Bitfield of servers to set the information for. What is this mask?

pConfig Pointer to the INET_INFO_CONFIG_INFO structure containing the


administration information to be set.

Returns

NET_API_STATUS indicates the result code.

2.3.6InetInfoQueryStatistics()

This API returns the current global statistics for the server.

Microsoft Confidential Page 11


NET_API_STATUS
NET_API_FUNCTION
InetInfoQueryStatistics(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwLevel,
IN DWORD dwServerMask,
OUT LPBYTE * pBuffer // LPINET_INFO_STATISTICS_INFO StatsInfo
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwLevel Indicates the level of information to be returned. Only level 0 is valid. Level 0
returns a structure of INET_INFO_STATISTICS_0.

pBuffer Pointer to a buffer in which the reslting structure is to be placed. The structure
will depend upon the dwLevel requested.

Returns

NET_API_STATUS indicates the result code. An error of ERROR_INVALID_LEVEL is returned if


dwLevel is invalid.

2.3.7InetInfoClearStatistics()

This API clears the server statistics.

NET_API_STATUS
NET_API_FUNCTION
InetInfoClearStatistics(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwServerMask
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwServerMask Bitfield of servers to set the information for. What is this mask?

Returns

NET_API_STATUS indicates the result code.

2.3.8InetInfoFlushMemoryCache()

This API flushes the serve’s memory cache.

Microsoft Confidential Page 12


NET_API_STATUS
NET_API_FUNCTION
InetInfoFlushMemoryCache(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwServerMask
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwServerMask Bitfield of servers to set the information for. What is this mask?

Returns

NET_API_STATUS indicates the result code.

Microsoft Confidential Page 13


3WWW Service
This chapter covers the World Wide Web (WWW) Publishing service of the Microsoft Internet
Information Server.

APIs include:

W3GetAdminInformation()
W3SetAdminInformation()
W3QueryStatistics()
W3ClearStatistics()

3.1Constants
What is LARGE_INTEGER?

//
// Manifests for APIs
// BitFlag() is defined earlier…
//

#define FC_W3_DIR_BROWSE_CONTROL ((FIELD_CONTROL)BitFlag(0))


#define FC_W3_DEFAULT_LOAD_FILE ((FIELD_CONTROL)BitFlag(1))
#define FC_W3_CHECK_FOR_WAISDB ((FIELD_CONTROL)BitFlag(2))
#define FC_W3_DIRECTORY_IMAGE ((FIELD_CONTROL)BitFlag(3))
#define FC_W3_SERVER_AS_PROXY ((FIELD_CONTROL)BitFlag(4))
#define FC_W3_CATAPULT_USER_AND_PWD ((FIELD_CONTROL)BitFlag(5))
#define FC_W3_SSI_ENABLED ((FIELD_CONTROL)BitFlag(6))
#define FC_W3_SSI_EXTENSION ((FIELD_CONTROL)BitFlag(7))
#define FC_W3_GLOBAL_EXPIRE ((FIELD_CONTROL)BitFlag(8))
#define FC_W3_SCRIPT_MAPPING ((FIELD_CONTROL)BitFlag(9))

//
// HTTP Directory browsing flags
//
#define DIRBROW_SHOW_ICON 0x00000001
#define DIRBROW_SHOW_DATE 0x00000002
#define DIRBROW_SHOW_TIME 0x00000004
#define DIRBROW_SHOW_SIZE 0x00000008
#define DIRBROW_SHOW_EXTENSION 0x00000010
#define DIRBROW_LONG_DATE 0x00000020

#define DIRBROW_ENABLED 0x80000000


#define DIRBROW_LOADDEFAULT 0x40000000

#define DIRBROW_MASK (DIRBROW_SHOW_ICON | \


DIRBROW_SHOW_DATE | \
DIRBROW_SHOW_TIME | \
DIRBROW_SHOW_SIZE | \
DIRBROW_SHOW_EXTENSION | \
DIRBROW_LONG_DATE | \
DIRBROW_LOADDEFAULT | \
DIRBROW_ENABLED)

Microsoft Confidential Page 14


//
// Setting the csecGlobalExpire field to this value will prevent the server
// from generating an "Expires:" header.
//
#define NO_GLOBAL_EXPIRE 0xffffffff

//
// Encryption Capabilities
//
#define ENC_CAPS_NOT_INSTALLED 0x80000000 // No keys installed
#define ENC_CAPS_DISABLED 0x40000000 // Disabled due to locale
#define ENC_CAPS_SSL 0x00000001 // SSL active
#define ENC_CAPS_PCT 0x00000002 // PCT active

//
// Encryption type (SSL/PCT etc) portion of encryption flag dword
//
#define ENC_CAPS_TYPE_MASK (ENC_CAPS_SSL | \
ENC_CAPS_PCT)

#define ENC_CAPS_DEFAULT ENC_CAPS_TYPE_MASK

3.2Structures

3.2.1W3_STATISTICS_0
typedef struct _W3_STATISTICS_0
{
LARGE_INTEGER TotalBytesSent;
LARGE_INTEGER TotalBytesReceived;
DWORD TotalFilesSent;
DWORD TotalFilesReceived;
DWORD CurrentAnonymousUsers;
DWORD CurrentNonAnonymousUsers;
DWORD TotalAnonymousUsers;
DWORD TotalNonAnonymousUsers;
DWORD MaxAnonymousUsers;
DWORD MaxNonAnonymousUsers;
DWORD CurrentConnections;
DWORD MaxConnections;
DWORD ConnectionAttempts;
DWORD LogonAttempts;

DWORD TotalGets;
DWORD TotalPosts;
DWORD TotalHeads;
DWORD TotalOthers; // Other HTTP verbs
DWORD TotalCGIRequests;
DWORD TotalBGIRequests;
DWORD TotalNotFoundErrors;

DWORD CurrentCGIRequests;
DWORD CurrentBGIRequests;
DWORD MaxCGIRequests;
DWORD MaxBGIRequests;

DWORD TimeOfLastClear;

Microsoft Confidential Page 15


# ifndef NO_AUX_PERF Do we have AUX_PERF???
DWORD nAuxCounters; // number of active counters in rgCounters
DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
# endif // NO_AUX_PERF

} W3_STATISTICS_0, * LPW3_STATISTICS_0;

3.2.2W3_SCRIPT_MAP_ENTRY
typedef struct _W3_SCRIPT_MAP_ENTRY
{
LPWSTR lpszExtension;
LPWSTR lpszImage;
} W3_SCRIPT_MAP_ENTRY, *LPW3_SCRIPT_MAP_ENTRY;

3.2.3W3_SCRIPT_MAP_LIST
typedef struct _W3_SCRIPT_MAP_LIST
{
DWORD cEntries;
#ifdef MIDL_PASS
[size_is( cEntries)]
#endif
W3_SCRIPT_MAP_ENTRY aScriptMap[];

} W3_SCRIPT_MAP_LIST, *LPW3_SCRIPT_MAP_LIST;

3.2.4W3_CONFIG_INFO
typedef struct _W3_CONFIG_INFO
{
FIELD_CONTROL FieldControl;

DWORD dwDirBrowseControl; // Directory listing and def. load


LPWSTR lpszDefaultLoadFile; // File to load if feature is on
BOOL fCheckForWAISDB; // Call waislookup if .dct found?
LPWSTR lpszDirectoryImage; // Image for directory in file
list
BOOL fServerAsProxy; // Run server as a proxy if TRUE
LPWSTR lpszCatapultUser; // The user/password to
impersonate
WCHAR szCatapultUserPwd[PWLEN+1]; // if the proxy server is using
// the catapult server

BOOL fSSIEnabled; // Are server side includes


enabled?
LPWSTR lpszSSIExtension; // Extension for server side inc.

DWORD csecGlobalExpire; // Value to set Expires: header to

LPW3_SCRIPT_MAP_LIST ScriptMap; // List of extension mappings

DWORD dwEncCaps; // Encryption capabilities

} W3_CONFIG_INFO, *LPW3_CONFIG_INFO;

Microsoft Confidential Page 16


3.3WWW Service Administration APIs
Origin (MS Confidential)
See RPCSUPP.CXX

3.3.1W3GetAdminInformation()

This API returns the current WWW admin configuration for the server.

NET_API_STATUS
NET_API_FUNCTION
W3GetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
OUT LPW3_CONFIG_INFO * ppConfig
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

ppConfig Pointer to a location where a pointer to the W3_CONFIG_INFO structure will


be returned. The pointed location should be initialized to NULL (*ppConfig ==
NULL) before call. On successful return, pointer to newly allocated block of
data containing server’s configuration is stored in *ppConfig.

Returns

NET_API_STATUS indicates the result code.

Comments

After using the block of memory returned. The application should free the memory pointed to by
*ppConfig using a call to RPC free function. All the configuration information are returned using this
single call.

3.3.2W3SetAdminInformation()

This API sets the WWW admin configuration for the server.

NET_API_STATUS
NET_API_FUNCTION
W3SetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN LPW3_CONFIG_INFO pConfig
);

Parameters

Microsoft Confidential Page 17


pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

pConfig Pointer to the W3_CONFIG_INFO structure containing the WWW


configuration to be set.

Returns

NET_API_STATUS indicates the result code.

3.3.3W3QueryStatistics()

This API returns the current global statistics for the WWW server.

NET_API_STATUS
NET_API_FUNCTION
W3QueryStatistics(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwLevel,
OUT LPBYTE * Buffer
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwLevel Indicates the level of information to be returned. Currently, only level 0 is valid.
Level 0 returns a structure of W3_STATISTICS_0.

pBuffer Pointer to a buffer in which the resulting W3_STATISTICS_0 structure is to be


placed. The structure will depend upon the dwLevel requested.

Returns

NET_API_STATUS indicates the result code. An error of ERROR_INVALID_LEVEL is returned if


dwLevel is invalid. Other possible errors include ERROR_NOT_ENOUGH_MEMORY, and
NERR_Success for successful completion.

3.3.4W3ClearStatistics()

This API clears the statistics for the WWW server.

NET_API_STATUS
NET_API_FUNCTION
W3ClearStatistics(
IN LPWSTR pszServer OPTIONAL
);

Parameters

Microsoft Confidential Page 18


pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

Returns

NET_API_STATUS indicates the result code.

Microsoft Confidential Page 19


4FTP Service
This chapter covers the File Transfer Protocol (FTP) Publishing service of the Microsoft Internet
Information Server.

APIs include:
FtpGetAdminInformation()
FtpSetAdminInformation()
I_FtpEnumerateUsers()
I_FtpDisconnectUser()
I_FtpQueryStatistics()
I_FtpClearStatistics()

4.1Constants
#define FC_FTP_ALLOW_ANONYMOUS ((FIELD_CONTROL)BitFlag( 0))
#define FC_FTP_ALLOW_GUEST_ACCESS ((FIELD_CONTROL)BitFlag( 1))
#define FC_FTP_ANNOTATE_DIRECTORIES ((FIELD_CONTROL)BitFlag( 2))
#define FC_FTP_ANONYMOUS_ONLY ((FIELD_CONTROL)BitFlag( 3))
#define FC_FTP_EXIT_MESSAGE ((FIELD_CONTROL)BitFlag( 4))
#define FC_FTP_GREETING_MESSAGE ((FIELD_CONTROL)BitFlag( 5))
#define FC_FTP_HOME_DIRECTORY ((FIELD_CONTROL)BitFlag( 6))
#define FC_FTP_LISTEN_BACKLOG ((FIELD_CONTROL)BitFlag( 7))
#define FC_FTP_LOWERCASE_FILES ((FIELD_CONTROL)BitFlag( 8))
#define FC_FTP_MAX_CLIENTS_MESSAGE ((FIELD_CONTROL)BitFlag( 9))
#define FC_FTP_MSDOS_DIR_OUTPUT ((FIELD_CONTROL)BitFlag(10))

#define FC_FTP_READ_ACCESS_MASK ((FIELD_CONTROL)BitFlag(11))


#define FC_FTP_WRITE_ACCESS_MASK ((FIELD_CONTROL)BitFlag(12))

#define FC_FTP_ALL ( \
FC_FTP_ALLOW_ANONYMOUS | \
FC_FTP_ALLOW_GUEST_ACCESS | \
FC_FTP_ANNOTATE_DIRECTORIES | \
FC_FTP_ANONYMOUS_ONLY | \
FC_FTP_EXIT_MESSAGE | \
FC_FTP_GREETING_MESSAGE | \
FC_FTP_HOME_DIRECTORY | \
FC_FTP_LISTEN_BACKLOG | \
FC_FTP_LOWERCASE_FILES | \
FC_FTP_MAX_CLIENTS_MESSAGE | \
FC_FTP_MSDOS_DIR_OUTPUT | \
FC_FTP_READ_ACCESS_MASK | \
FC_FTP_WRITE_ACCESS_MASK | \
0 )

Microsoft Confidential Page 20


4.2Structures

4.2.1FTP_CONFIG_INFO
typedef struct _FTP_CONFIG_INFO
{
FIELD_CONTROL FieldControl;

BOOL fAllowAnonymous;
BOOL fAllowGuestAccess;
BOOL fAnnotateDirectories;
BOOL fAnonymousOnly;
LPWSTR lpszExitMessage;
LPWSTR lpszGreetingMessage;
LPWSTR lpszHomeDirectory;
DWORD dwListenBacklog;
BOOL fLowercaseFiles;
LPWSTR lpszMaxClientsMessage;
BOOL fMsdosDirOutput;

} FTP_CONFIG_INFO, * LPFTP_CONFIG_INFO;

4.2.2FTP_STATISTICS_0
typedef struct _FTP_STATISTICS_0
{
LARGE_INTEGER TotalBytesSent;
LARGE_INTEGER TotalBytesReceived;
DWORD TotalFilesSent;
DWORD TotalFilesReceived;
DWORD CurrentAnonymousUsers;
DWORD CurrentNonAnonymousUsers;
DWORD TotalAnonymousUsers;
DWORD TotalNonAnonymousUsers;
DWORD MaxAnonymousUsers;
DWORD MaxNonAnonymousUsers;
DWORD CurrentConnections;
DWORD MaxConnections;
DWORD ConnectionAttempts;
DWORD LogonAttempts;
DWORD TimeOfLastClear;

} FTP_STATISTICS_0, * LPFTP_STATISTICS_0;

4.2.3FTP_USER_INFO
typedef struct _FTP_USER_INFO
{
DWORD idUser; // User id
LPWSTR pszUser; // User name
BOOL fAnonymous; // TRUE if the user is logged on as
// Anonymous, FALSE otherwise
DWORD inetHost; // Host Address
DWORD tConnect; // User Connection Time (elapsed seconds)

} FTP_USER_INFO, * LPFTP_USER_INFO;

Microsoft Confidential Page 21


4.3FTP Administration APIs

4.3.1FtpGetAdminInformation()

This API returns the current FTP admin configuration for the server.

NET_API_STATUS
NET_API_FUNCTION
FtpGetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
OUT LPFTP_CONFIG_INFO * ppConfig
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

ppConfig Pointer to a location where a pointer to the FTP_CONFIG_INFO structure will


be returned. The pointed location should be initialized to NULL (*ppConfig ==
NULL) before call. On successful return, pointer to newly allocated block of
data containing server’s configuration is stored in *ppConfig.
Returns

NET_API_STATUS indicates the result code.

Comments

After using the block of memory returned. The application should free the memory pointed to by
*ppConfig using a call to RPC free function. All the configuration information are returned using this
single call.

4.3.2FtpSetAdminInformation()

This API sets the FTP admin configuration for the server.

NET_API_STATUS
NET_API_FUNCTION
FtpSetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN LPFTP_CONFIG_INFO pConfig
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

pConfig Pointer to the FTP_CONFIG_INFO structure containing the FTP configuration


to be set.

Microsoft Confidential Page 22


Returns

NET_API_STATUS indicates the result code.

4.3.3I_FtpEnumerateUsers()

This API enumerates the users connected to the FTP server.

NET_API_STATUS
I_FtpEnumerateUsers(
IN LPWSTR pszServer OPTIONAL,
OUT LPDWORD lpdwEntriesRead,
OUT LPFTP_USER_INFO * Buffer
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

lpdwEntriesRead Pointer to a DWORD where the count of entries read is returned.

pBuffer Pointer to a buffer in which the resulting FTP_USER_INFO structure(s) are to


be placed. The count of structures returned is indicated by lpdwEntriesRead.

Returns

NET_API_STATUS indicates the result code. A result of NERR_Success indicates success.

4.3.4I_FtpDisconnectUser()

This API disconnects the specified user from the FTP server. Optionally, all users can be disconnected.

NET_API_STATUS
I_FtpDisconnectUser(
IN LPWSTR pszServer OPTIONAL,
IN DWORD idUser
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

idUser Indicates the ID of the user to be disconnected. The ID is indicated in the


FTP_USER_INFO structure returned by the W3EnumerateUsers() API. If this
parameter is zero, then disconnect all users.

Returns

Microsoft Confidential Page 23


NET_API_STATUS indicates the result code.

4.3.5I_FtpQueryStatistics()

This API returns the current global statistics for the FTP server.

NET_API_STATUS
I_FtpQueryStatistics(
IN LPWSTR pszServer OPTIONAL,
IN DWORD Level,
OUT LPBYTE * Buffer
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwLevel Indicates the level of information to be returned. Currently, only level 0 is valid.
Level 0 returns a structure of FTP_STATISTICS_0.

pBuffer Pointer to a buffer in which the resulting FTP_STATISTICS_0 structure is to be


placed. The structure will depend upon the dwLevel requested.

Returns

NET_API_STATUS indicates the result code. An error of ERROR_INVALID_LEVEL is returned if


dwLevel is invalid. Other possible errors include ERROR_NOT_ENOUGH_MEMORY, and
NERR_Success for successful completion.

4.3.6I_FtpClearStatistics()

This API clears the statistics for the FTP server.

NET_API_STATUS
I_FtpClearStatistics(
IN LPWSTR pszServer OPTIONAL
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

Returns

NET_API_STATUS indicates the result code.

Microsoft Confidential Page 24


5Gopher Service
This chapter covers the Gopher Publishing service of the Microsoft Internet Information Server.

The server provides administration RPC APIs for various functions. This includes following parameters:
Connection Time-out, Keep Connections, Log File Type, Log File Directory, Maximum Connections
permitted, Port Number, Security Data and default Home Volume to be the gopher root.

In addition it includes following Gopher specific parameters: Administrator Name, Administrator e-mail
address, Organization Name, Site Name, Location, Geographical Data and Time Zone and Language.

The gopher server allows flexibility of serving documents from multiple paths (and drives) in a single
machine. The administrator specifies the different paths that are valid for serving documents.
Administrator can specify a set of paths that all can serve as the root for document storage for gopher
server. All files in these directories (recursive) are available for distribution. The administration tool has to
assign a symbolic name for each of the paths chosen and also create a link file ( Gopher specific) for each.

The administrator can monitor the service by getting information about users logged onto gopher service
as well as obtain the service statistics.

APIs include:

GdGetAdminInformation()
GdSetAdminInformation()
GdGetStatistics()
GdClearStatistics()

5.1Constants
/************************************************************
* Symbolic Constants
* Prefix GDA_ stands for Gopher Daemon Admin
************************************************************/

# define GDA_SITE ((FIELD_CONTROL ) BitFlag( 1)) // SZ


# define GDA_ORGANIZATION ((FIELD_CONTROL ) BitFlag( 2)) // SZ
# define GDA_LOCATION ((FIELD_CONTROL ) BitFlag( 3)) // SZ
# define GDA_GEOGRAPHY ((FIELD_CONTROL ) BitFlag( 4)) // SZ
# define GDA_LANGUAGE ((FIELD_CONTROL ) BitFlag( 5)) // SZ
# define GDA_CHECK_FOR_WAISDB ((FIELD_CONTROL ) BitFlag( 8)) // BOOL

# define GDA_DEBUG_FLAGS ((FIELD_CONTROL ) BitFlag( 30)) // DWORD

# define GDA_ALL_CONFIG_INFO ( GDA_SITE | \


GDA_ORGANIZATION | \
GDA_LOCATION | \
GDA_GEOGRAPHY | \
GDA_LANGUAGE | \
GDA_CHECK_FOR_WAISDB | \
GDA_DEBUG_FLAGS \
)

Microsoft Confidential Page 25


5.2Structures

5.2.1GOPHERD_CONFIG_INFO
typedef struct _GOPHERD_CONFIG_INFO {

FIELD_CONTROL FieldControl; // bit mask indicating fields set.

LPWSTR lpszSite; // Name of Gopher site


LPWSTR lpszOrganization; // Organization Name
LPWSTR lpszLocation; // Location of server
LPWSTR lpszGeography; // Geographical data
LPWSTR lpszLanguage; // Language for server

BOOL fCheckForWaisDb; // Check & allow Wais Db

DWORD dwDebugFlags; // Bitmap of debugging data

} GOPHERD_CONFIG_INFO, * LPGOPHERD_CONFIG_INFO;

5.2.2GOPHERD_STATISTICS_INFO
typedef struct _GOPHERD_STATISTICS_INFO {

LARGE_INTEGER TotalBytesSent;
LARGE_INTEGER TotalBytesRecvd;

DWORD TotalFilesSent;
DWORD TotalDirectoryListings;
DWORD TotalSearches;

DWORD CurrentAnonymousUsers;
DWORD CurrentNonAnonymousUsers;
DWORD MaxAnonymousUsers;
DWORD MaxNonAnonymousUsers;
DWORD TotalAnonymousUsers;
DWORD TotalNonAnonymousUsers;

DWORD TotalConnections;
DWORD MaxConnections;
DWORD CurrentConnections;

DWORD ConnectionAttempts; // raw connections made


DWORD LogonAttempts; // total logons attempted
DWORD AbortedAttempts; // Aborted connections
DWORD ErroredConnections; // # in Error when processed

DWORD GopherPlusRequests;

DWORD TimeOfLastClear;
} GOPHERD_STATISTICS_INFO, * LPGOPHERD_STATISTICS_INFO;

Microsoft Confidential Page 26


5.3Gopher Service Administration APIs

5.3.1GdGetAdminInformation()

This API returns the current Gopher admin configuration for the server.

DWORD
NET_API_FUNCTION
GdGetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
OUT LPGOPHERD_CONFIG_INFO * ppConfigInfo
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

ppConfigInfo Pointer to a location where a pointer to the GOPHERD_CONFIG_INFO


structure will be returned. The pointed location should be initialized to NULL
(*ppConfigInfo == NULL) before call. On successful return, pointer to newly
allocated block of data containing server’s configuration is stored in
*ppConfigInfo.

Returns

NET_API_STATUS indicates the result code.

Comments

After using the block of memory returned. The application should free the memory pointed to by
*ppConfigInfo using a call to RPC free function. All the configuration information are returned using this
single call.

5.3.2GdSetAdminInformation()

This API sets the Gopher admin configuration for the Gopher server.

DWORD
NET_API_FUNCTION
GdSetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN LPGOPHERD_CONFIG_INFO pConfigInfo
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

Microsoft Confidential Page 27


pConfig Pointer pointer to Gopher server configuration information
(GOPHERD_CONFIG_INFO structure) containing the Gopher configuration to
be set. The caller also sets the mask of bitmap values to indicate which fields
contain valid data to be set in the server. The bitmaps serve the purpose of
selectively updating the server configuration.

Returns

NET_API_STATUS indicates the result code.

Comments

There is no guarantee given about the atomicity of updates. If the call succeeds, all the requested
configuration information will be set to new values ( both in registry and current configuration). However,
if there is a failure there is no guarantee about which parameters have been set or not set. An application
which needs to be savvy about this, can use the same API and make one call for each attribute, to ensure
atomicity.

Certain configuration data require restart of the Gopher service to become effective. For example: Change
in port number becomes effective only when the services is stopped and restarted.

5.3.3GdGetStatistics()

This API returns the current global statistics for the Gopher server.

DWORD
NET_API_FUNCTION
GdGetStatistics(
IN LPWSTR pszServer OPTIONAL,
OUT LPBYTE lpStatBuffer // pass LPGOPHERD_STATISTICS_INFO
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwLevel Indicates the level of information to be returned. Currently, only level 0 is valid.
Level 0 returns a structure of STATISTICS_INFO.

pBuffer Pointer to a buffer in which the resulting GOPHERD_STATISTICS_INFO


structure is to be placed. The structure will depend upon the dwLevel requested.

Returns

NET_API_STATUS indicates the result code. An error of ERROR_INVALID_LEVEL is returned if


dwLevel is invalid. Other possible errors include ERROR_NOT_ENOUGH_MEMORY, and
NERR_Success for successful completion.

Microsoft Confidential Page 28


Origin (MS Confidential)
See gdadmin.h

5.3.4GdClearStatistics()
DWORD
NET_API_FUNCTION
GdClearStatistics(
IN LPWSTR pszServer OPTIONAL
);
This API clears the Gopher statistics for the server.

NET_API_STATUS
NET_API_FUNCTION
W3ClearStatistics(
IN LPWSTR pszServer OPTIONAL
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

Returns

NET_API_STATUS indicates the result code.

Microsoft Confidential Page 29


6Future…
This chapter contains material found in header files, but not yet functional or shipping. This chapter will
not be made publically available!

This chapter is
MICROSOFT CONFIDENTIAL
Reviewers need not review this chapter unless there is something here
which belongs in the published section…

6.1Constants & Structures

6.1.1W3_USER_INFO
typedef struct _W3_USER_INFO
{
DWORD idUser; // User id
LPWSTR pszUser; // User name
BOOL fAnonymous; // TRUE if the user is logged on as
// Anonymous, FALSE otherwise
DWORD inetHost; // Host Address
DWORD tConnect; // User Connection Time (elapsed seconds)

} W3_USER_INFO, * LPW3_USER_INFO;

6.1.2GOPHERD_USER_INFO
//
// GOPHERD_USER_INFO contains details about connected users.
// This structure may undergo modification. Currently UserInformation
// is not supported.
//

typedef struct _GOPHERD_USER_INFO {

DWORD dwIdUser; // Id for user


LPWSTR lpszUserName; // User name
BOOL fAnonymous; // TRUE if user logged on as anonymous
// FALSE otherwise
DWORD dwInetHost; // host address for client

//
// Other details if required
//
} GOPHERD_USER_INFO, * LPGOPHERD_USER_INFO;

6.2APIs

6.2.1W3EnumerateUsers()

This API enumerates the users connected to the WWW server.

Microsoft Confidential Page 30


NET_API_STATUS
NET_API_FUNCTION
W3EnumerateUsers(
IN LPWSTR pszServer OPTIONAL,
OUT LPDWORD lpdwEntriesRead,
OUT LPW3_USER_INFO * pBuffer
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

lpdwEntriesRead Pointer to a DWORD where the count of entries read is returned.

pBuffer Pointer to a buffer in which the resulting W3_USER_INFO structure(s) are to


be placed. The count of structures returned is indicated by lpdwEntriesRead.

Returns

NET_API_STATUS indicates the result code. A result of NERR_Success indicates success.

6.2.2W3DisconnectUser()

This API disconnects the specified user from the WWW server. Optionally, all users can be disconnected.

NET_API_STATUS
NET_API_FUNCTION
W3DisconnectUser(
IN LPWSTR pszServer OPTIONAL,
IN DWORD idUser
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

idUser Indicates the ID of the user to be disconnected. The ID is indicated in the


W3_USER_INFO structure returned by the W3EnumerateUsers() API. If this
parameter is zero, then disconnect all users.

Returns

NET_API_STATUS indicates the result code.

6.2.3GdEnumerateUsers()

This API enumerates the users connected to the Gopher server.

Microsoft Confidential Page 31


//
// API for Users enumeration ( Not Yet Supported).
//
DWORD
NET_API_FUNCTION
GdEnumerateUsers(
IN LPWSTR pszServer OPTIONAL,
OUT LPDWORD lpnEntriesRead,
OUT LPGOPHERD_USER_INFO * lpUserBuffer
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

lpdwEntriesRead Pointer to a DWORD where the count of entries read is returned.

pBuffer Pointer to a buffer in which the resulting GOPHERD_USER_INFO structure(s)


are to be placed. The count of structures returned is indicated by
lpdwEntriesRead.

Returns

NET_API_STATUS indicates the result code. A result of NERR_Success indicates success.

Comments

Note that the Gopher and Gopher+ protocol user information is lost once the request is processed,
meaning that a user could disconnect before any other action can be taken.

6.2.4GdDisconnectUser()

This API disconnects the specified user from the Gopher server. Optionally, all users can be disconnected.
Is this suypported???

DWORD
NET_API_FUNCTION
GdDisconnectUser(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwIdUser
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

idUser Indicates the ID of the user to be disconnected. The ID is indicated in the


W3_USER_INFO structure returned by the GdEnumerateUsers() API. If this
parameter is zero, then disconnect all users.

Microsoft Confidential Page 32


Returns

NET_API_STATUS indicates the result code.

Comments

The server assigns each user an id for the connection established. This id (unique among all connections
in a given instance) identifies the user connection. If the connection is active this API will terminate the
specified user connection.

6.2.5I_FtpQueryVolumeSecurity()

This API returns the current Volume Security for the FTP server.

NET_API_STATUS
I_FtpQueryVolumeSecurity(
IN LPWSTR pszServer OPTIONAL,
OUT LPDWORD lpdwReadAccess,
OUT LPDWORD lpdwWriteAccess
);

Parameters

pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

lpdwReadAccess Pointer to a DWORD where the current read access mask ?????? is returned..

lpdwWriteAccess Pointer to a DWORD where the current write access mask ?????? is returned..

Returns

Currently, this function always returns ERROR_NOT_SUPPORTED. NET_API_STATUS indicates the


result code. NERR_Success is returned for successful completion.

6.2.6I_FtpSetVolumeSecurity()

This API sets the current Volume Security for the FTP server.

NET_API_STATUS
I_FtpSetVolumeSecurity(
IN LPWSTR pszServer OPTIONAL,
IN DWORD dwReadAccess,
IN DWORD dwWriteAccess
);

Parameters

Microsoft Confidential Page 33


pszServer String idenfifying the name of the NT Server to administer (e.g., “\\server”).
This may also be a DNS name (e.g., “www.foo.org”) or a dotted-decimal IP
address (e.g., “131.107.2.24”). For the local machine, this must be NULL.

dwReadAccess DWORD containing the current read access mask ?????? is returned..

dwWriteAccess DWORD containing the current write access mask ?????? is returned..

Returns

Currently, this function always returns ERROR_NOT_SUPPORTED. NET_API_STATUS indicates the


result code. NERR_Success is returned for successful completion.

6.3Gopher Space Administration APIs


UNDER CONSTRUCTION -- IGNORE
Ignore this section as it is work-in-progress…

Gopher uses special tag information for each gopher object. The tag information consists of Gopher Object
Type, a friendly name for the object, and possibly information about Host and port number if it is a link.
The tag information is stored in different places depending upon the file system in use. The tag is stored in
convenient format for easy retrieval when generating a menu of Gopher items available for a given
directory. The Gopher space administrator can use the following APIs to query and change the tag
information of Gopher items in File system independent manner.

The Gopher Space administrion APIs have to be used in conjunction with the Gopher Admin API to get
default values for Host Name, Port Number, Administrator’s Name and Email address and Gopher roots.
Presently Gopher space administration is available as a separate DLL ( gdspace.dll) which is dependent
upon file system operations. This DLL is also used by the Gopher server to read tag files for directory
listings.

APIs include:

GsOpenTagInformation()
GsCloseTagInformation()
GsWriteTagInformation()
GsSetGopherInformation()
GsSetLinkInformation()
GsSetAdminAttribute ()
GsSetAttribute ()
GsGetGopherInformation ()
GsGetLinkInformation ()
GsGetAdminAttribute ()
GsStartFindAttribute ()
GsFindNextAttribute ()
GsFindCloseAttribute ()

Origin (MS Confidential)


See gspace.cxx

Microsoft Confidential Page 34


6.3.1GsOpenTagInformation()

GsOpenTagInfomation() opens tag file for specified file/directory and returns a tag handle.

HGDTAG
GsOpenTagInformation(
IN LPCTSTR lpszDirectory,
IN LPCTSTR lpszFileName,
IN BOOL fDirectory,
IN BOOL fCreate,
IN DWORD dwFileSystem
)
/*++
Description:
Opens the tag file object for the given gopher object ( file).
If fCreate == FALSE, the Tag was created to read the existing
information in the tag file, if present. In this case, if no tag
file is present, it is an error.
If fCreate is TRUE, then a new tag file will be created deleting
existing tag information.
To modify TAG information, always open the tag file with
fCreate == FALSE and rewrite using a call to GsWriteTagInformation()

Arguments:

lpszDirectory pointer to null-terminated string containing


directory of the file specified,

lpszFileName pointer to null-terminated string containing


filename of the gopher object.

fDirectory
Is this gopher object a directory ?

fCreate
Boolean value. If TRUE, create a new tag file ==> no data present.
If FALSE, then read tag file information, if it exists. Otherwise
mark this GopherTag object as invalid.

dwFileSystem
The type of file system on which the file is stored.
If the value is == 0 ( default), the constrctor finds the file system
type for usage.

Returns:
If successful, a valid handle for the tag object created
On failure, returns INVALID_HGDTAG_VALUE. Use GetLastError() for
detailed error message.
--*/

6.3.2GsCloseTagInformation()

GsCloseTagInformation() closes the Tag object and cleans up memory used by the handle.

DWORD
GsCloseTagInformation(

Microsoft Confidential Page 35


IN OUT HGDTAG * phgdTag
)
/*++
Description:
Close the TAG file object for given handle and release any in-memory
structures for the object.

All the iterators, if any, must be closed before closing the tag handle.

Arguments:
phgdTag pointer to HGDTAG object, which is to be closed. pointer to
location containing Gopher Tag Handle, which is to be closed. On successful return the
location will contain INVALID_HGDTAG_VALUE

Returns:
Win32 error code. NO_ERROR on success

--*/

6.3.3GsWriteTagInformation()

GsWriteTagInformation() writes the tag information to the file system and hence makes the tag
information persistent.

DWORD
GsWriteTagInformation(
IN OUT HGDTAG hgdTag
)
/*++
Description:
Writes any modified tag information to the tag file in disk.
This is the only function that actuall modifies the tag file in disk.
All other function calls change in-memory images.

Arguments:
hgdTag handle for Gopher Tag information. The associated tag information is
written to the File system. The data is stored in separate
file or stream depending upon file system

Returns:
Win32 error codes. Returns NO_ERROR on success.

--*/

6.3.4GsSetGopherInformation()

GsSetGopherInformation() sets the basic Gopher tag information for a gopher object.

DWORD
GsSetGopherInformation(
IN OUT HGDTAG hgdTag,
IN GOBJ_TYPE gobjType,
IN LPCSTR lpszFriendlyName
)
/*++
Description:
Sets the basic tag information for a gopher object.

Microsoft Confidential Page 36


Arguments:

hgdTag Gopher Tag handle

gobjType type of gopher object - specifies the Gopher Object type in the
Gopher Tag for given Gopher object.

lpszFriendlyName pointer to null-terminated string containing


friendly name for gopher object

Returns:
Win32 error codes.
NO_ERROR on success
--*/

6.3.5GsSetLinkInformation()

GsSetLinkInformation() sets the link information for a link object or search object in Gopher space.

DWORD
GsSetLinkInformation(
IN OUT HGDTAG hgdTag, // Gopher Tag handle
IN LPCSTR lpszSelector, // Gopher selector or Search expression
IN LPCSTR lpszHostName, // == NULL ==> current host
IN DWORD dwPortNumber // == 0 ==> current server port
)
/*++
Description:
Set the link information for the given file.
This function should be called for GopherLink object or GopherSearch or
GopherTelnet objects.

Arguments:
hgdTag Gopher Tag handle
lpszSelector == Path if we are setting information for a GopherLink
Object
== Search string for GopherSearch objects.
pointer to null-terminated string containing the selector or
search expression for Gopher object. If NULL, no selector
information is set.
lpszHostName == name of the host for link specified.
pointer to null-terminated string containing the host name
for the link specified. If NULL, the default current host for the server is
assumed.
dwPortNumber DWORD containing the port number to be used.
( == INVALID_PORT_NUMBER) if the default server port
is to be used. DWORD containing the port number for the link. If
INVALID_PORT_NUMBER is given as parameter, then the default
port number for server is assumed

Returns:
Win32 error codes. NO_ERROR on success

--*/

6.3.6GsSetAdminAttribute()

Microsoft Confidential Page 37


GsSetAdminAttribute() sets the ADMIN attribute containing the name and email alias for given Gopher
object. This attribute is useful only for Gopher+ clients.

DWORD
GsSetAdminAttribute(
IN OUT HGDTAG hgdTag, // Gopher Tag handle
IN LPCSTR lpszAdminName, // == NULL ==> current administrator
IN LPCSTR lpszAdminEmail // == NULL ==> current admin's email
)
/*++
Description:
This function sets the Gopher+ Admin attribute values for the object.
This function should be called if the Gopher +ADMIN attribute is to be
sent to gopher+ clients.

Arguments:

hgdTag Gopher Tag Handle


lpszAdminName pointer to Administrator name.
If lpszAdminName == NULL, then the defaul current
administrator's name is used
lpszAdminEmail pointer to Administrator email address.
If lpszAdminEmail == NULL, then the defaul current
administrator's email address is used

Returns:

Win32 error code. NO_ERROR on errors.

--*/

6.3.7GsSetAttribute()

GsSetAttribute() adds/modify/delete given attribute of the gopher tag object. These attributes are useful
only for Gopher+ clients.

DWORD
GsSetAttribute(
IN OUT HGDTAG hgdTag,
IN LPCSTR lpszAttributeName,
IN LPCSTR lpszAttributeValue
)
/*++
Description:
This function adds/changes given attribute name and value of the
given Tag information for gopher object.

Arguments:
hgdTag Gopher Tag Handle
lpszAttributeName Name of the attribute. This shoould be other than
"ADMIN" and "VIEWS" attribute.
lpszAttributeValue Value of attribute. ( Should be textual, as Gopher
protocol only supports the textual messages). pointer to
null-terminated string containing the new value for the attribute

Returns:
Win32 error codes. NO_ERROR on success.

Comments:

Microsoft Confidential Page 38


If the attribute name is already present, the value is changed to new value. If the attribute is absent, then it
is added as a new attribute. If the value specified is NULL, then the attribute is deleted

--*/

6.3.8GsGetGopherInformation()

GsGetGopherInformation() gets the basic gopher tag information for given object. This function is valid
only if the handle is opened with fChange = FALSE.

DWORD
GsGetGopherInformation(
IN HGDTAG hgdTag, // Gopher Tag handle
OUT LPGOBJ_TYPE lpGobjType, // pointer to contain GOBJ_TYPE
OUT LPTSTR lpszBuffer, // ptr to buffer to contain friendly name
IN OUT LPDWORD lpcbBuffer, // ptr to location containing no. of
bytes
OUT LPBOOL lpfLink // return TRUE if link or search file.
)
/*++
Description:
This function gets the gopher tag information for given gopher
object. The gopher object should have been opened with fCreate == FALSE
to get information using this API.

Arguments:
hgdTag Gopher Tag Handle
lpGobjType pointer to store the gopher object type for given
object.
pointer to GOBJ_TYPE, which on return will contain the
pher object type.
lpszBuffer pointer to buffer to store the Friendly name on return.
in *lpcbBuffer.
lpcbBuffer pointer to DWORD containing count of bytes.
when the call is made, it contains the size of buffer,
on return this contains the count of bytes written.
It contains the length of the buffer in bytes when the
call is made. On return contains the number
of bytes written into lpszBuffer including the
null-terminating character. If lpszBuffer == NULL, this
contains the bytes required
lpfLink pointer to BOOL which is set to TRUE if this file has
link information.

Returns:
Win32 error codes. NO_ERROR on success.

--*/

6.3.9GsGetLinkInformation()

GsGetLinkInformation() gets the link information for given object. This function should be called only if
GsGetGopherInformation() returns *lpfLink = TRUE.

DWORD
GsGetLinkInformation(

Microsoft Confidential Page 39


IN OUT HGDTAG hgdTag, // Gopher Tag handle,
OUT LPTSTR lpszSelectorBuffer,// pointer to buffer to contain selector
IN OUT LPDWORD lpcbSelector, // count of bytes for selector
OUT LPTSTR lpszHostName, // pointer to buffer containing hostname
IN OUT LPDWORD lpcbHostName, // count of bytes for host name
OUT LPDWORD lpdwPortNumber // server port number
)
/*++
Description:
This functions gets the link information for given gopher object.

Arguments:
hgdTag Gopher Tag Handle
lpszSelectorBuffer pointer to buffer where gopher selector is
stored on return. If there is no selector, just null
value ( '\0') is stored in the buffer and count set to 0
pointer to buffer which on successful return will contain
the selector string if any present. It will contain a
null-string if there is no selector.
lpcbSelector pointer to DWORD containing count of bytes;
when the call is made, it contains size of
SelectorBuffer
on return contains the count of bytes written.
pointer to DWORD. It contains the length of the
lpszSelector buffer when the call is made. On return
contains the number of bytes written into lpszSelector
including the null-terminating character. If
lpszSelector == NULL, this contains the bytes
required.
lpszHostName pointer to buffer where Host Name for the link is
stored.
If the host name is the current host name of server,
then
just null value is stored ( '\0'). The caller needs to
fill in the current host name.
pointer to buffer which on successful return will contain
the HostName string if any present. It will contain a
null-string if there is no selector. If default host name
( local host) to be used, a null string is returned.
lpcbHostName pointer to DWORD containing count of bytes;
when the call is made, it contains size of lpszHostName.
on return contains the count of bytes written.
pointer to DWORD. It contains the length of the
lpszHostName buffer when the call is made. On return
contains the number of bytes written into
lpszHostName including the null-terminating character. If
lpszHostName == NULL, this contains the
bytes required.

lpdwPortNumber pointer to DWORD to contain the port number for given


Gopher object. If the port number is the default
of current server, then INVALID_PORT_NUMBER is stored.
The caller needs to fill in the default port number.
pointer to DWORD, which on return contains the port
number for the link. If default port is to be used,
the value returned is INVALID_PORT_NUMBER

Returns:
Win32 error codes. NO_ERROR on success.

Microsoft Confidential Page 40


--*/

6.3.10GsGetAdminAttribute()

GsGetAdminAttribute () gets the values for Gopher+ admin attributes, administrator name and email for
the given gopher object.

DWORD
GsGetAdminAttribute(
IN OUT HGDTAG hgdTag, // Gopher Tag Handle
OUT LPTSTR lpszAdminName, // == NULL ==> current administrator
IN OUT LPDWORD lpcbAdminName, // count of bytes for admin name
OUT LPTSTR lpszAdminEmail, // == NULL ==> current admin's email
IN OUT LPDWORD lpcbAdminEmail // count of bytes for admin email
)
/*++
Description:
This function gets the Administrator details for given Gopher Object.

Arguments:
hgdTag Gopher Tag Handle
hgdAttribIter Gopher Tag Attribute Iterator
lpszAdminName pointer to buffer where the administrator name is
stored on return. If admin name is current default, null
value ( '\0') is stored in the buffer and count set to 0
pointer to buffer which on successful return will contain
the Administrator’s name string if any present. It will
contain a null-string if there is no selector. If default
Administator’s name is to be used,it returns null-string
lpcbAdminName pointer to DWORD containing count of bytes;
when the call is made, it contains size of AdminName
on return contains the count of bytes written.
( including the null-character)
pointer to DWORD. It contains the length of the
lpszAdminName buffer when the call is made. On return
contains the number of bytes written into
lpszAdminName including the null-terminating character. If
lpszAdminName == NULL, this contains
the bytes required.
lpszAdminEmail pointer to buffer where Admin Email is stored.
If the admin email is current default, then
just null value is stored ( '\0'). The caller needs to
fill in the current host name.
pointer to buffer which on successful return will contain
the AdminEmail string if any present. It will contain
null-string if there is no AdminEmail. If default
administrator’s email address is to be used, a null-
string is returned.
lpcbAdminEmail pointer to DWORD containing count of bytes;
when call is made, it contains size of lpszAdminEmail.
on return contains the count of bytes written.
( including the null-character)
pointer to DWORD. It contains the length of the
lpszAdminEmail buffer when the call is made. On return
contains the number of bytes written into lpszAdminEmail
including the null-terminating character. If
lpszAdminEmail == NULL, this contains the bytes
required

Microsoft Confidential Page 41


Returns:
Win32 error codes. NO_ERROR on success.

--*/

6.3.11GsStartFindAttribute()

GsStartFindAttribute () starts an iteration thru all the given components in Gopher+ attributes list for
Gopher object. While an iteration is in progress, new attributes should not be added.

DWORD
GsStartFindAttribute(
IN OUT HGDTAG hgdTag,
OUT LPHGD_ATTRIB_ITERATOR lphgdAttribIter
)
/*++
Description:
This function starts an iteration thru all the given attributes in
the Gopher+ attributes list for given Gopher object.

Arguments:
hgdTag Gopher Tag Handle
lphgdAttribIter
pointer to location to store Handle for Attribute iterator
On successful return this contains the handle to be
used for enumerating the attributes in gopher tag info.
All the attribute iterators must be closed before
closing the handle to tag file for that object.
pointer to the location to store Handle for Attribute
iterator. On successful return this contains the handle
to be used for enumerating the attributes in gopher tag
information

Returns:
Win32 error codes. NO_ERROR on success.

Comments:
All the attribute iterator handles should be closed prior to closing the handle for tag information

--*/

6.3.12GsFindNextAttribute()

GsFindNextAttribute () iterates through the list of attributes in Gopher Tag, and returns the name and
value of next attribute.

DWORD
GsFindNextAttribute(
IN OUT HGD_ATTRIB_ITERATOR hgdAttribIter,
OUT LPTSTR lpszAttributeName,
IN OUT LPDWORD lpcbAttributeName,
OUT LPTSTR lpszAttributeValue,
IN OUT LPDWORD lpcbAttributeValue
)
/*++
Description:
This function iterates thru the list of attributes in gopher tag file
and returns the next attribute information.

Arguments:

Microsoft Confidential Page 42


hgdAttribIter handle for gopher iterator.
lpszAttributeName
pointer to buffer where the next attribute name
is stored on successful return from function
pointer to buffer which on successful return will contain
the Attribute name string if any present

lpcbAttributeName
pointer to count of bytes in lpszAttributeName
when call is made, contains size of buffer and
on return contains the number of bytes written or required.
pointer to DWORD. It contains the length of the
lpszAttributeName buffer when the call is made. On return
contains number of bytes written into lpszAttributeName
including the null-terminating character. If
lpszAttributeName == NULL, this contains bytes
required

lpszAttributeValue
pointer to buffer where the attribute value is stored.
pointer to buffer which on successful return will contain
the value of attribute if any present

lpcbAttributeValue
pointer to count of bytes in lpszAttributeValue.
when call is made, contains the size of buffer and
on return contains number of bytes written or required.
pointer to DWORD. It contains the length of the
lpszAttributeValue buffer when the call is made. On
return contains the number of bytes written into
lpszAttributeValue including the null-terminating
character. If lpszAttributeValue == NULL,
this contains the bytes required

Returns:
Win32 error codes. NO_ERROR for success.
ERROR_INVALID_HANDLE if hgdAttribIter is invalid.
ERROR_NO_MORE_ITEMS if all the attributes are exhausted.
ERROR_INSUFFICIENT_BUFFER if the buffer space are not sufficient.

--*/

6.3.13GsFindCloseAttribute()

GsFindCloseAttribute () ends the iteration over the Gopher+ attributes for given Gopher object. It frees
up the iteration object and cleans up necessary memory.

DWORD
GsFindCloseAttribute(
IN OUT LPHGD_ATTRIB_ITERATOR lphgdAttribIter
)
/*++
Description:
This function closes the attributor handle and frees the memory.
Also reinitializes the handle to point to NULL value.

Arguments:
lphgdAttribIter pointer to location containing the Gopher Tag
Attributes Iterator

Microsoft Confidential Page 43


pointer to the location containing Handle for Attribute
iterator. On successful return this handle is freed and
iterator is stopped

Returns:
Win32 error codes. NO_ERROR for success.

--*/

6.4NNTP Service
This chapter covers the Network N??? T??? P?? (NNTP) Publishing service of the Microsoft Internet
Information Server. This service is not provided by IIS 1.0.

/////////////////////////////////////////////////////////////////////////
// //
// NNTP specific items //
// //
/////////////////////////////////////////////////////////////////////////

//
// Service name.
//

# define NNTP_SERVICE_NAME TEXT("NNTPSVC")


# define NNTP_SERVICE_NAME_A "NNTPSVC"
# define NNTP_SERVICE_NAME_W L"NNTPSVC"

//
// Client Interface Name for RPC connections over named pipes
//

# define NNTP_INTERFACE_NAME NNTP_SERVICE_NAME


# define NNTP_NAMED_PIPE TEXT("\\PIPE\\") ## NNTP_INTERFACE_NAME
# define NNTP_NAMED_PIPE_W L"\\PIPE\\" ## NNTP_SERVICE_NAME_W

6.5SMTP Service
This chapter covers the Simple Mail Transfer protocol (SMTP) Publishing service of the Microsoft
Internet Information Server. This service is not provided by IIS 1.0.

/////////////////////////////////////////////////////////////////////////
// //
// SMTP specific items //
// //
/////////////////////////////////////////////////////////////////////////

//
// Service name.
//

# define SMTP_SERVICE_NAME TEXT("SMTPSVC")


# define SMTP_SERVICE_NAME_A "SMTPSVC"

Microsoft Confidential Page 44


# define SMTP_SERVICE_NAME_W L"SMTPSVC"

//
// Client Interface Name for RPC connections over named pipes
//

# define SMTP_INTERFACE_NAME SMTP_SERVICE_NAME


# define SMTP_NAMED_PIPE TEXT("\\PIPE\\") ## SMTP_INTERFACE_NAME
# define SMTP_NAMED_PIPE_W L"\\PIPE\\" ## SMTP_SERVICE_NAME_W

6.6POP3 Service
This chapter covers the Post Office Protocol (POP) Publishing service of the Microsoft Internet
Information Server. This service is not provided by IIS 1.0.

/////////////////////////////////////////////////////////////////////////
// //
// POP3 specific items //
// //
/////////////////////////////////////////////////////////////////////////

//
// Service name.
//

# define POP3_SERVICE_NAME TEXT("POP3SVC")


# define POP3_SERVICE_NAME_A "POP3SVC"
# define POP3_SERVICE_NAME_W L"POP3SVC"

//
// Client Interface Name for RPC connections over named pipes
//

# define POP3_INTERFACE_NAME POP3_SERVICE_NAME


# define POP3_NAMED_PIPE TEXT("\\PIPE\\") ## POP3_INTERFACE_NAME
# define POP3_NAMED_PIPE_W L"\\PIPE\\" ## POP3_SERVICE_NAME_W

6.7Catapult (Proxy Server) Specific Items


This chapter covers the Microsoft Internet proxy Server. This service is not provided by IIS 1.0.

/////////////////////////////////////////////////////////////////////////
// //
// Catapult specific items //
// //
/////////////////////////////////////////////////////////////////////////

# define INET_GATEWAY_INTERFACE_NAME TEXT("gateway")

// preserve back ward compatibility


typedef INET_INFO_CONFIG_INFO INETA_CONFIG_INFO,
* LPINETA_CONFIG_INFO;
typedef INET_INFO_IP_SEC_ENTRY INETA_IP_SEC_ENTRY,
* LPINETA_IP_SEC_ENTRY;
typedef INET_INFO_IP_SEC_LIST INETA_IP_SEC_LIST,

Microsoft Confidential Page 45


* LPINETA_IP_SEC_LIST;
typedef INET_INFO_VIRTUAL_ROOT_ENTRY INETA_VIRTUAL_ROOT_ENTRY,
* LPINETA_VIRTUAL_ROOT_ENTRY;
typedef INET_INFO_VIRTUAL_ROOT_LIST INETA_VIRTUAL_ROOT_LIST,
* LPINETA_VIRTUAL_ROOT_LIST;

typedef INET_INFO_GLOBAL_CONFIG_INFO INETA_GLOBAL_CONFIG_INFO,


* LPINETA_GLOBAL_CONFIG_INFO;

typedef INET_INFO_STATISTICS_0 INETA_STATISTICS_0,


* LPINETA_STATISTICS_0;

# define INETA_PARAMETERS_KEY (INET_INFO_PARAMETERS_KEY)

6.8CHAT Service
This chapter covers the CHAT service of the Microsoft Internet Information Server. This service is not
provided by IIS 1.0.

/////////////////////////////////////////////////////////////////////////
// //
// CHAT specific items //
// //
/////////////////////////////////////////////////////////////////////////

//
// Service name.
//

# define CHAT_SERVICE_NAME TEXT("ChatSvc")


# define CHAT_SERVICE_NAME_A "ChatSvc"
# define CHAT_SERVICE_NAME_W L"ChatSvc"

//
// Client Interface Name for RPC connections over named pipes
//
# define CHAT_INTERFACE_NAME CHAT_SERVICE_NAME
# define CHAT_NAMED_PIPE TEXT("\\PIPE\\") ## CHAT_INTERFACE_NAME
# define CHAT_NAMED_PIPE_W L"\\PIPE\\" ## CHAT_SERVICE_NAME_W

//
// Manifests for APIs.
//

#define FC_CHAT_ALLOW_ANONYMOUS ((FIELD_CONTROL)BitFlag( 0))


#define FC_CHAT_ALLOW_GUEST_ACCESS ((FIELD_CONTROL)BitFlag( 1))
#define FC_CHAT_ANNOTATE_DIRECTORIES ((FIELD_CONTROL)BitFlag( 2))
#define FC_CHAT_ANONYMOUS_ONLY ((FIELD_CONTROL)BitFlag( 3))
#define FC_CHAT_EXIT_MESSAGE ((FIELD_CONTROL)BitFlag( 4))
#define FC_CHAT_GREETING_MESSAGE ((FIELD_CONTROL)BitFlag( 5))
#define FC_CHAT_HOME_DIRECTORY ((FIELD_CONTROL)BitFlag( 6))
#define FC_CHAT_LISTEN_BACKLOG ((FIELD_CONTROL)BitFlag( 7))
#define FC_CHAT_LOWERCASE_FILES ((FIELD_CONTROL)BitFlag( 8))
#define FC_CHAT_MAX_CLIENTS_MESSAGE ((FIELD_CONTROL)BitFlag( 9))
#define FC_CHAT_MSDOS_DIR_OUTPUT ((FIELD_CONTROL)BitFlag(10))

Microsoft Confidential Page 46


#define FC_CHAT_READ_ACCESS_MASK ((FIELD_CONTROL)BitFlag(11))
#define FC_CHAT_WRITE_ACCESS_MASK ((FIELD_CONTROL)BitFlag(12))

#define FC_CHAT_ALL ( \
FC_CHAT_ALLOW_ANONYMOUS | \
FC_CHAT_ALLOW_GUEST_ACCESS | \
FC_CHAT_ANNOTATE_DIRECTORIES | \
FC_CHAT_ANONYMOUS_ONLY | \
FC_CHAT_EXIT_MESSAGE | \
FC_CHAT_GREETING_MESSAGE | \
FC_CHAT_HOME_DIRECTORY | \
FC_CHAT_LISTEN_BACKLOG | \
FC_CHAT_LOWERCASE_FILES | \
FC_CHAT_MAX_CLIENTS_MESSAGE | \
FC_CHAT_MSDOS_DIR_OUTPUT | \
FC_CHAT_READ_ACCESS_MASK | \
FC_CHAT_WRITE_ACCESS_MASK | \
0 )

6.8.1Structures

6.8.1.1CHAT_CONFIG_INFO

typedef struct _CHAT_CONFIG_INFO


{
FIELD_CONTROL FieldControl;

BOOL fAllowAnonymous;
BOOL fAllowGuestAccess;
BOOL fAnnotateDirectories;
BOOL fAnonymousOnly;
LPWSTR lpszExitMessage;
LPWSTR lpszGreetingMessage;
LPWSTR lpszHomeDirectory;
DWORD dwListenBacklog;
BOOL fLowercaseFiles;
LPWSTR lpszMaxClientsMessage;
BOOL fMsdosDirOutput;

} CHAT_CONFIG_INFO, * LPCHAT_CONFIG_INFO;

6.8.2Chat Service Administration APIs

6.8.2.1ChatGetAdminInformation()

NET_API_STATUS
NET_API_FUNCTION
ChatGetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
OUT LPCHAT_CONFIG_INFO * ppConfig
);

Microsoft Confidential Page 47


6.8.2.2ChatSetAdminInformation()

NET_API_STATUS
NET_API_FUNCTION
ChatSetAdminInformation(
IN LPWSTR pszServer OPTIONAL,
IN LPCHAT_CONFIG_INFO pConfig
);

# include <chat.h>

Microsoft Confidential Page 48

S-ar putea să vă placă și