次の方法で共有


WSAPROTOCOL_INFO (Windows Embedded CE 6.0)

1/6/2010

This structure is used to store or retrieve complete information for a given protocol.

Syntax

typedef struct _WSAPROTOCOL_INFO {
  DWORD dwServiceFlags1;
  DWORD dwServiceFlags2;
  DWORD dwServiceFlags3;
  DWORD dwServiceFlags4;
  DWORD dwProviderFlags;
  GUID ProviderId;
  DWORD dwCatalogEntryId;
  WSAPROTOCOLCHAIN ProtocolChain;
  int iVersion;
  int iAddressFamily;
  int iMaxSockAddr;
  int iMinSockAddr;
  int iSocketType;
  int iProtocol;
  int iProtocolMaxOffset;
  int iNetworkByteOrder;
  int iSecurityScheme;
  DWORD dwMessageSize;
  DWORD dwProviderReserved;
  TCHAR szProtocol[WSAPROTOCOL_LEN+1];
} WSAPROTOCOL_INFO, *LPWSAPROTOCOL_INFO;

Members

  • dwServiceFlags1
    Bitmask describing the services provided by the protocol. The following table shows the possible values.

    Value Description

    XP1_CONNECTIONLESS

    Provides connectionless (datagram) service. If not set, the protocol supports connection-oriented data transfer

    XP1_GUARANTEED_DELIVERY

    Guarantees that all data sent will reach the intended destination.

    XP1_GUARANTEED_ORDER

    Guarantees that data only arrives in the order in which it was sent and that it is not duplicated. This characteristic does not necessarily mean that the data is always delivered, but that any data that is delivered is delivered in the order in which it was sent.

    XP1_MESSAGE_ORIENTED

    Honors message boundaries — as opposed to a stream-oriented protocol where there is no concept of message boundaries.

    XP1_PSEUDO_STREAM

    A message-oriented protocol, but message boundaries are ignored for all receipts. This is convenient when an application does not desire message framing to be done by the protocol.

    XP1_GRACEFUL_CLOSE

    Supports two-phase (graceful) close. If not set, only abortive closes are performed

    XP1_EXPEDITED_DATA

    Supports expedited (urgent) data.

    XP1_CONNECT_DATA

    Supports connect data.

    XP1_DISCONNECT_DATA

    Supports disconnect data.

    XP1_INTERRUPT

    Bit is reserved.

    XP1_SUPPORT_BROADCAST

    Supports a broadcast mechanism.

    XP1_SUPPORT_MULTIPOINT

    Supports a multipoint or multicast mechanism. Control and data plane attributes are indicated below.

    XP1_MULTIPOINT_CONTROL_PLANE

    Indicates whether the control plane is rooted (value = 1) or nonrooted (value = 0).

    XP1_MULTIPOINT_DATA_PLANE

    Indicates whether the data plane is rooted (value = 1) or nonrooted (value = 0).

    XP1_UNI_SEND

    Protocol is unidirectional in the send direction.

    XP1_UNI_RECV

    Protocol is unidirectional in the recv direction.

    XP1_IFS_HANDLES

    Socket descriptors returned by the provider are operating system Installable File System (IFS) handles.

    XP1_PARTIAL_MESSAGE

    The MSG_PARTIAL flag is supported in WSASend and WSASendTo.

  • ProtocolChain
    WSAPROTOCOLCHAIN structure associated with the protocol.
  • dwServiceFlags2
    Reserved for additional protocol-attribute definitions.
  • dwServiceFlags3
    Reserved for additional protocol-attribute definitions.
  • dwServiceFlags4
    Reserved for additional protocol-attribute definitions.
  • dwProviderFlags
    Provides information about how this protocol is represented in the protocol catalog. The following flag values are possible:

    Value Description

    PFL_MULTIPLE_PROTO_ENTRIES

    Indicates that this is one of two or more entries for a single protocol (from a given provider) that is capable of implementing multiple behaviors. An example of this is SPX, which, on the receiving side, can behave either as a message-oriented, or a stream-oriented protocol.

    PFL_RECOMMENDED_PROTO_ENTRY

    Indicates that this is the recommended or most frequently used entry for a protocol that is capable of implementing multiple behaviors.

    PFL_HIDDEN

    Set by a provider to indicate to the Ws2_32.dll that this protocol should not be returned in the result buffer generated by WSAEnumProtocols. Obviously, a Winsock application should never see an entry with this bit set.

    PFL_MATCHES_PROTOCOL_ZERO

    Indicates that a value of zero in the protocol parameter of socket (Windows Sockets) or WSASocket matches this protocol entry.

  • ProviderId
    Globally unique identifier assigned to the provider by the service provider vendor. This value is useful for instances where more than one service provider is able to implement a particular protocol. An application may use the dwProviderIdvalue to distinguish between providers that might otherwise be indistinguishable.
  • dwCatalogEntryId
    Unique identifier assigned by the WS2_32.DLL.

    WSAPROTOCOLCHAIN ProtocolChain;

    If the length of the chain is 0, this WSAPROTOCOL_INFOW entry represents a layered protocol, which has Winsock SPI as both its top and bottom edges. If the length of the chain equals 1, this entry represents a base protocol whose Catalog Entry identifier is in the dwCatalogEntryId member of the WSAPROTOCOL_INFOW structure. If the length of the chain is larger than 1, this entry represents a provider chain which consists of one or more layered protocols on top of a base protocol. The corresponding Catalog Entry identifiers are in the ProtocolChain.ChainEntries array starting with the layered protocol at the top (the zero element in the ProtocolChain.ChainEntries array) and ending with the base protocol. Refer to the Winsock Service Provider Interface specification for more information on provider chains.

  • iVersion
    Protocol version identifier.
  • iAddressFamily
    Value to pass as the address family parameter to the socket (Windows Sockets)/WSASocket function in order to open a socket for this protocol. This value also uniquely defines the structure of protocol addresses sockaddrs used by the protocol.
  • iMaxSockAddr
    Maximum address length.
  • iMinSockAddr
    Minimum address length.
  • iSocketType
    Value to pass as the socket type parameter to the socket (Windows Sockets) function in order to open a socket for this protocol.
  • iProtocol
    Value to pass as the protocol parameter to the socket (Windows Sockets) function in order to open a socket for this protocol.
  • iProtocolMaxOffset
    Maximum value that may be added to iProtocol when supplying a value for the protocol parameter to socket and WSASocket. Not all protocols allow a range of values. When this is the case iProtocolMaxOffsetis zero.
  • iNetworkByteOrder
    Currently these values are manifest constants (BIGENDIAN and LITTLEENDIAN) that indicate either big-endian or little-endian with the values 0 and 1 respectively.
  • iSecurityScheme
    Indicates the type of security scheme employed (if any). A value of SECURITY_PROTOCOL_NONE is used for protocols that do not incorporate security provisions.
  • dwMessageSize
    Maximum message size supported by the protocol. This is the maximum size that can be sent from any of the host's local interfaces. For protocols that do not support message framing, the actual maximum that can be sent to a given address may be less. There is no standard provision to determine the maximum inbound message size. The following table shows the special values that are defined.

    Value Description

    0

    The protocol is stream-oriented and hence the concept of message size is not relevant.

    0x1

    The maximum outbound (send) message size is dependent on the underlying network MTU (maximum sized transmission unit) and hence cannot be known until after a socket is bound. Applications should use getsockopt (Windows Sockets) to retrieve the value of SO_MAX_MSG_SIZE after the socket has been bound to a local address.

    0xFFFFFFFF

    The protocol is message-oriented, but there is no maximum limit to the size of messages that may be transmitted.

  • dwProviderReserved
    Reserved for use by service providers.
  • szProtocol
    Array of characters that contains a human-readable name identifying the protocol, for example, SPX2. The maximum number of characters allowed is WSAPROTOCOL_LEN, which is defined to be 255.

Requirements

Header winsock2.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Winsock Structures
WSAEnumProtocols
WSASend
WSASendTo
getsockopt (Windows Sockets)
socket (Windows Sockets)