TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbRndis.h File Reference

Go to the source code of this file.

Data Structures

struct  USB_RNDIS_DEVICE
 
struct  BIT_MAP
 
struct  _REMOTE_NDIS_MSG_HEADER
 
struct  REMOTE_NDIS_INITIALIZE_MSG
 
struct  REMOTE_NDIS_HALT_MSG
 
struct  REMOTE_NDIS_QUERY_MSG
 
struct  REMOTE_NDIS_QUERY_MAC_MSG
 
struct  REMOTE_NDIS_QUERY_MAX_TOTAL_SIZE_MSG
 
struct  REMOTE_NDIS_SET_MSG
 
struct  REMOTE_NDIS_RESET_MSG
 
struct  REMOTE_NDIS_INDICATE_STATUS_MSG
 
struct  RNDIS_DIAGNOSTIC_INFO
 
struct  REMOTE_NDIS_KEEPALIVE_MSG
 
struct  REMOTE_NDIS_INITIALIZE_CMPLT
 
struct  REMOTE_NDIS_QUERY_CMPLT
 
struct  REMOTE_NDIS_QUERY_MAC_CMPLT
 
struct  REMOTE_NDIS_QUERY_MAX_TOTAL_SIZE_CMPLT
 
struct  REMOTE_NDIS_SET_CMPLT
 
struct  REMOTE_NDIS_RESET_CMPLT
 
struct  REMOTE_NDIS_KEEPALIVE_CMPLT
 
struct  REMOTE_NDIS_PACKET_MSG
 
struct  OUT_OF_BAND_DATA_RECORD
 
struct  PER_PACKET_INFO_DATA_RECORD
 
struct  PACKET_LIST
 

Macros

#define USB_RNDIS_DRIVER_VERSION   1
 
#define USB_TX_ETHERNET_BULK_TIMEOUT   3000
 
#define USB_RX_ETHERNET_BULK_TIMEOUT   3
 
#define USB_ETHERNET_TRANSFER_TIMEOUT   200
 
#define LAN_BULKIN_CMD_CONTROL   1
 
#define MAXIMUM_STOPBULKIN_CNT   300
 
#define MINIMUM_STOPBULKIN_CNT   3
 
#define BULKIN_CMD_POLLING_CNT   300
 
#define RNDIS_RESERVED_BYTE_LENGTH   8
 
#define USB_RNDIS_SIGNATURE   SIGNATURE_32('r', 'n', 'd', 's')
 
#define USB_RNDIS_DEVICE_FROM_THIS(a)   CR (a, USB_RNDIS_DEVICE, UsbEth, USB_RNDIS_SIGNATURE)
 
#define RNDIS_MAJOR_VERSION   0x00000001
 
#define RNDIS_MINOR_VERSION   0x00000000
 
#define RNDIS_MAX_TRANSFER_SIZE   0x4000
 
#define RNDIS_PACKET_MSG   0x00000001
 
#define RNDIS_INITIALIZE_MSG   0x00000002
 
#define RNDIS_INITIALIZE_CMPLT   0x80000002
 
#define RNDIS_HLT_MSG   0x00000003
 
#define RNDIS_QUERY_MSG   0x00000004
 
#define RNDIS_QUERY_CMPLT   0x80000004
 
#define RNDIS_SET_MSG   0x00000005
 
#define RNDIS_SET_CMPLT   0x80000005
 
#define RNDIS_RESET_MSG   0x00000006
 
#define RNDIS_RESET_CMPLT   0x80000006
 
#define RNDIS_INDICATE_STATUS_MSG   0x00000007
 
#define RNDIS_KEEPALIVE_MSG   0x00000008
 
#define RNDIS_KEEPALIVE_CMPLT   0x80000008
 
#define RNDIS_STATUS_SUCCESS   0x00000000
 
#define RNDIS_STATUS_FAILURE   0xC0000001
 
#define RNDIS_STATUS_INVALID_DATA   0xC0010015
 
#define RNDIS_STATUS_NOT_SUPPORTED   0xC00000BB
 
#define RNDIS_STATUS_MEDIA_CONNECT   0x4001000B
 
#define RNDIS_STATUS_MEDIA_DISCONNECT   0x4001000C
 
#define RNDIS_CONTROL_TIMEOUT   10000
 
#define RNDIS_KEEPALIVE_TIMEOUT   5000
 
#define SEND_ENCAPSULATED_COMMAND   0x00000000
 
#define GET_ENCAPSULATED_RESPONSE   0x00000001
 
#define OID_GEN_SUPPORTED_LIST   0x00010101
 
#define OID_GEN_HARDWARE_STATUS   0x00010102
 
#define OID_GEN_MEDIA_SUPPORTED   0x00010103
 
#define OID_GEN_MEDIA_IN_USE   0x00010104
 
#define OID_GEN_MAXIMUM_LOOKAHEAD   0x00010105
 
#define OID_GEN_MAXIMUM_FRAME_SIZE   0x00010106
 
#define OID_GEN_LINK_SPEED   0x00010107
 
#define OID_GEN_TRANSMIT_BUFFER_SPACE   0x00010108
 
#define OID_GEN_RECEIVE_BUFFER_SPACE   0x00010109
 
#define OID_GEN_TRANSMIT_BLOCK_SIZE   0x0001010A
 
#define OID_GEN_RECEIVE_BLOCK_SIZE   0x0001010B
 
#define OID_GEN_VENDOR_ID   0x0001010C
 
#define OID_GEN_VENDOR_DESCRIPTION   0x0001010D
 
#define OID_GEN_CURRENT_PACKET_FILTER   0x0001010E
 
#define OID_GEN_CURRENT_LOOKAHEAD   0x0001010F
 
