LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common Class Definitions

Macros

#define RNDIS_ERROR_LOGICAL_CMD_FAILED   0x80
 
#define REMOTE_NDIS_VERSION_MAJOR   0x01
 
#define REMOTE_NDIS_VERSION_MINOR   0x00
 
#define REMOTE_NDIS_MEDIUM_802_3   0x00000000UL
 
#define RNDIS_MESSAGE_BUFFER_SIZE   128
 
#define ETHERNET_FRAME_SIZE_MAX   1500
 

Typedefs

struct {
   uint8_t   Octets [6]
 
MAC_Address_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
RNDIS_Message_Header_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   DataOffset
 
   uint32_t   DataLength
 
   uint32_t   OOBDataOffset
 
   uint32_t   OOBDataLength
 
   uint32_t   NumOOBDataElements
 
   uint32_t   PerPacketInfoOffset
 
   uint32_t   PerPacketInfoLength
 
   uint32_t   VcHandle
 
   uint32_t   Reserved
 
RNDIS_Packet_Message_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   MajorVersion
 
   uint32_t   MinorVersion
 
   uint32_t   MaxTransferSize
 
RNDIS_Initialize_Message_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Status
 
   uint32_t   MajorVersion
 
   uint32_t   MinorVersion
 
   uint32_t   DeviceFlags
 
   uint32_t   Medium
 
   uint32_t   MaxPacketsPerTransfer
 
   uint32_t   MaxTransferSize
 
   uint32_t   PacketAlignmentFactor
 
   uint32_t   AFListOffset
 
   uint32_t   AFListSize
 
RNDIS_Initialize_Complete_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
RNDIS_KeepAlive_Message_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Status
 
RNDIS_KeepAlive_Complete_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   Status
 
   uint32_t   AddressingReset
 
RNDIS_Reset_Complete_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Oid
 
   uint32_t   InformationBufferLength
 
   uint32_t   InformationBufferOffset
 
   uint32_t   DeviceVcHandle
 
RNDIS_Set_Message_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Status
 
RNDIS_Set_Complete_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Oid
 
   uint32_t   InformationBufferLength
 
   uint32_t   InformationBufferOffset
 
   uint32_t   DeviceVcHandle
 
RNDIS_Query_Message_t
 
struct {
   uint32_t   MessageType
 
   uint32_t   MessageLength
 
   uint32_t   RequestId
 
   uint32_t   Status
 
   uint32_t   InformationBufferLength
 
