REMOTE_NDIS_INDICATE_STATUS_MSG (Windows Embedded CE 6.0)
1/6/2010
This message is sent by a Remote NDIS device to a host to indicate a change in the status of the device. A REMOTE_NDIS_INDICATE_STATUS_MSG message can also be used to indicate an error event, such as an unrecognized message. The device may send this message at any time that it is in the rndis-initialized or rndis-data-initialized state. There is no response to this message. For more information about RNDIS device states, see RNDIS Concepts.
Syntax
REMOTE_NDIS_INDICATE_STATUS_MSG
(UINT32) NdisMessageType;
(UINT32) MessageLength;
(RNDIS_STATUS) Status;
(UINT32) StatusBufferLength;
(UINT32) StatusBufferOffset;
(RNDIS_STATUS) DiagStatus;
(UINT32) ErrorOffset;
(RNDIS_MESSAGE) Message;
Parameters
- NdisMessageType
Specifies the RNDIS message type, which is set to REMOTE_NDIS_INDICATE_STATUS_MSG.
- MessageLength
Specifies the total length of this RNDIS message in bytes.
- Status
Specifies a change in the device status or the inability for the device to handle a message from the host.
- StatusBufferLength
Specifies the length of the diagnostic status buffer in bytes, which is set to 0, or to 8 plus the length of the original offending message.
- StatusBufferOffset
Specifies the byte offset from the beginning of the Status field at which the Rndis_Diagnostic_Info status data for the device indication is located.
- DiagStatus
(Optional) Part of the diagnostic status buffer. Contains additional status about the error itself, such as, RNDIS_STATUS_NOT_SUPPORTED.
- ErrorOffset
(Optional) Part of the diagnostic status buffer. Specifies the 0-based byte offset within the offending message at which the error was detected.
- Message
(Optional) Part of the diagnostic status buffer. The message that generated the error.
Return Value
None.
Remarks
All RNDIS messages start with two UINT32 fields, NdisMessageType and MessageLength that identify the type of message being sent and its length. All messages that expect a response from a remote device and all responses to such messages from a remote device also include a third UINT32 field, RequestId, that is used to match device responses to host sent messages.
The most common use of REMOTE_NDIS_INDICATE_STATUS_MSG is to indicate the state of link for an 802.3 device. Status=RNDIS_STATUS_MEDIA_CONNECT indicates a transition from disconnected, no 802.3 link pulse, to connected state, 802.3 link pulse detected. Status= RNDIS_STATUS_MEDIA_DISCONNECT indicates a transition from connected to disconnected state. The device must send an REMOTE_NDIS_INDICATE_STATUS_MSG with one of these values every time that the 802.3 link state changes. No status buffer is required to return these two common indications.
In the specific case where this is sent in response to a message that the device could not handle, the Status field must be set to RNDIS_STATUS_INVALID_DATA, and the status buffer included.
If an error condition, such as the device didn't understand a particular message, was caused by an Remote NDIS message, then the device must append the original message at the end of the status message. In this case, DiagStatus contains additional status about the error itself, for example RNDIS_STATUS_NOT_SUPPORTED, and ErrorOffset is the 0-based byte offset within the offending message at which the error was detected.
Note: that this message should only be used to report an error condition when the device is not able to generate a response message with appropriate status. For example, you should use this message if the device receives one of the following messages:
- A message with unsupported message type.
- A REMOTE_NDIS_PACKET_MSG with unacceptable contents.
Requirements
Header | rndis.h |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Remote NDIS Messages
REMOTE_NDIS_PACKET_MSG
RNDIS_STATUS