#define OID_GEN_DRIVER_VERSION   0x00010110
 
#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111
 
#define OID_GEN_PROTOCOL_OPTIONS   0x00010112
 
#define OID_GEN_MAC_OPTIONS   0x00010113
 
#define OID_GEN_MEDIA_CONNECT_STATUS   0x00010114
 
#define OID_GEN_MAXIMUM_SEND_PACKETS   0x00010115
 
#define OID_GEN_VENDOR_DRIVER_VERSION   0x00010116
 
#define OID_GEN_XMIT_OK   0x00020101
 
#define OID_GEN_RCV_OK   0x00020102
 
#define OID_GEN_XMIT_ERROR   0x00020103
 
#define OID_GEN_RCV_ERROR   0x00020104
 
#define OID_GEN_RCV_NO_BUFFER   0x00020105
 
#define OID_GEN_DIRECTED_BYTES_XMIT   0x00020201
 
#define OID_GEN_DIRECTED_FRAMES_XMIT   0x00020202
 
#define OID_GEN_MULTICAST_BYTES_XMIT   0x00020203
 
#define OID_GEN_MULTICAST_FRAMES_XMIT   0x00020204
 
#define OID_GEN_BROADCAST_BYTES_XMIT   0x00020205
 
#define OID_GEN_BROADCAST_FRAMES_XMIT   0x00020206
 
#define OID_GEN_DIRECTED_BYTES_RCV   0x00020207
 
#define OID_GEN_DIRECTED_FRAMES_RCV   0x00020208
 
#define OID_GEN_MULTICAST_BYTES_RCV   0x00020209
 
#define OID_GEN_MULTICAST_FRAMES_RCV   0x0002020A
 
#define OID_GEN_BROADCAST_BYTES_RCV   0x0002020B
 
#define OID_GEN_BROADCAST_FRAMES_RCV   0x0002020C
 
#define OID_GEN_RCV_CRC_ERROR   0x0002020D
 
#define OID_GEN_TRANSMIT_QUEUE_LENGTH   0x0002020E
 
#define OID_802_3_CURRENT_ADDRESS   0x01010102
 
#define NDIS_PACKET_TYPE_DIRECTED   0x0001
 
#define NDIS_PACKET_TYPE_MULTICAST   0x0002
 
#define NDIS_PACKET_TYPE_ALL_MULTICAST   0x0004
 
#define NDIS_PACKET_TYPE_BROADCAST   0x0008
 
#define NDIS_PACKET_TYPE_SOURCE_ROUTING   0x0010
 
#define NDIS_PACKET_TYPE_PROMISCUOUS   0x0020
 
#define NDIS_PACKET_TYPE_SMT   0x0040
 
#define NDIS_PACKET_TYPE_ALL_LOCAL   0x0080
 
#define NDIS_PACKET_TYPE_MAC_FRAME   0x8000
 
#define NDIS_PACKET_TYPE_FUNCTIONAL   0x4000
 
#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x2000
 
#define NDIS_PACKET_TYPE_GROUP   0x1000
 

Typedefs

typedef struct _REMOTE_NDIS_MSG_HEADER REMOTE_NDIS_MSG_HEADER
 

Functions

EFI_STATUS EFIAPI UsbRndisDriverSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI UsbRndisDriverStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI UsbRndisDriverStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS LoadAllDescriptor (IN EFI_USB_IO_PROTOCOL *UsbIo, OUT EFI_USB_CONFIG_DESCRIPTOR **ConfigDesc)
 
BOOLEAN NextDescriptor (IN EFI_USB_CONFIG_DESCRIPTOR *Desc, IN OUT UINTN *Offset)
 
EFI_STATUS GetFunctionalDescriptor (IN EFI_USB_CONFIG_DESCRIPTOR *Config, IN UINT8 FunDescriptorType, OUT VOID *DataBuffer)
 
VOID GetEndpoint (IN EFI_USB_IO_PROTOCOL *UsbIo, IN OUT USB_RNDIS_DEVICE *UsbRndisDevice)
 
EFI_STATUS EFIAPI UsbRndisInterrupt (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, IN EFI_USB_DEVICE_REQUEST *Requst)
 
