WSK_PROVIDER_DISPATCH structure (wsk.h)

The WSK_PROVIDER_DISPATCH structure specifies the WSK subsystem's dispatch table of functions that are not specific to a particular socket.

Syntax

typedef struct _WSK_PROVIDER_DISPATCH {
  USHORT                    Version;
  USHORT                    Reserved;
  PFN_WSK_SOCKET            WskSocket;
  PFN_WSK_SOCKET_CONNECT    WskSocketConnect;
  PFN_WSK_CONTROL_CLIENT    WskControlClient;
  PFN_WSK_GET_ADDRESS_INFO  WskGetAddressInfo;
  PFN_WSK_FREE_ADDRESS_INFO WskFreeAddressInfo;
  PFN_WSK_GET_NAME_INFO     WskGetNameInfo;
} WSK_PROVIDER_DISPATCH, *PWSK_PROVIDER_DISPATCH;

Members

Version

The version of the WSK Network Programming Interface (NPI) that the WSK subsystem will use for its attachment to the WSK application.

Reserved

Reserved for system use.

WskSocket

A pointer to the WSK subsystem's WskSocket function.

WskSocketConnect

A pointer to the WSK subsystem's WskSocketConnect function.

WskControlClient

A pointer to the WSK subsystem's WskControlClient function.

WskGetAddressInfo

A pointer to the WSK subsystem's WskGetAddressInfo function.

This member is available beginning with Windows 7.

WskFreeAddressInfo

A pointer to the WSK subsystem's WskFreeAddressInfo function.

This member is available beginning with Windows 7.

WskGetNameInfo

A pointer to the WSK subsystem's WskGetNameInfo function.

This member is available beginning with Windows 7.

Remarks

When a WSK application calls the WskCaptureProviderNPI function, the WSK subsystem returns a pointer to a WSK_PROVIDER_DISPATCH structure by means of the Dispatch member of the WSK_CLIENT_NPI structure pointed to by the WskProviderNpi parameter.

The major and minor version numbers that are contained within the Version member are encoded by using the MAKE_WSK_VERSION macro:

Version = MAKE_WSK_VERSION(Major,Minor);

The major and minor version numbers can be extracted from the Version member by using the WSK_MAJOR_VERSION and WSK_MINOR_VERSION macros:

Major = WSK_MAJOR_VERSION(Version);
Minor = WSK_MINOR_VERSION(Version);

The minor version number that is contained within the Version member of this structure might be a higher minor version number than what was requested by the WSK application in the Version member of the WSK_CLIENT_DISPATCH structure. This situation should not cause a problem for the WSK application because higher minor versions of the WSK NPI are a strict superset of lower minor versions of the WSK NPI if they have the same major version number. The WSK subsystem will specify the remaining members of the WSK_PROVIDER_DISPATCH structure to conform to the version of the WSK NPI that is indicated in the Version member of the structure.

For more information about attaching a WSK application to the WSK subsystem, see Registering a Winsock Kernel Application.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header wsk.h (include Wsk.h)

See also

WSK_CLIENT_DISPATCH

WSK_CLIENT_NPI

WskCaptureProviderNPI

WskControlClient

WskSocket

WskSocketConnect