Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PROTOCOL_INFOA structure (nspapi.h)
The PROTOCOL_INFO structure contains information about a protocol.
Syntax
typedef struct _PROTOCOL_INFOA {
DWORD dwServiceFlags;
INT iAddressFamily;
INT iMaxSockAddr;
INT iMinSockAddr;
INT iSocketType;
INT iProtocol;
DWORD dwMessageSize;
LPSTR lpProtocol;
} PROTOCOL_INFOA, *PPROTOCOL_INFOA, *LPPROTOCOL_INFOA;
Members
dwServiceFlags
Type: DWORD
A set of bit flags that specifies the services provided by the protocol. One or more of the following bit flags may be set.
| Value | Meaning |
|---|---|
|
If this flag is set, the protocol provides connectionless (datagram) service. If this flag is clear, the protocol provides connection-oriented data transfer. |
|
If this flag is set, the protocol guarantees that all data sent will reach the intended destination. If this flag is clear, there is no such guarantee. |
|
If this flag is set, the protocol guarantees that data will arrive in the order in which it was sent. Note that this characteristic does not guarantee delivery of the data, only its order. If this flag is clear, the order of data sent is not guaranteed. |
|
If this flag is set, the protocol is message-oriented. A message-oriented protocol honors message boundaries. If this flag is clear, the protocol is stream oriented, and the concept of message boundaries is irrelevant. |
|
If this flag is set, the protocol is a message-oriented protocol that ignores message boundaries for all receive operations.
This optional capability is useful when you do not want the protocol to frame messages. An application that requires stream-oriented characteristics can open a socket with type SOCK_STREAM for transport protocols that support this functionality, regardless of the value of iSocketType. |
|
If this flag is set, the protocol supports two-phase close operations, also known as graceful close operations. If this flag is clear, the protocol supports only abortive close operations. |
|
If this flag is set, the protocol supports expedited data, also known as urgent data. |
|
If this flag is set, the protocol supports connect data. |
|
If this flag is set, the protocol supports disconnect data. |
|
If this flag is set, the protocol supports a broadcast mechanism. |
|
If this flag is set, the protocol supports a multicast mechanism. |
|
If this flag is set, the protocol supports a mechanism for allocating a guaranteed bandwidth to an application. |
|
If this flag is set, the protocol supports message fragmentation; physical network MTU is hidden from applications. |
|
If this flag is set, the protocol supports data encryption. |
iAddressFamily
Type: INT
Value to pass as the af parameter when the socket function is called to open a socket for the protocol. This address family value uniquely defines the structure of protocol addresses, also known as sockaddr structures, used by the protocol.
iMaxSockAddr
Type: INT
Maximum length of a socket address supported by the protocol, in bytes.
iMinSockAddr
Type: INT
Minimum length of a socket address supported by the protocol, in bytes.
iSocketType
Type: INT
Value to pass as the type parameter when the socket function is called to open a socket for the protocol.
Note that if XP_PSEUDO_STREAM is set in dwServiceFlags, the application can specify SOCK_STREAM as the type parameter to socket, regardless of the value of iSocketType.
iProtocol
Type: INT
Value to pass as the protocol parameter when the socket function is called to open a socket for the protocol.
dwMessageSize
Type: DWORD
Maximum message size supported by the protocol, in bytes. This is the maximum size of a message that can be sent from or received by the host. For protocols that do not support message framing, the actual maximum size of a message that can be sent to a given address may be less than this value.
The following special message size values are defined.
| Value | Meaning |
|---|---|
|
The protocol is stream-oriented; the concept of message size is not relevant. |
|
The protocol is message-oriented, but there is no maximum message size. |
lpProtocol
Type: LPTSTR
Pointer to a zero-terminated string that supplies a name for the protocol; for example, "SPX2."
Remarks
Note
The nspapi.h header defines PROTOCOL_INFO as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps only] |
| Minimum supported server | Windows 2000 Server [desktop apps only] |
| Header | nspapi.h |
See also
Feedback
Was this page helpful?