   uint32_t   InformationBufferOffset
 
RNDIS_Query_Complete_t
 

Enumerations

enum  RNDIS_ClassRequests_t { RNDIS_REQ_SendEncapsulatedCommand = 0x00, RNDIS_REQ_GetEncapsulatedResponse = 0x01 }
 
enum  RNDIS_States_t { RNDIS_Uninitialized = 0, RNDIS_Initialized = 1, RNDIS_Data_Initialized = 2 }
 
enum  RNDIS_ClassNotifications_t { RNDIS_NOTIF_ResponseAvailable = 0x01 }
 
enum  NDIS_Hardware_Status_t {
  NDIS_HardwareStatus_Ready, NDIS_HardwareStatus_Initializing, NDIS_HardwareStatus_Reset, NDIS_HardwareStatus_Closing,
  NDIS_HardwareStatus_NotReady
}
 

RNDIS Message Values

#define REMOTE_NDIS_PACKET_MSG   0x00000001UL
 
#define REMOTE_NDIS_INITIALIZE_MSG   0x00000002UL
 
#define REMOTE_NDIS_HALT_MSG   0x00000003UL
 
#define REMOTE_NDIS_QUERY_MSG   0x00000004UL
 
#define REMOTE_NDIS_SET_MSG   0x00000005UL
 
#define REMOTE_NDIS_RESET_MSG   0x00000006UL
 
#define REMOTE_NDIS_INDICATE_STATUS_MSG   0x00000007UL
 
#define REMOTE_NDIS_KEEPALIVE_MSG   0x00000008UL
 

RNDIS Response Values

#define REMOTE_NDIS_INITIALIZE_CMPLT   0x80000002UL
 
#define REMOTE_NDIS_QUERY_CMPLT   0x80000004UL
 
#define REMOTE_NDIS_SET_CMPLT   0x80000005UL
 
#define REMOTE_NDIS_RESET_CMPLT   0x80000006UL
 
#define REMOTE_NDIS_KEEPALIVE_CMPLT   0x80000008UL
 

RNDIS Status Values

#define REMOTE_NDIS_STATUS_SUCCESS   0x00000000UL
 
#define REMOTE_NDIS_STATUS_FAILURE   0xC0000001UL
 
#define REMOTE_NDIS_STATUS_INVALID_DATA   0xC0010015UL
 
#define REMOTE_NDIS_STATUS_NOT_SUPPORTED   0xC00000BBUL
 
#define REMOTE_NDIS_STATUS_MEDIA_CONNECT   0x4001000BUL
 
#define REMOTE_NDIS_STATUS_MEDIA_DISCONNECT   0x4001000CUL
 

RNDIS Media States

#define REMOTE_NDIS_MEDIA_STATE_CONNECTED   0x00000000UL
 
#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED   0x00000001UL
 

RNDIS Connection Types

#define REMOTE_NDIS_DF_CONNECTIONLESS   0x00000001UL
 
#define REMOTE_NDIS_DF_CONNECTION_ORIENTED   0x00000002UL
 

RNDIS Packet Types

#define REMOTE_NDIS_PACKET_DIRECTED   0x00000001UL
 
#define REMOTE_NDIS_PACKET_MULTICAST   0x00000002UL
 
#define REMOTE_NDIS_PACKET_ALL_MULTICAST   0x00000004UL
 
#define REMOTE_NDIS_PACKET_BROADCAST   0x00000008UL
 
#define REMOTE_NDIS_PACKET_SOURCE_ROUTING   0x00000010UL
 
#define REMOTE_NDIS_PACKET_PROMISCUOUS   0x00000020UL
 
#define REMOTE_NDIS_PACKET_SMT   0x00000040UL
 
#define REMOTE_NDIS_PACKET_ALL_LOCAL   0x00000080UL
 
#define REMOTE_NDIS_PACKET_GROUP   0x00001000UL
 
#define REMOTE_NDIS_PACKET_ALL_FUNCTIONAL   0x00002000UL
 
#define REMOTE_NDIS_PACKET_FUNCTIONAL   0x00004000UL
 
#define REMOTE_NDIS_PACKET_MAC_FRAME   0x00008000UL
 

RNDIS OID Values

#define OID_GEN_SUPPORTED_LIST   0x00010101UL
 
#define OID_GEN_HARDWARE_STATUS   0x00010102UL
 
#define OID_GEN_MEDIA_SUPPORTED   0x00010103UL
 
#define OID_GEN_MEDIA_IN_USE   0x00010104UL
 
#define OID_GEN_MAXIMUM_FRAME_SIZE   0x00010106UL
 
#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111UL
 
#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111UL
 
#define OID_GEN_LINK_SPEED   0x00010107UL
 
#define OID_GEN_TRANSMIT_BLOCK_SIZE   0x0001010AUL
 
#define OID_GEN_RECEIVE_BLOCK_SIZE   0x0001010BUL
 
#define OID_GEN_VENDOR_ID   0x0001010CUL
 
#define OID_GEN_VENDOR_DESCRIPTION   0x0001010DUL
 
#define OID_GEN_CURRENT_PACKET_FILTER   0x0001010EUL
 
#define OID_GEN_MEDIA_CONNECT_STATUS   0x00010114UL
 
#define OID_GEN_PHYSICAL_MEDIUM   0x00010202UL
 
#define OID_GEN_XMIT_OK   0x00020101UL
 
#define OID_GEN_RCV_OK   0x00020102UL
 
#define OID_GEN_XMIT_ERROR   0x00020103UL
 
#define OID_GEN_RCV_ERROR   0x00020104UL
 
#define OID_GEN_RCV_NO_BUFFER   0x00020105UL
 
#define OID_802_3_PERMANENT_ADDRESS   0x01010101UL
 
#define OID_802_3_CURRENT_ADDRESS   0x01010102UL
 
#define OID_802_3_MULTICAST_LIST   0x01010103UL
 
#define OID_802_3_MAXIMUM_LIST_SIZE   0x01010104UL
 
#define OID_802_3_RCV_ERROR_ALIGNMENT   0x01020101UL
 
#define OID_802_3_XMIT_ONE_COLLISION   0x01020102UL
 
#define OID_802_3_XMIT_MORE_COLLISIONS   0x01020103UL
 

Detailed Description

Module Description

Constants, Types and Enum definitions that are common to both Device and Host modes for the USB RNDIS Class.

Macro Definition Documentation

#define ETHERNET_FRAME_SIZE_MAX   1500

Maximum size in bytes of an Ethernet frame according to the Ethernet standard.

Definition at line 169 of file RNDISClassCommon.h.

#define OID_802_3_CURRENT_ADDRESS   0x01010102UL

Definition at line 157 of file RNDISClassCommon.h.

#define OID_802_3_MAXIMUM_LIST_SIZE   0x01010104UL

Definition at line 159 of file RNDISClassCommon.h.

#define OID_802_3_MULTICAST_LIST   0x01010103UL

Definition at line 158 of file RNDISClassCommon.h.

#define OID_802_3_PERMANENT_ADDRESS   0x01010101UL

Definition at line 156 of file RNDISClassCommon.h.

#define OID_802_3_RCV_ERROR_ALIGNMENT   0x01020101UL

Definition at line 160 of file RNDISClassCommon.h.

#define OID_802_3_XMIT_MORE_COLLISIONS   0x01020103UL

Definition at line 162 of file RNDISClassCommon.h.

#define OID_802_3_XMIT_ONE_COLLISION   0x01020102UL

Definition at line 161 of file RNDISClassCommon.h.

#define OID_GEN_CURRENT_PACKET_FILTER   0x0001010EUL

Definition at line 147 of file RNDISClassCommon.h.

#define OID_GEN_HARDWARE_STATUS   0x00010102UL

Definition at line 137 of file RNDISClassCommon.h.

#define OID_GEN_LINK_SPEED   0x00010107UL

Definition at line 142 of file RNDISClassCommon.h.

#define OID_GEN_MAXIMUM_FRAME_SIZE   0x00010106UL

Definition at line 140 of file RNDISClassCommon.h.

#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111UL

Definition at line 148 of file RNDISClassCommon.h.

#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111UL

Definition at line 148 of file RNDISClassCommon.h.

#define OID_GEN_MEDIA_CONNECT_STATUS   0x00010114UL

Definition at line 149 of file RNDISClassCommon.h.

#define OID_GEN_MEDIA_IN_USE   0x00010104UL

Definition at line 139 of file RNDISClassCommon.h.

#define OID_GEN_MEDIA_SUPPORTED   0x00010103UL

Definition at line 138 of file RNDISClassCommon.h.

#define OID_GEN_PHYSICAL_MEDIUM   0x00010202UL

Definition at line 150 of file RNDISClassCommon.h.

#define OID_GEN_RCV_ERROR   0x00020104UL

Definition at line 154 of file RNDISClassCommon.h.

#define OID_GEN_RCV_NO_BUFFER   0x00020105UL

Definition at line 155 of file RNDISClassCommon.h.

#define OID_GEN_RCV_OK   0x00020102UL

Definition at line 152 of file RNDISClassCommon.h.

#define OID_GEN_RECEIVE_BLOCK_SIZE   0x0001010BUL

Definition at line 144 of file RNDISClassCommon.h.

#define OID_GEN_SUPPORTED_LIST   0x00010101UL

Definition at line 136 of file RNDISClassCommon.h.

#define OID_GEN_TRANSMIT_BLOCK_SIZE   0x0001010AUL

Definition at line 143 of file RNDISClassCommon.h.

#define OID_GEN_VENDOR_DESCRIPTION   0x0001010DUL

Definition at line 146 of file RNDISClassCommon.h.

#define OID_GEN_VENDOR_ID   0x0001010CUL

Definition at line 145 of file RNDISClassCommon.h.

#define OID_GEN_XMIT_ERROR   0x00020103UL

Definition at line 153 of file RNDISClassCommon.h.

#define OID_GEN_XMIT_OK   0x00020101UL

Definition at line 151 of file RNDISClassCommon.h.

#define REMOTE_NDIS_DF_CONNECTION_ORIENTED   0x00000002UL

Definition at line 115 of file RNDISClassCommon.h.

#define REMOTE_NDIS_DF_CONNECTIONLESS   0x00000001UL

Definition at line 114 of file RNDISClassCommon.h.

#define REMOTE_NDIS_HALT_MSG   0x00000003UL

Definition at line 77 of file RNDISClassCommon.h.

#define REMOTE_NDIS_INDICATE_STATUS_MSG   0x00000007UL

Definition at line 81 of file RNDISClassCommon.h.

#define REMOTE_NDIS_INITIALIZE_CMPLT   0x80000002UL

Definition at line 87 of file RNDISClassCommon.h.

#define REMOTE_NDIS_INITIALIZE_MSG   0x00000002UL

Definition at line 76 of file RNDISClassCommon.h.

#define REMOTE_NDIS_KEEPALIVE_CMPLT   0x80000008UL

Definition at line 91 of file RNDISClassCommon.h.

#define REMOTE_NDIS_KEEPALIVE_MSG   0x00000008UL

Definition at line 82 of file RNDISClassCommon.h.

#define REMOTE_NDIS_MEDIA_STATE_CONNECTED   0x00000000UL

Definition at line 106 of file RNDISClassCommon.h.

#define REMOTE_NDIS_MEDIA_STATE_DISCONNECTED   0x00000001UL

Definition at line 107 of file RNDISClassCommon.h.

#define REMOTE_NDIS_MEDIUM_802_3   0x00000000UL

Definition at line 110 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_ALL_FUNCTIONAL   0x00002000UL

Definition at line 129 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_ALL_LOCAL   0x00000080UL

Definition at line 127 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_ALL_MULTICAST   0x00000004UL

Definition at line 122 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_BROADCAST   0x00000008UL

Definition at line 123 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_DIRECTED   0x00000001UL

Definition at line 120 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_FUNCTIONAL   0x00004000UL

Definition at line 130 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_GROUP   0x00001000UL

Definition at line 128 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_MAC_FRAME   0x00008000UL

Definition at line 131 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_MSG   0x00000001UL

Definition at line 75 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_MULTICAST   0x00000002UL

Definition at line 121 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_PROMISCUOUS   0x00000020UL

Definition at line 125 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_SMT   0x00000040UL

Definition at line 126 of file RNDISClassCommon.h.

#define REMOTE_NDIS_PACKET_SOURCE_ROUTING   0x00000010UL

Definition at line 124 of file RNDISClassCommon.h.

#define REMOTE_NDIS_QUERY_CMPLT   0x80000004UL

Definition at line 88 of file RNDISClassCommon.h.

#define REMOTE_NDIS_QUERY_MSG   0x00000004UL

Definition at line 78 of file RNDISClassCommon.h.

#define REMOTE_NDIS_RESET_CMPLT   0x80000006UL

Definition at line 90 of file RNDISClassCommon.h.

#define REMOTE_NDIS_RESET_MSG   0x00000006UL

Definition at line 80 of file RNDISClassCommon.h.

#define REMOTE_NDIS_SET_CMPLT   0x80000005UL

Definition at line 89 of file RNDISClassCommon.h.

#define REMOTE_NDIS_SET_MSG   0x00000005UL

Definition at line 79 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_FAILURE   0xC0000001UL

Definition at line 97 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_INVALID_DATA   0xC0010015UL

Definition at line 98 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_MEDIA_CONNECT   0x4001000BUL

Definition at line 100 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_MEDIA_DISCONNECT   0x4001000CUL

Definition at line 101 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_NOT_SUPPORTED   0xC00000BBUL

Definition at line 99 of file RNDISClassCommon.h.

#define REMOTE_NDIS_STATUS_SUCCESS   0x00000000UL

Definition at line 96 of file RNDISClassCommon.h.

#define REMOTE_NDIS_VERSION_MAJOR   0x01

Implemented RNDIS Version Major.

Definition at line 68 of file RNDISClassCommon.h.

#define REMOTE_NDIS_VERSION_MINOR   0x00

Implemented RNDIS Version Minor.

Definition at line 71 of file RNDISClassCommon.h.

#define RNDIS_ERROR_LOGICAL_CMD_FAILED   0x80

Additional error code for RNDIS functions when a device returns a logical command failure.

Definition at line 65 of file RNDISClassCommon.h.

#define RNDIS_MESSAGE_BUFFER_SIZE   128

Maximum size in bytes of a RNDIS control message which can be sent or received.

Definition at line 166 of file RNDISClassCommon.h.

Typedef Documentation

typedef { ... } MAC_Address_t
typedef { ... } RNDIS_Initialize_Complete_t
typedef { ... } RNDIS_Initialize_Message_t
typedef { ... } RNDIS_KeepAlive_Complete_t
typedef { ... } RNDIS_KeepAlive_Message_t
typedef { ... } RNDIS_Message_Header_t
typedef { ... } RNDIS_Packet_Message_t
typedef { ... } RNDIS_Query_Complete_t
typedef { ... } RNDIS_Query_Message_t
typedef { ... } RNDIS_Reset_Complete_t
typedef { ... } RNDIS_Set_Complete_t
typedef { ... } RNDIS_Set_Message_t

Enumeration Type Documentation

Enum for the NDIS hardware states.

Enumerator:
NDIS_HardwareStatus_Ready 

Hardware Ready to accept commands from the host.

NDIS_HardwareStatus_Initializing 

Hardware busy initializing.

NDIS_HardwareStatus_Reset 

Hardware reset.

NDIS_HardwareStatus_Closing 

Hardware currently closing.

NDIS_HardwareStatus_NotReady 

Hardware not ready to accept commands from the host.

Definition at line 194 of file RNDISClassCommon.h.

Enum for the RNDIS class specific notification requests that can be issued by a RNDIS device to a host.

Enumerator:
RNDIS_NOTIF_ResponseAvailable 

Notification request value for a RNDIS Response Available notification.

Definition at line 188 of file RNDISClassCommon.h.

Enum for the RNDIS class specific control requests that can be issued by the USB bus host.

Enumerator:
RNDIS_REQ_SendEncapsulatedCommand 

RNDIS request to issue a host-to-device NDIS command.

RNDIS_REQ_GetEncapsulatedResponse 

RNDIS request to issue a device-to-host NDIS response.

Definition at line 173 of file RNDISClassCommon.h.

Enum for the possible NDIS adapter states.

Enumerator:
RNDIS_Uninitialized 

Adapter currently uninitialized.

RNDIS_Initialized 

Adapter currently initialized but not ready for data transfers.

RNDIS_Data_Initialized 

Adapter currently initialized and ready for data transfers.

Definition at line 180 of file RNDISClassCommon.h.