EFI_STATUS EFIAPI InterruptCallback (IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
 
EFI_STATUS EFIAPI GetUsbEthMacAddress (IN EDKII_USB_ETHERNET_PROTOCOL *This, OUT EFI_MAC_ADDRESS *MacAddress)
 
EFI_STATUS EFIAPI UsbEthBulkSize (IN EDKII_USB_ETHERNET_PROTOCOL *This, OUT UINTN *BulkSize)
 
EFI_STATUS EFIAPI RndisDummyReturn (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiStart (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiStop (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiGetInitInfo (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiGetConfigInfo (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiInitialize (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiTransmit (IN PXE_CDB *Cdb, IN EDKII_USB_ETHERNET_PROTOCOL *This, IN VOID *BulkOutData, IN OUT UINTN *DataLength)
 
EFI_STATUS EFIAPI RndisUndiReceive (IN PXE_CDB *Cdb, IN EDKII_USB_ETHERNET_PROTOCOL *This, IN OUT VOID *BulkInData, IN OUT UINTN *DataLength)
 
EFI_STATUS EFIAPI RndisUndiReset (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiShutdown (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiReceiveFilter (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI RndisUndiGetStatus (IN PXE_CDB *Cdb, IN NIC_DATA *Nic)
 
EFI_STATUS EFIAPI GetUsbHeaderFunDescriptor (IN EDKII_USB_ETHERNET_PROTOCOL *This, OUT USB_HEADER_FUN_DESCRIPTOR *UsbHeaderFunDescriptor)
 
EFI_STATUS EFIAPI GetUsbUnionFunDescriptor (IN EDKII_USB_ETHERNET_PROTOCOL *This, OUT USB_UNION_FUN_DESCRIPTOR *UsbUnionFunDescriptor)
 
EFI_STATUS EFIAPI GetUsbRndisFunDescriptor (IN EDKII_USB_ETHERNET_PROTOCOL *This, OUT USB_ETHERNET_FUN_DESCRIPTOR *UsbEthFunDescriptor)
 
EFI_STATUS EFIAPI SetUsbRndisMcastFilter (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN UINT16 Value, IN VOID *McastAddr)
 
EFI_STATUS EFIAPI SetUsbRndisPowerFilter (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN UINT16 Value, IN UINT16 Length, IN VOID *PatternFilter)
 
EFI_STATUS EFIAPI GetUsbRndisPowerFilter (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN UINT16 Value, IN BOOLEAN *PatternActive)
 
EFI_STATUS EFIAPI SetUsbRndisPacketFilter (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN UINT16 Value)
 
EFI_STATUS EFIAPI GetRndisStatistic (IN EDKII_USB_ETHERNET_PROTOCOL *This, IN UINT16 Value, IN VOID *Statistic)
 
EFI_STATUS RndisControlMsg (IN USB_RNDIS_DEVICE *UsbRndisDevice, IN REMOTE_NDIS_MSG_HEADER *RndisMsg, OUT REMOTE_NDIS_MSG_HEADER *RndisMsgResponse)
 
EFI_STATUS RndisTransmitDataMsg (IN USB_RNDIS_DEVICE *UsbRndisDevice, IN REMOTE_NDIS_MSG_HEADER *RndisMsg, UINTN *TransferLength)
 
EFI_STATUS RndisReceiveDataMsg (IN USB_RNDIS_DEVICE *UsbRndisDevice, IN REMOTE_NDIS_MSG_HEADER *RndisMsg, UINTN *TransferLength)
 
VOID PrintRndisMsg (IN REMOTE_NDIS_MSG_HEADER *RndisMsg)
 

Variables

EFI_COMPONENT_NAME2_PROTOCOL gUsbRndisComponentName2
 

Detailed Description

Header file for for USB Rndis driver

Copyright (c) 2023, American Megatrends International LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UsbRndis.h.

Macro Definition Documentation

◆ BULKIN_CMD_POLLING_CNT

#define BULKIN_CMD_POLLING_CNT   300

Definition at line 53 of file UsbRndis.h.

◆ GET_ENCAPSULATED_RESPONSE

#define GET_ENCAPSULATED_RESPONSE   0x00000001

Definition at line 352 of file UsbRndis.h.

◆ LAN_BULKIN_CMD_CONTROL

#define LAN_BULKIN_CMD_CONTROL   1

Definition at line 50 of file UsbRndis.h.

◆ MAXIMUM_STOPBULKIN_CNT

#define MAXIMUM_STOPBULKIN_CNT   300

Definition at line 51 of file UsbRndis.h.

◆ MINIMUM_STOPBULKIN_CNT

#define MINIMUM_STOPBULKIN_CNT   3

Definition at line 52 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_ALL_FUNCTIONAL

#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x2000

Definition at line 416 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_ALL_LOCAL

#define NDIS_PACKET_TYPE_ALL_LOCAL   0x0080

Definition at line 413 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_ALL_MULTICAST

#define NDIS_PACKET_TYPE_ALL_MULTICAST   0x0004

Definition at line 408 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_BROADCAST

#define NDIS_PACKET_TYPE_BROADCAST   0x0008

Definition at line 409 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_DIRECTED

#define NDIS_PACKET_TYPE_DIRECTED   0x0001

Definition at line 406 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_FUNCTIONAL

#define NDIS_PACKET_TYPE_FUNCTIONAL   0x4000

Definition at line 415 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_GROUP

#define NDIS_PACKET_TYPE_GROUP   0x1000

Definition at line 417 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_MAC_FRAME

#define NDIS_PACKET_TYPE_MAC_FRAME   0x8000

Definition at line 414 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_MULTICAST

#define NDIS_PACKET_TYPE_MULTICAST   0x0002

Definition at line 407 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_PROMISCUOUS

#define NDIS_PACKET_TYPE_PROMISCUOUS   0x0020

Definition at line 411 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_SMT

#define NDIS_PACKET_TYPE_SMT   0x0040

Definition at line 412 of file UsbRndis.h.

◆ NDIS_PACKET_TYPE_SOURCE_ROUTING

#define NDIS_PACKET_TYPE_SOURCE_ROUTING   0x0010

Definition at line 410 of file UsbRndis.h.

◆ OID_802_3_CURRENT_ADDRESS

#define OID_802_3_CURRENT_ADDRESS   0x01010102

Definition at line 402 of file UsbRndis.h.

◆ OID_GEN_BROADCAST_BYTES_RCV

#define OID_GEN_BROADCAST_BYTES_RCV   0x0002020B

Definition at line 397 of file UsbRndis.h.

◆ OID_GEN_BROADCAST_BYTES_XMIT

#define OID_GEN_BROADCAST_BYTES_XMIT   0x00020205

Definition at line 391 of file UsbRndis.h.

◆ OID_GEN_BROADCAST_FRAMES_RCV

#define OID_GEN_BROADCAST_FRAMES_RCV   0x0002020C

Definition at line 398 of file UsbRndis.h.

◆ OID_GEN_BROADCAST_FRAMES_XMIT

#define OID_GEN_BROADCAST_FRAMES_XMIT   0x00020206

Definition at line 392 of file UsbRndis.h.

◆ OID_GEN_CURRENT_LOOKAHEAD

#define OID_GEN_CURRENT_LOOKAHEAD   0x0001010F

Definition at line 372 of file UsbRndis.h.

◆ OID_GEN_CURRENT_PACKET_FILTER

#define OID_GEN_CURRENT_PACKET_FILTER   0x0001010E

Definition at line 371 of file UsbRndis.h.

◆ OID_GEN_DIRECTED_BYTES_RCV

#define OID_GEN_DIRECTED_BYTES_RCV   0x00020207

Definition at line 393 of file UsbRndis.h.

◆ OID_GEN_DIRECTED_BYTES_XMIT

#define OID_GEN_DIRECTED_BYTES_XMIT   0x00020201

Definition at line 387 of file UsbRndis.h.

◆ OID_GEN_DIRECTED_FRAMES_RCV

#define OID_GEN_DIRECTED_FRAMES_RCV   0x00020208

Definition at line 394 of file UsbRndis.h.

◆ OID_GEN_DIRECTED_FRAMES_XMIT

#define OID_GEN_DIRECTED_FRAMES_XMIT   0x00020202

Definition at line 388 of file UsbRndis.h.

◆ OID_GEN_DRIVER_VERSION

#define OID_GEN_DRIVER_VERSION   0x00010110

Definition at line 373 of file UsbRndis.h.

◆ OID_GEN_HARDWARE_STATUS

#define OID_GEN_HARDWARE_STATUS   0x00010102

Definition at line 359 of file UsbRndis.h.

◆ OID_GEN_LINK_SPEED

#define OID_GEN_LINK_SPEED   0x00010107

Definition at line 364 of file UsbRndis.h.

◆ OID_GEN_MAC_OPTIONS

#define OID_GEN_MAC_OPTIONS   0x00010113

Definition at line 376 of file UsbRndis.h.

◆ OID_GEN_MAXIMUM_FRAME_SIZE

#define OID_GEN_MAXIMUM_FRAME_SIZE   0x00010106

Definition at line 363 of file UsbRndis.h.

◆ OID_GEN_MAXIMUM_LOOKAHEAD

#define OID_GEN_MAXIMUM_LOOKAHEAD   0x00010105

Definition at line 362 of file UsbRndis.h.

◆ OID_GEN_MAXIMUM_SEND_PACKETS

#define OID_GEN_MAXIMUM_SEND_PACKETS   0x00010115

Definition at line 378 of file UsbRndis.h.

◆ OID_GEN_MAXIMUM_TOTAL_SIZE

#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111

Definition at line 374 of file UsbRndis.h.

◆ OID_GEN_MEDIA_CONNECT_STATUS

#define OID_GEN_MEDIA_CONNECT_STATUS   0x00010114

Definition at line 377 of file UsbRndis.h.

◆ OID_GEN_MEDIA_IN_USE

#define OID_GEN_MEDIA_IN_USE   0x00010104

Definition at line 361 of file UsbRndis.h.

◆ OID_GEN_MEDIA_SUPPORTED

#define OID_GEN_MEDIA_SUPPORTED   0x00010103

Definition at line 360 of file UsbRndis.h.

◆ OID_GEN_MULTICAST_BYTES_RCV

#define OID_GEN_MULTICAST_BYTES_RCV   0x00020209

Definition at line 395 of file UsbRndis.h.

◆ OID_GEN_MULTICAST_BYTES_XMIT

#define OID_GEN_MULTICAST_BYTES_XMIT   0x00020203

Definition at line 389 of file UsbRndis.h.

◆ OID_GEN_MULTICAST_FRAMES_RCV

#define OID_GEN_MULTICAST_FRAMES_RCV   0x0002020A

Definition at line 396 of file UsbRndis.h.

◆ OID_GEN_MULTICAST_FRAMES_XMIT

#define OID_GEN_MULTICAST_FRAMES_XMIT   0x00020204

Definition at line 390 of file UsbRndis.h.

◆ OID_GEN_PROTOCOL_OPTIONS

#define OID_GEN_PROTOCOL_OPTIONS   0x00010112

Definition at line 375 of file UsbRndis.h.

◆ OID_GEN_RCV_CRC_ERROR

#define OID_GEN_RCV_CRC_ERROR   0x0002020D

Definition at line 399 of file UsbRndis.h.

◆ OID_GEN_RCV_ERROR

#define OID_GEN_RCV_ERROR   0x00020104

Definition at line 384 of file UsbRndis.h.

◆ OID_GEN_RCV_NO_BUFFER

#define OID_GEN_RCV_NO_BUFFER   0x00020105

Definition at line 385 of file UsbRndis.h.

◆ OID_GEN_RCV_OK

#define OID_GEN_RCV_OK   0x00020102

Definition at line 382 of file UsbRndis.h.

◆ OID_GEN_RECEIVE_BLOCK_SIZE

#define OID_GEN_RECEIVE_BLOCK_SIZE   0x0001010B

Definition at line 368 of file UsbRndis.h.

◆ OID_GEN_RECEIVE_BUFFER_SPACE

#define OID_GEN_RECEIVE_BUFFER_SPACE   0x00010109

Definition at line 366 of file UsbRndis.h.

◆ OID_GEN_SUPPORTED_LIST

#define OID_GEN_SUPPORTED_LIST   0x00010101

Definition at line 358 of file UsbRndis.h.

◆ OID_GEN_TRANSMIT_BLOCK_SIZE

#define OID_GEN_TRANSMIT_BLOCK_SIZE   0x0001010A

Definition at line 367 of file UsbRndis.h.

◆ OID_GEN_TRANSMIT_BUFFER_SPACE

#define OID_GEN_TRANSMIT_BUFFER_SPACE   0x00010108

Definition at line 365 of file UsbRndis.h.

◆ OID_GEN_TRANSMIT_QUEUE_LENGTH

#define OID_GEN_TRANSMIT_QUEUE_LENGTH   0x0002020E

Definition at line 400 of file UsbRndis.h.

◆ OID_GEN_VENDOR_DESCRIPTION

#define OID_GEN_VENDOR_DESCRIPTION   0x0001010D

Definition at line 370 of file UsbRndis.h.

◆ OID_GEN_VENDOR_DRIVER_VERSION

#define OID_GEN_VENDOR_DRIVER_VERSION   0x00010116

Definition at line 379 of file UsbRndis.h.

◆ OID_GEN_VENDOR_ID

#define OID_GEN_VENDOR_ID   0x0001010C

Definition at line 369 of file UsbRndis.h.

◆ OID_GEN_XMIT_ERROR

#define OID_GEN_XMIT_ERROR   0x00020103

Definition at line 383 of file UsbRndis.h.

◆ OID_GEN_XMIT_OK

#define OID_GEN_XMIT_OK   0x00020101

Definition at line 381 of file UsbRndis.h.

◆ RNDIS_CONTROL_TIMEOUT

#define RNDIS_CONTROL_TIMEOUT   10000

Definition at line 348 of file UsbRndis.h.

◆ RNDIS_HLT_MSG

#define RNDIS_HLT_MSG   0x00000003

Definition at line 330 of file UsbRndis.h.

◆ RNDIS_INDICATE_STATUS_MSG

#define RNDIS_INDICATE_STATUS_MSG   0x00000007

Definition at line 337 of file UsbRndis.h.

◆ RNDIS_INITIALIZE_CMPLT

#define RNDIS_INITIALIZE_CMPLT   0x80000002

Definition at line 329 of file UsbRndis.h.

◆ RNDIS_INITIALIZE_MSG

#define RNDIS_INITIALIZE_MSG   0x00000002

Definition at line 328 of file UsbRndis.h.

◆ RNDIS_KEEPALIVE_CMPLT

#define RNDIS_KEEPALIVE_CMPLT   0x80000008

Definition at line 339 of file UsbRndis.h.

◆ RNDIS_KEEPALIVE_MSG

#define RNDIS_KEEPALIVE_MSG   0x00000008

Definition at line 338 of file UsbRndis.h.

◆ RNDIS_KEEPALIVE_TIMEOUT

#define RNDIS_KEEPALIVE_TIMEOUT   5000

Definition at line 349 of file UsbRndis.h.

◆ RNDIS_MAJOR_VERSION

#define RNDIS_MAJOR_VERSION   0x00000001

Definition at line 323 of file UsbRndis.h.

◆ RNDIS_MAX_TRANSFER_SIZE

#define RNDIS_MAX_TRANSFER_SIZE   0x4000

Definition at line 325 of file UsbRndis.h.

◆ RNDIS_MINOR_VERSION

#define RNDIS_MINOR_VERSION   0x00000000

Definition at line 324 of file UsbRndis.h.

◆ RNDIS_PACKET_MSG

#define RNDIS_PACKET_MSG   0x00000001

Definition at line 327 of file UsbRndis.h.

◆ RNDIS_QUERY_CMPLT

#define RNDIS_QUERY_CMPLT   0x80000004

Definition at line 332 of file UsbRndis.h.

◆ RNDIS_QUERY_MSG

#define RNDIS_QUERY_MSG   0x00000004

Definition at line 331 of file UsbRndis.h.

◆ RNDIS_RESERVED_BYTE_LENGTH

#define RNDIS_RESERVED_BYTE_LENGTH   8

Definition at line 54 of file UsbRndis.h.

◆ RNDIS_RESET_CMPLT

#define RNDIS_RESET_CMPLT   0x80000006

Definition at line 336 of file UsbRndis.h.

◆ RNDIS_RESET_MSG

#define RNDIS_RESET_MSG   0x00000006

Definition at line 335 of file UsbRndis.h.

◆ RNDIS_SET_CMPLT

#define RNDIS_SET_CMPLT   0x80000005

Definition at line 334 of file UsbRndis.h.

◆ RNDIS_SET_MSG

#define RNDIS_SET_MSG   0x00000005

Definition at line 333 of file UsbRndis.h.

◆ RNDIS_STATUS_FAILURE

#define RNDIS_STATUS_FAILURE   0xC0000001

Definition at line 342 of file UsbRndis.h.

◆ RNDIS_STATUS_INVALID_DATA

#define RNDIS_STATUS_INVALID_DATA   0xC0010015

Definition at line 343 of file UsbRndis.h.

◆ RNDIS_STATUS_MEDIA_CONNECT

#define RNDIS_STATUS_MEDIA_CONNECT   0x4001000B

Definition at line 345 of file UsbRndis.h.

◆ RNDIS_STATUS_MEDIA_DISCONNECT

#define RNDIS_STATUS_MEDIA_DISCONNECT   0x4001000C

Definition at line 346 of file UsbRndis.h.

◆ RNDIS_STATUS_NOT_SUPPORTED

#define RNDIS_STATUS_NOT_SUPPORTED   0xC00000BB

Definition at line 344 of file UsbRndis.h.

◆ RNDIS_STATUS_SUCCESS

#define RNDIS_STATUS_SUCCESS   0x00000000

Definition at line 341 of file UsbRndis.h.

◆ SEND_ENCAPSULATED_COMMAND

#define SEND_ENCAPSULATED_COMMAND   0x00000000

Definition at line 351 of file UsbRndis.h.

◆ USB_ETHERNET_TRANSFER_TIMEOUT

#define USB_ETHERNET_TRANSFER_TIMEOUT   200

Definition at line 48 of file UsbRndis.h.

◆ USB_RNDIS_DEVICE_FROM_THIS

#define USB_RNDIS_DEVICE_FROM_THIS (   a)    CR (a, USB_RNDIS_DEVICE, UsbEth, USB_RNDIS_SIGNATURE)

Definition at line 57 of file UsbRndis.h.

◆ USB_RNDIS_DRIVER_VERSION

#define USB_RNDIS_DRIVER_VERSION   1

Definition at line 45 of file UsbRndis.h.

◆ USB_RNDIS_SIGNATURE

#define USB_RNDIS_SIGNATURE   SIGNATURE_32('r', 'n', 'd', 's')

Definition at line 56 of file UsbRndis.h.

◆ USB_RX_ETHERNET_BULK_TIMEOUT

#define USB_RX_ETHERNET_BULK_TIMEOUT   3

Definition at line 47 of file UsbRndis.h.

◆ USB_TX_ETHERNET_BULK_TIMEOUT

#define USB_TX_ETHERNET_BULK_TIMEOUT   3000

Definition at line 46 of file UsbRndis.h.

Typedef Documentation

◆ REMOTE_NDIS_MSG_HEADER

Definition at line 22 of file UsbRndis.h.

Function Documentation

◆ GetEndpoint()

VOID GetEndpoint ( IN EFI_USB_IO_PROTOCOL UsbIo,
IN OUT USB_RNDIS_DEVICE UsbRndisDevice 
)

Get USB Ethernet IO endpoint and USB CDC data IO endpoint.

Parameters
[in]UsbIoA pointer to the EFI_USB_IO_PROTOCOL instance.
[in,out]UsbRndisDeviceA pointer to the USB_RNDIS_DEVICE instance.

Definition at line 169 of file UsbRndisFunction.c.

◆ GetFunctionalDescriptor()

EFI_STATUS GetFunctionalDescriptor ( IN EFI_USB_CONFIG_DESCRIPTOR Config,
IN UINT8  FunDescriptorType,
OUT VOID *  DataBuffer 
)

Read Function descriptor

Parameters
[in]ConfigA pointer to all of configuration.
[in]FunDescriptorTypeUSB CDC class descriptor SubType.
[out]DataBufferA pointer to the Data of corresponding to device capability.
Return values
EFI_SUCCESSThe device capability descriptor was retrieved successfully.
EFI_UNSUPPORTEDNo supported.
EFI_NOT_FOUNDThe device capability descriptor was not found.

Definition at line 100 of file UsbEcmFunction.c.

◆ GetUsbEthMacAddress()

EFI_STATUS EFIAPI GetUsbEthMacAddress ( IN EDKII_USB_ETHERNET_PROTOCOL This,
OUT EFI_MAC_ADDRESS MacAddress 
)

Retrieves the USB Ethernet Mac Address.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[out]MacAddressA pointer to the caller allocated USB Ethernet Mac Address.
Return values
EFI_SUCCESSThe USB Header Functional descriptor was retrieved successfully.
EFI_INVALID_PARAMETERUsbHeaderFunDescriptor is NULL.
EFI_NOT_FOUNDThe USB Header Functional descriptor was not found.

Definition at line 421 of file UsbEcmFunction.c.

◆ GetUsbHeaderFunDescriptor()

EFI_STATUS EFIAPI GetUsbHeaderFunDescriptor ( IN EDKII_USB_ETHERNET_PROTOCOL This,
OUT USB_HEADER_FUN_DESCRIPTOR UsbHeaderFunDescriptor 
)

Retrieves the USB Header functional Descriptor.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[out]UsbHeaderFunDescriptorA pointer to the caller allocated USB Header Functional Descriptor.
Return values
EFI_SUCCESSThe USB Header Functional descriptor was retrieved successfully.
EFI_INVALID_PARAMETERUsbHeaderFunDescriptor is NULL.
EFI_NOT_FOUNDThe USB Header Functional descriptor was not found.

Definition at line 511 of file UsbEcmFunction.c.

◆ GetUsbRndisFunDescriptor()

EFI_STATUS EFIAPI GetUsbRndisFunDescriptor ( IN EDKII_USB_ETHERNET_PROTOCOL This,
OUT USB_ETHERNET_FUN_DESCRIPTOR UsbEthFunDescriptor 
)

Retrieves the USB Ethernet functional Descriptor.

This function get the Mac Address, Ethernet statistics, maximum segment size, number of multicast filters, and number of pattern filters from Ethernet functional Descriptor.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[out]UsbEthFunDescriptorA pointer to the caller allocated USB Ethernet Functional Descriptor.
Return values
EFI_SUCCESSThe USB Ethernet Functional descriptor was retrieved successfully.
EFI_INVALID_PARAMETERUsbEthFunDescriptor is NULL.
EFI_NOT_FOUNDThe USB Ethernet Functional descriptor was not found.

Definition at line 606 of file UsbRndisFunction.c.

◆ GetUsbUnionFunDescriptor()

EFI_STATUS EFIAPI GetUsbUnionFunDescriptor ( IN EDKII_USB_ETHERNET_PROTOCOL This,
OUT USB_UNION_FUN_DESCRIPTOR UsbUnionFunDescriptor 
)

Retrieves the USB Union functional Descriptor.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[out]UsbUnionFunDescriptorA pointer to the caller allocated USB Union Functional Descriptor.
Return values
EFI_SUCCESSThe USB Union Functional descriptor was retrieved successfully.
EFI_INVALID_PARAMETERUsbUnionFunDescriptor is NULL.
EFI_NOT_FOUNDThe USB Union Functional descriptor was not found.

Definition at line 542 of file UsbEcmFunction.c.

◆ InterruptCallback()

EFI_STATUS EFIAPI InterruptCallback ( IN VOID *  Data,
IN UINTN  DataLength,
IN VOID *  Context,
IN UINT32  Status 
)

Async USB transfer callback routine.

Parameters
[in]DataData received or sent via the USB Asynchronous Transfer, if the transfer completed successfully.
[in]DataLengthThe length of Data received or sent via the Asynchronous Transfer, if transfer successfully completes.
[in]ContextData passed from UsbAsyncInterruptTransfer() request.
[in]StatusIndicates the result of the asynchronous transfer.
Return values
EFI_SUCCESSThe asynchronous USB transfer request has been successfully executed.
EFI_DEVICE_ERRORThe asynchronous USB transfer request failed.

Definition at line 327 of file UsbEcmFunction.c.

◆ LoadAllDescriptor()

EFI_STATUS LoadAllDescriptor ( IN EFI_USB_IO_PROTOCOL UsbIo,
OUT EFI_USB_CONFIG_DESCRIPTOR **  ConfigDesc 
)

Load All of device descriptor.

Parameters
[in]UsbIoA pointer to the EFI_USB_IO_PROTOCOL instance.
[out]ConfigDescA pointer to the configuration descriptor.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_OUT_OF_RESOURCESThe request could not be completed because the buffer specified by DescriptorLength and Descriptor is not large enough to hold the result of the request.
EFI_TIMEOUTA timeout occurred executing the request.
EFI_DEVICE_ERRORThe request failed due to a device error. The transfer status is returned in Status.

Definition at line 27 of file UsbEcmFunction.c.

◆ NextDescriptor()

BOOLEAN NextDescriptor ( IN EFI_USB_CONFIG_DESCRIPTOR Desc,
IN OUT UINTN Offset 
)

Returns pointer to the next descriptor for the pack of USB descriptors located in continues memory segment

Parameters
[in]DescA pointer to the CONFIG_DESCRIPTOR instance.
[in,out]OffsetA pointer to the sum of descriptor length.
Return values
TRUEThe request executed successfully.
FALSENo next descriptor.

Definition at line 65 of file UsbEcmFunction.c.

◆ PrintRndisMsg()

VOID PrintRndisMsg ( IN REMOTE_NDIS_MSG_HEADER RndisMsg)

Prints RNDIS Header and Data

Parameters
[in]RndisMsgA pointer to the REMOTE_NDIS_MSG_HEADER data.

Definition at line 1635 of file UsbRndisFunction.c.

◆ RndisControlMsg()

EFI_STATUS RndisControlMsg ( IN USB_RNDIS_DEVICE UsbRndisDevice,
IN REMOTE_NDIS_MSG_HEADER RndisMsg,
OUT REMOTE_NDIS_MSG_HEADER RndisMsgResponse 
)

This function send the RNDIS command through the device's control endpoint

Parameters
[in]UsbRndisDeviceA pointer to the USB_RNDIS_DEVICE instance.
[in]RndisMsgA pointer to the REMOTE_NDIS_MSG_HEADER data.
[out]RndisMsgResponseA pointer to the REMOTE_NDIS_MSG_HEADER data for getting responses.
Return values
EFI_SUCCESSThe bulk transfer has been successfully executed.

Definition at line 1433 of file UsbRndisFunction.c.

◆ RndisDummyReturn()

EFI_STATUS EFIAPI RndisDummyReturn ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This is a dummy function which just returns. Unimplemented EDKII_USB_ETHERNET_PROTOCOL functions point to this function.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1413 of file UsbRndisFunction.c.

◆ RndisUndiGetConfigInfo()

EFI_STATUS EFIAPI RndisUndiGetConfigInfo ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when RndisUndiGetConfigInfo is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1042 of file UsbRndisFunction.c.

◆ RndisUndiGetInitInfo()

EFI_STATUS EFIAPI RndisUndiGetInitInfo ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when UndiGetInitInfo is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1004 of file UsbRndisFunction.c.

◆ RndisUndiGetStatus()

EFI_STATUS EFIAPI RndisUndiGetStatus ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

Update the Media connection.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1218 of file UsbRndisFunction.c.

◆ RndisUndiInitialize()

EFI_STATUS EFIAPI RndisUndiInitialize ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when UndiInitialize is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_UNSUPPORTEDNot supported.

Definition at line 1063 of file UsbRndisFunction.c.

◆ RndisUndiReceive()

EFI_STATUS EFIAPI RndisUndiReceive ( IN PXE_CDB Cdb,
IN EDKII_USB_ETHERNET_PROTOCOL This,
IN OUT VOID *  BulkInData,
IN OUT UINTN DataLength 
)

Receives and removes RNDIS header and returns the raw data.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in,out]BulkInDataA pointer to the buffer of data that will be transmitted to USB device or received from USB device.
[in,out]DataLengthA pointer to the PacketLength.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_BUFFER_TOO_SMALLThe user provided buffer is too small
EFI_NOT_FOUNDNo buffer was found in the list.

Definition at line 1304 of file UsbRndisFunction.c.

◆ RndisUndiReceiveFilter()

EFI_STATUS EFIAPI RndisUndiReceiveFilter ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

Updates Filter settings on the device.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_STATUS

Definition at line 825 of file UsbRndisFunction.c.

◆ RndisUndiReset()

EFI_STATUS EFIAPI RndisUndiReset ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when UndiReset is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_DEVICE_ERRORThe request failed due to a device error.

Definition at line 1130 of file UsbRndisFunction.c.

◆ RndisUndiShutdown()

EFI_STATUS EFIAPI RndisUndiShutdown ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when UndiShutdown is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1177 of file UsbRndisFunction.c.

◆ RndisUndiStart()

EFI_STATUS EFIAPI RndisUndiStart ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when UndiStart is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 949 of file UsbRndisFunction.c.

◆ RndisUndiStop()

EFI_STATUS EFIAPI RndisUndiStop ( IN PXE_CDB Cdb,
IN NIC_DATA Nic 
)

This function is called when Undistop is invoked.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]NicA pointer to the Network interface controller data.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 984 of file UsbRndisFunction.c.

◆ RndisUndiTransmit()

EFI_STATUS EFIAPI RndisUndiTransmit ( IN PXE_CDB Cdb,
IN EDKII_USB_ETHERNET_PROTOCOL This,
IN VOID *  BulkOutData,
IN OUT UINTN DataLength 
)

Transmit the data after appending RNDIS header.

Parameters
[in]CdbA pointer to the command descriptor block.
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in]BulkOutDataA pointer to the buffer of data that will be transmitted to USB device or received from USB device.
[in,out]DataLengthA pointer to the PacketLength.
Return values
EFI_SUCCESSThe request executed successfully.

Definition at line 1241 of file UsbRndisFunction.c.

◆ SetUsbRndisMcastFilter()

EFI_STATUS EFIAPI SetUsbRndisMcastFilter ( IN EDKII_USB_ETHERNET_PROTOCOL This,
IN UINT16  Value,
IN VOID *  McastAddr 
)

This request sets the Ethernet device multicast filters as specified in the sequential list of 48 bit Ethernet multicast addresses.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in]ValueNumber of filters.
[in]McastAddrA pointer to the value of the multicast addresses.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_TIMEOUTA timeout occurred executing the request.
EFI_DEVICE_ERRORThe request failed due to a device error.
EFI_INVALID_PARAMETEROne of the parameters has an invalid value.
EFI_UNSUPPORTEDNot supported.

Definition at line 645 of file UsbRndisFunction.c.

◆ SetUsbRndisPacketFilter()

EFI_STATUS EFIAPI SetUsbRndisPacketFilter ( IN EDKII_USB_ETHERNET_PROTOCOL This,
IN UINT16  Value 
)

This request is used to configure device Ethernet packet filter settings.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in]ValuePacket Filter Bitmap.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_TIMEOUTA timeout occurred executing the request.
EFI_DEVICE_ERRORThe request failed due to a device error.
EFI_INVALID_PARAMETEROne of the parameters has an invalid value.
EFI_UNSUPPORTEDNot supported.

Definition at line 905 of file UsbRndisFunction.c.

◆ SetUsbRndisPowerFilter()

EFI_STATUS EFIAPI SetUsbRndisPowerFilter ( IN EDKII_USB_ETHERNET_PROTOCOL This,
IN UINT16  Value,
IN UINT16  Length,
IN VOID *  PatternFilter 
)

This request sets up the specified Ethernet power management pattern filter as described in the data structure.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in]ValueNumber of filters.
[in]LengthSize of the power management pattern filter data.
[in]PatternFilterA pointer to the power management pattern filter structure.
Return values
EFI_SUCCESSThe request executed successfully.
EFI_TIMEOUTA timeout occurred executing the request.
EFI_DEVICE_ERRORThe request failed due to a device error.
EFI_INVALID_PARAMETEROne of the parameters has an invalid value.
EFI_UNSUPPORTEDNot supported.

Definition at line 703 of file UsbRndisFunction.c.

◆ UsbEthBulkSize()

EFI_STATUS EFIAPI UsbEthBulkSize ( IN EDKII_USB_ETHERNET_PROTOCOL This,
OUT UINTN BulkSize 
)

Retrieves the USB Ethernet Bulk transfer data size.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[out]BulkSizeA pointer to the Bulk transfer data size.
Return values
EFI_SUCCESSThe bulk transfer data size was retrieved successfully.
otherFailed to retrieve the bulk transfer data size.

Definition at line 473 of file UsbRndisFunction.c.

◆ UsbRndisDriverStart()

EFI_STATUS EFIAPI UsbRndisDriverStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

USB RNDIS Driver Binding Start.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver is added to ControllerHandle
EFI_DEVICE_ERRORThis driver could not be started due to a device error
EFI_OUT_OF_RESOURCESThe driver could not install successfully due to a lack of resources.
otherThis driver does not support this device

Definition at line 518 of file UsbRndis.c.

◆ UsbRndisDriverStop()

EFI_STATUS EFIAPI UsbRndisDriverStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

USB Rndis Driver Binding Stop.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to stop driver on
[in]NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
[in]ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 795 of file UsbRndis.c.

◆ UsbRndisDriverSupported()

EFI_STATUS EFIAPI UsbRndisDriverSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

USB Rndis Driver Binding Support.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Definition at line 470 of file UsbRndis.c.

◆ UsbRndisInterrupt()

EFI_STATUS EFIAPI UsbRndisInterrupt ( IN EDKII_USB_ETHERNET_PROTOCOL This,
IN BOOLEAN  IsNewTransfer,
IN UINTN  PollingInterval,
IN EFI_USB_DEVICE_REQUEST Requst 
)

This function is used to manage a USB device with an interrupt transfer pipe.

Parameters
[in]ThisA pointer to the EDKII_USB_ETHERNET_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted to USB controller. If FALSE, the interrupt transfer is deleted from the device's interrupt transfer queue.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.This parameter is required when IsNewTransfer is TRUE. The value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned. The units are in milliseconds.
[in]RequstA pointer to the EFI_USB_DEVICE_REQUEST data.
Return values
EFI_SUCCESSThe asynchronous USB transfer request transfer has been successfully executed.
EFI_DEVICE_ERRORThe asynchronous USB transfer request failed.

Definition at line 280 of file UsbRndisFunction.c.

Variable Documentation

◆ gUsbRndisComponentName2

EFI_COMPONENT_NAME2_PROTOCOL gUsbRndisComponentName2
extern

Definition at line 46 of file ComponentName.c.