rndis.h File Reference

RNDIS (Remote Network Driver Interface Specification) More...

#include "core/net.h"
#include "error.h"

Go to the source code of this file.

Data Structures

struct  RndisMsg
 Generic RNDIS message. More...
 
struct  RndisInitializeMsg
 RNDIS Initialize message. More...
 
struct  RndisHaltMsg
 RNDIS Halt message. More...
 
struct  RndisQueryMsg
 RNDIS Query message. More...
 
struct  RndisSetMsg
 RNDIS Set message. More...
 
struct  RndisResetMsg
 RNDIS Reset message. More...
 
struct  RndisIndicateStatusMsg
 RNDIS Indicate Status message. More...
 
struct  RndisDiagInfo
 Diagnostic information. More...
 
struct  RndisKeepAliveMsg
 RNDIS Keep-Alive message. More...
 
struct  RndisInitializeCmplt
 Response to a RNDIS Initialize message. More...
 
struct  RndisQueryCmplt
 Response to a RNDIS Query message. More...
 
struct  RndisSetCmplt
 Response to a RNDIS Set message. More...
 
struct  RndisResetCmplt
 Response to a RNDIS Reset message. More...
 
struct  RndisKeepAliveCmplt
 Response to a RNDIS Keep-Alive message. More...
 
struct  RndisPacketMsg
 RNDIS Packet message. More...
 
struct  RndisOobDataRecord
 Out-of-band data record. More...
 
struct  RndisPerPacketInfoDataRecord
 Per-packet information data record. More...
 
struct  RndisNotificationMsg
 Device notification message. More...
 
struct  RndisContext
 RNDIS context. More...
 

Macros

#define RNDIS_MAC_ADDR   "02-00-00-12-34-02"
 
#define RNDIS_VENDOR_DESCRIPTION   "Unknown"
 
#define RNDIS_MAJOR_VERSION   1
 
#define RNDIS_MINOR_VERSION   0
 
#define RNDIS_MAX_TRANSFER_SIZE   2048
 
#define RNDIS_PACKET_MSG   0x00000001
 
#define RNDIS_INITIALIZE_MSG   0x00000002
 
#define RNDIS_INITIALIZE_CMPLT   0x80000002
 
#define RNDIS_HALT_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_NOTIFICATION_RESP_AVAILABLE   0x00000001
 
#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_DF_CONNECTIONLESS   0x00000001
 
#define RNDIS_DF_CONNECTION_ORIENTED   0x00000002
 
#define RNDIS_MEDIUM_802_3   0x00000000
 
#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_SUPPORTED_GUIDS   0x00010117
 
#define OID_GEN_NETWORK_LAYER_ADDRESSES   0x00010118
 
#define OID_GEN_TRANSPORT_HEADER_OFFSET   0x00010119
 
#define OID_GEN_MACHINE_NAME   0x0001021A
 
#define OID_GEN_RNDIS_CONFIG_PARAMETER   0x0001021B
 
#define OID_GEN_VLAN_ID   0x0001021C
 
#define OID_GEN_MEDIA_CAPABILITIES   0x00010201
 
#define OID_GEN_PHYSICAL_MEDIUM   0x00010202
 
#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_PERMANENT_ADDRESS   0x01010101
 
#define OID_802_3_CURRENT_ADDRESS   0x01010102
 
#define OID_802_3_MULTICAST_LIST   0x01010103
 
#define OID_802_3_MAXIMUM_LIST_SIZE   0x01010104
 
#define OID_802_3_MAC_OPTIONS   0x01010105
 
#define OID_802_3_RCV_ERROR_ALIGNMENT   0x01020101
 
#define OID_802_3_XMIT_ONE_COLLISION   0x01020102
 
#define OID_802_3_XMIT_MORE_COLLISIONS   0x01020103
 
#define OID_802_3_XMIT_DEFERRED   0x01020201
 
#define OID_802_3_XMIT_MAX_COLLISIONS   0x01020202
 
#define OID_802_3_RCV_OVERRUN   0x01020203
 
#define OID_802_3_XMIT_UNDERRUN   0x01020204
 
#define OID_802_3_XMIT_HEARTBEAT_FAILURE   0x01020205
 
#define OID_802_3_XMIT_TIMES_CRS_LOST   0x01020206
 
#define OID_802_3_XMIT_LATE_COLLISIONS   0x01020207
 
#define RNDIS_HARDWARE_STATUS_READY   0x00000000
 
#define RNDIS_HARDWARE_STATUS_INITIALIZING   0x00000001
 
#define RNDIS_HARDWARE_STATUS_RESET   0x00000002
 
#define RNDIS_HARDWARE_STATUS_CLOSING   0x00000003
 
#define RNDIS_HARDWARE_STATUS_NOT_READY   0x00000004
 
#define RNDIS_MEDIUM_802_3   0x00000000
 
#define RNDIS_MEDIA_STATE_CONNECTED   0x00000000
 
#define RNDIS_MEDIA_STATE_DISCONNECTED   0x00000001
 
#define RNDIS_PACKET_TYPE_DIRECTED   0x00000001
 
#define RNDIS_PACKET_TYPE_MULTICAST   0x00000002
 
#define RNDIS_PACKET_TYPE_ALL_MULTICAST   0x00000004
 
#define RNDIS_PACKET_TYPE_BROADCAST   0x00000008
 
#define RNDIS_PACKET_TYPE_SOURCE_ROUTING   0x00000010
 
#define RNDIS_PACKET_TYPE_PROMISCUOUS   0x00000020
 
#define RNDIS_PACKET_TYPE_SMT   0x00000040
 
#define RNDIS_PACKET_TYPE_ALL_LOCAL   0x00000080
 
#define RNDIS_PACKET_TYPE_GROUP   0x00000100
 
#define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x00000200
 
#define RNDIS_PACKET_TYPE_FUNCTIONAL   0x00000400
 
#define RNDIS_PACKET_TYPE_MAC_FRAME   0x00000800
 

Enumerations

enum  RndisState { RNDIS_STATE_UNINITIALIZED = 0, RNDIS_STATE_BUS_INITIALIZED = 1, RNDIS_STATE_INITIALIZED = 2, RNDIS_STATE_DATA_INITIALIZED = 3 }
 RNDIS states. More...
 

Functions

void rndisInit (void)
 RNDIS core initialization. More...
 
error_t rndisProcessMsg (const RndisMsg *message, size_t length)
 Process incoming RNDIS message. More...
 
error_t rndisProcessInitializeMsg (const RndisInitializeMsg *message, size_t length)
 Process RNDIS Initialize message. More...
 
error_t rndisProcessHaltMsg (const RndisHaltMsg *message, size_t length)
 Process RNDIS Halt message. More...
 
error_t rndisProcessQueryMsg (const RndisQueryMsg *message, size_t length)
 Process RNDIS Query message. More...
 
error_t rndisProcessSetMsg (const RndisSetMsg *message, size_t length)
 Process RNDIS Set message. More...
 
error_t rndisProcessResetMsg (const RndisResetMsg *message, size_t length)
 Process RNDIS Reset message. More...
 
error_t rndisProcessKeepAliveMsg (const RndisKeepAliveMsg *message, size_t length)
 Process RNDIS Keep-Alive message. More...
 
error_t rndisFormatHaltMsg (void)
 Format RNDIS Halt message. More...
 
error_t rndisFormatIndicateStatusMsg (uint32_t status)
 Format RNDIS Indicate Status message. More...
 
error_t rndisFormatInitializeCmplt (uint32_t requestId)
 Format RNDIS Initialize Cmplt message. More...
 
error_t rndisFormatQueryCmplt (uint32_t requestId, uint32_t status, uint32_t length)
 Format RNDIS Query Cmplt message. More...
 
error_t rndisFormatSetCmplt (uint32_t requestId, uint32_t status)
 Format RNDIS Set Cmplt message. More...
 
error_t rndisFormatResetCmplt (void)
 Format RNDIS Reset Cmplt message. More...
 
error_t rndisFormatKeepAliveCmplt (uint32_t requestId)
 Format RNDIS Keep-Alive Cmplt message. More...
 
error_t rndisSendNotification (uint32_t notification)
 Send RNDIS notification message. More...
 
void rndisChangeState (RndisState newState)
 Update RNDIS state. More...
 

Variables

RndisContext rndisContext
 

Detailed Description

RNDIS (Remote Network Driver Interface Specification)

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Pro.

This software is provided under a commercial license. You may use this software under the conditions stated in the license terms. This source code cannot be redistributed.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file rndis.h.

Macro Definition Documentation

◆ OID_802_3_CURRENT_ADDRESS

#define OID_802_3_CURRENT_ADDRESS   0x01010102

Definition at line 135 of file rndis.h.

◆ OID_802_3_MAC_OPTIONS

#define OID_802_3_MAC_OPTIONS   0x01010105

Definition at line 138 of file rndis.h.

◆ OID_802_3_MAXIMUM_LIST_SIZE

#define OID_802_3_MAXIMUM_LIST_SIZE   0x01010104

Definition at line 137 of file rndis.h.

◆ OID_802_3_MULTICAST_LIST

#define OID_802_3_MULTICAST_LIST   0x01010103

Definition at line 136 of file rndis.h.

◆ OID_802_3_PERMANENT_ADDRESS

#define OID_802_3_PERMANENT_ADDRESS   0x01010101

Definition at line 134 of file rndis.h.

◆ OID_802_3_RCV_ERROR_ALIGNMENT

#define OID_802_3_RCV_ERROR_ALIGNMENT   0x01020101

Definition at line 139 of file rndis.h.

◆ OID_802_3_RCV_OVERRUN

#define OID_802_3_RCV_OVERRUN   0x01020203

Definition at line 144 of file rndis.h.

◆ OID_802_3_XMIT_DEFERRED

#define OID_802_3_XMIT_DEFERRED   0x01020201

Definition at line 142 of file rndis.h.

◆ OID_802_3_XMIT_HEARTBEAT_FAILURE

#define OID_802_3_XMIT_HEARTBEAT_FAILURE   0x01020205

Definition at line 146 of file rndis.h.

◆ OID_802_3_XMIT_LATE_COLLISIONS

#define OID_802_3_XMIT_LATE_COLLISIONS   0x01020207

Definition at line 148 of file rndis.h.

◆ OID_802_3_XMIT_MAX_COLLISIONS

#define OID_802_3_XMIT_MAX_COLLISIONS   0x01020202

Definition at line 143 of file rndis.h.

◆ OID_802_3_XMIT_MORE_COLLISIONS

#define OID_802_3_XMIT_MORE_COLLISIONS   0x01020103

Definition at line 141 of file rndis.h.

◆ OID_802_3_XMIT_ONE_COLLISION

#define OID_802_3_XMIT_ONE_COLLISION   0x01020102

Definition at line 140 of file rndis.h.

◆ OID_802_3_XMIT_TIMES_CRS_LOST

#define OID_802_3_XMIT_TIMES_CRS_LOST   0x01020206

Definition at line 147 of file rndis.h.

◆ OID_802_3_XMIT_UNDERRUN

#define OID_802_3_XMIT_UNDERRUN   0x01020204

Definition at line 145 of file rndis.h.

◆ OID_GEN_BROADCAST_BYTES_RCV

#define OID_GEN_BROADCAST_BYTES_RCV   0x0002020B

Definition at line 128 of file rndis.h.

◆ OID_GEN_BROADCAST_BYTES_XMIT

#define OID_GEN_BROADCAST_BYTES_XMIT   0x00020205

Definition at line 122 of file rndis.h.

◆ OID_GEN_BROADCAST_FRAMES_RCV

#define OID_GEN_BROADCAST_FRAMES_RCV   0x0002020C

Definition at line 129 of file rndis.h.

◆ OID_GEN_BROADCAST_FRAMES_XMIT

#define OID_GEN_BROADCAST_FRAMES_XMIT   0x00020206

Definition at line 123 of file rndis.h.

◆ OID_GEN_CURRENT_LOOKAHEAD

#define OID_GEN_CURRENT_LOOKAHEAD   0x0001010F

Definition at line 91 of file rndis.h.

◆ OID_GEN_CURRENT_PACKET_FILTER

#define OID_GEN_CURRENT_PACKET_FILTER   0x0001010E

Definition at line 90 of file rndis.h.

◆ OID_GEN_DIRECTED_BYTES_RCV

#define OID_GEN_DIRECTED_BYTES_RCV   0x00020207

Definition at line 124 of file rndis.h.

◆ OID_GEN_DIRECTED_BYTES_XMIT

#define OID_GEN_DIRECTED_BYTES_XMIT   0x00020201

Definition at line 118 of file rndis.h.

◆ OID_GEN_DIRECTED_FRAMES_RCV

#define OID_GEN_DIRECTED_FRAMES_RCV   0x00020208

Definition at line 125 of file rndis.h.

◆ OID_GEN_DIRECTED_FRAMES_XMIT

#define OID_GEN_DIRECTED_FRAMES_XMIT   0x00020202

Definition at line 119 of file rndis.h.

◆ OID_GEN_DRIVER_VERSION

#define OID_GEN_DRIVER_VERSION   0x00010110

Definition at line 92 of file rndis.h.

◆ OID_GEN_HARDWARE_STATUS

#define OID_GEN_HARDWARE_STATUS   0x00010102

Definition at line 78 of file rndis.h.

◆ OID_GEN_LINK_SPEED

#define OID_GEN_LINK_SPEED   0x00010107

Definition at line 83 of file rndis.h.

◆ OID_GEN_MAC_OPTIONS

#define OID_GEN_MAC_OPTIONS   0x00010113

Definition at line 95 of file rndis.h.

◆ OID_GEN_MACHINE_NAME

#define OID_GEN_MACHINE_NAME   0x0001021A

Definition at line 102 of file rndis.h.

◆ OID_GEN_MAXIMUM_FRAME_SIZE

#define OID_GEN_MAXIMUM_FRAME_SIZE   0x00010106

Definition at line 82 of file rndis.h.

◆ OID_GEN_MAXIMUM_LOOKAHEAD

#define OID_GEN_MAXIMUM_LOOKAHEAD   0x00010105

Definition at line 81 of file rndis.h.

◆ OID_GEN_MAXIMUM_SEND_PACKETS

#define OID_GEN_MAXIMUM_SEND_PACKETS   0x00010115

Definition at line 97 of file rndis.h.

◆ OID_GEN_MAXIMUM_TOTAL_SIZE

#define OID_GEN_MAXIMUM_TOTAL_SIZE   0x00010111

Definition at line 93 of file rndis.h.

◆ OID_GEN_MEDIA_CAPABILITIES

#define OID_GEN_MEDIA_CAPABILITIES   0x00010201

Definition at line 107 of file rndis.h.

◆ OID_GEN_MEDIA_CONNECT_STATUS

#define OID_GEN_MEDIA_CONNECT_STATUS   0x00010114

Definition at line 96 of file rndis.h.

◆ OID_GEN_MEDIA_IN_USE

#define OID_GEN_MEDIA_IN_USE   0x00010104

Definition at line 80 of file rndis.h.

◆ OID_GEN_MEDIA_SUPPORTED

#define OID_GEN_MEDIA_SUPPORTED   0x00010103

Definition at line 79 of file rndis.h.

◆ OID_GEN_MULTICAST_BYTES_RCV

#define OID_GEN_MULTICAST_BYTES_RCV   0x00020209

Definition at line 126 of file rndis.h.

◆ OID_GEN_MULTICAST_BYTES_XMIT

#define OID_GEN_MULTICAST_BYTES_XMIT   0x00020203

Definition at line 120 of file rndis.h.

◆ OID_GEN_MULTICAST_FRAMES_RCV

#define OID_GEN_MULTICAST_FRAMES_RCV   0x0002020A

Definition at line 127 of file rndis.h.

◆ OID_GEN_MULTICAST_FRAMES_XMIT

#define OID_GEN_MULTICAST_FRAMES_XMIT   0x00020204

Definition at line 121 of file rndis.h.

◆ OID_GEN_NETWORK_LAYER_ADDRESSES

#define OID_GEN_NETWORK_LAYER_ADDRESSES   0x00010118

Definition at line 100 of file rndis.h.

◆ OID_GEN_PHYSICAL_MEDIUM

#define OID_GEN_PHYSICAL_MEDIUM   0x00010202

Definition at line 108 of file rndis.h.

◆ OID_GEN_PROTOCOL_OPTIONS

#define OID_GEN_PROTOCOL_OPTIONS   0x00010112

Definition at line 94 of file rndis.h.

◆ OID_GEN_RCV_CRC_ERROR

#define OID_GEN_RCV_CRC_ERROR   0x0002020D

Definition at line 130 of file rndis.h.

◆ OID_GEN_RCV_ERROR

#define OID_GEN_RCV_ERROR   0x00020104

Definition at line 114 of file rndis.h.

◆ OID_GEN_RCV_NO_BUFFER

#define OID_GEN_RCV_NO_BUFFER   0x00020105

Definition at line 115 of file rndis.h.

◆ OID_GEN_RCV_OK

#define OID_GEN_RCV_OK   0x00020102

Definition at line 112 of file rndis.h.

◆ OID_GEN_RECEIVE_BLOCK_SIZE

#define OID_GEN_RECEIVE_BLOCK_SIZE   0x0001010B

Definition at line 87 of file rndis.h.

◆ OID_GEN_RECEIVE_BUFFER_SPACE

#define OID_GEN_RECEIVE_BUFFER_SPACE   0x00010109

Definition at line 85 of file rndis.h.

◆ OID_GEN_RNDIS_CONFIG_PARAMETER

#define OID_GEN_RNDIS_CONFIG_PARAMETER   0x0001021B

Definition at line 103 of file rndis.h.

◆ OID_GEN_SUPPORTED_GUIDS

#define OID_GEN_SUPPORTED_GUIDS   0x00010117

Definition at line 99 of file rndis.h.

◆ OID_GEN_SUPPORTED_LIST

#define OID_GEN_SUPPORTED_LIST   0x00010101

Definition at line 77 of file rndis.h.

◆ OID_GEN_TRANSMIT_BLOCK_SIZE

#define OID_GEN_TRANSMIT_BLOCK_SIZE   0x0001010A

Definition at line 86 of file rndis.h.

◆ OID_GEN_TRANSMIT_BUFFER_SPACE

#define OID_GEN_TRANSMIT_BUFFER_SPACE   0x00010108

Definition at line 84 of file rndis.h.

◆ OID_GEN_TRANSMIT_QUEUE_LENGTH

#define OID_GEN_TRANSMIT_QUEUE_LENGTH   0x0002020E

Definition at line 131 of file rndis.h.

◆ OID_GEN_TRANSPORT_HEADER_OFFSET

#define OID_GEN_TRANSPORT_HEADER_OFFSET   0x00010119

Definition at line 101 of file rndis.h.

◆ OID_GEN_VENDOR_DESCRIPTION

#define OID_GEN_VENDOR_DESCRIPTION   0x0001010D

Definition at line 89 of file rndis.h.

◆ OID_GEN_VENDOR_DRIVER_VERSION

#define OID_GEN_VENDOR_DRIVER_VERSION   0x00010116

Definition at line 98 of file rndis.h.

◆ OID_GEN_VENDOR_ID

#define OID_GEN_VENDOR_ID   0x0001010C

Definition at line 88 of file rndis.h.

◆ OID_GEN_VLAN_ID

#define OID_GEN_VLAN_ID   0x0001021C

Definition at line 104 of file rndis.h.

◆ OID_GEN_XMIT_ERROR

#define OID_GEN_XMIT_ERROR   0x00020103

Definition at line 113 of file rndis.h.

◆ OID_GEN_XMIT_OK

#define OID_GEN_XMIT_OK   0x00020101

Definition at line 111 of file rndis.h.

◆ RNDIS_DF_CONNECTION_ORIENTED

#define RNDIS_DF_CONNECTION_ORIENTED   0x00000002

Definition at line 71 of file rndis.h.

◆ RNDIS_DF_CONNECTIONLESS

#define RNDIS_DF_CONNECTIONLESS   0x00000001

Definition at line 70 of file rndis.h.

◆ RNDIS_HALT_MSG

#define RNDIS_HALT_MSG   0x00000003

Definition at line 47 of file rndis.h.

◆ RNDIS_HARDWARE_STATUS_CLOSING

#define RNDIS_HARDWARE_STATUS_CLOSING   0x00000003

Definition at line 154 of file rndis.h.

◆ RNDIS_HARDWARE_STATUS_INITIALIZING

#define RNDIS_HARDWARE_STATUS_INITIALIZING   0x00000001

Definition at line 152 of file rndis.h.

◆ RNDIS_HARDWARE_STATUS_NOT_READY

#define RNDIS_HARDWARE_STATUS_NOT_READY   0x00000004

Definition at line 155 of file rndis.h.

◆ RNDIS_HARDWARE_STATUS_READY

#define RNDIS_HARDWARE_STATUS_READY   0x00000000

Definition at line 151 of file rndis.h.

◆ RNDIS_HARDWARE_STATUS_RESET

#define RNDIS_HARDWARE_STATUS_RESET   0x00000002

Definition at line 153 of file rndis.h.

◆ RNDIS_INDICATE_STATUS_MSG

#define RNDIS_INDICATE_STATUS_MSG   0x00000007

Definition at line 54 of file rndis.h.

◆ RNDIS_INITIALIZE_CMPLT

#define RNDIS_INITIALIZE_CMPLT   0x80000002

Definition at line 46 of file rndis.h.

◆ RNDIS_INITIALIZE_MSG

#define RNDIS_INITIALIZE_MSG   0x00000002

Definition at line 45 of file rndis.h.

◆ RNDIS_KEEPALIVE_CMPLT

#define RNDIS_KEEPALIVE_CMPLT   0x80000008

Definition at line 56 of file rndis.h.

◆ RNDIS_KEEPALIVE_MSG

#define RNDIS_KEEPALIVE_MSG   0x00000008

Definition at line 55 of file rndis.h.

◆ RNDIS_MAC_ADDR

#define RNDIS_MAC_ADDR   "02-00-00-12-34-02"

Definition at line 28 of file rndis.h.

◆ RNDIS_MAJOR_VERSION

#define RNDIS_MAJOR_VERSION   1

Definition at line 37 of file rndis.h.

◆ RNDIS_MAX_TRANSFER_SIZE

#define RNDIS_MAX_TRANSFER_SIZE   2048

Definition at line 41 of file rndis.h.

◆ RNDIS_MEDIA_STATE_CONNECTED

#define RNDIS_MEDIA_STATE_CONNECTED   0x00000000

Definition at line 161 of file rndis.h.

◆ RNDIS_MEDIA_STATE_DISCONNECTED

#define RNDIS_MEDIA_STATE_DISCONNECTED   0x00000001

Definition at line 162 of file rndis.h.

◆ RNDIS_MEDIUM_802_3 [1/2]

#define RNDIS_MEDIUM_802_3   0x00000000

Definition at line 158 of file rndis.h.

◆ RNDIS_MEDIUM_802_3 [2/2]

#define RNDIS_MEDIUM_802_3   0x00000000

Definition at line 158 of file rndis.h.

◆ RNDIS_MINOR_VERSION

#define RNDIS_MINOR_VERSION   0

Definition at line 38 of file rndis.h.

◆ RNDIS_NOTIFICATION_RESP_AVAILABLE

#define RNDIS_NOTIFICATION_RESP_AVAILABLE   0x00000001

Definition at line 59 of file rndis.h.

◆ RNDIS_PACKET_MSG

#define RNDIS_PACKET_MSG   0x00000001

Definition at line 44 of file rndis.h.

◆ RNDIS_PACKET_TYPE_ALL_FUNCTIONAL

#define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL   0x00000200

Definition at line 174 of file rndis.h.

◆ RNDIS_PACKET_TYPE_ALL_LOCAL

#define RNDIS_PACKET_TYPE_ALL_LOCAL   0x00000080

Definition at line 172 of file rndis.h.

◆ RNDIS_PACKET_TYPE_ALL_MULTICAST

#define RNDIS_PACKET_TYPE_ALL_MULTICAST   0x00000004

Definition at line 167 of file rndis.h.

◆ RNDIS_PACKET_TYPE_BROADCAST

#define RNDIS_PACKET_TYPE_BROADCAST   0x00000008

Definition at line 168 of file rndis.h.

◆ RNDIS_PACKET_TYPE_DIRECTED

#define RNDIS_PACKET_TYPE_DIRECTED   0x00000001

Definition at line 165 of file rndis.h.

◆ RNDIS_PACKET_TYPE_FUNCTIONAL

#define RNDIS_PACKET_TYPE_FUNCTIONAL   0x00000400

Definition at line 175 of file rndis.h.

◆ RNDIS_PACKET_TYPE_GROUP

#define RNDIS_PACKET_TYPE_GROUP   0x00000100

Definition at line 173 of file rndis.h.

◆ RNDIS_PACKET_TYPE_MAC_FRAME

#define RNDIS_PACKET_TYPE_MAC_FRAME   0x00000800

Definition at line 176 of file rndis.h.

◆ RNDIS_PACKET_TYPE_MULTICAST

#define RNDIS_PACKET_TYPE_MULTICAST   0x00000002

Definition at line 166 of file rndis.h.

◆ RNDIS_PACKET_TYPE_PROMISCUOUS

#define RNDIS_PACKET_TYPE_PROMISCUOUS   0x00000020

Definition at line 170 of file rndis.h.

◆ RNDIS_PACKET_TYPE_SMT

#define RNDIS_PACKET_TYPE_SMT   0x00000040

Definition at line 171 of file rndis.h.

◆ RNDIS_PACKET_TYPE_SOURCE_ROUTING

#define RNDIS_PACKET_TYPE_SOURCE_ROUTING   0x00000010

Definition at line 169 of file rndis.h.

◆ RNDIS_QUERY_CMPLT

#define RNDIS_QUERY_CMPLT   0x80000004

Definition at line 49 of file rndis.h.

◆ RNDIS_QUERY_MSG

#define RNDIS_QUERY_MSG   0x00000004

Definition at line 48 of file rndis.h.

◆ RNDIS_RESET_CMPLT

#define RNDIS_RESET_CMPLT   0x80000006

Definition at line 53 of file rndis.h.

◆ RNDIS_RESET_MSG

#define RNDIS_RESET_MSG   0x00000006

Definition at line 52 of file rndis.h.

◆ RNDIS_SET_CMPLT

#define RNDIS_SET_CMPLT   0x80000005

Definition at line 51 of file rndis.h.

◆ RNDIS_SET_MSG

#define RNDIS_SET_MSG   0x00000005

Definition at line 50 of file rndis.h.

◆ RNDIS_STATUS_FAILURE

#define RNDIS_STATUS_FAILURE   0xC0000001

Definition at line 63 of file rndis.h.

◆ RNDIS_STATUS_INVALID_DATA

#define RNDIS_STATUS_INVALID_DATA   0xC0010015

Definition at line 64 of file rndis.h.

◆ RNDIS_STATUS_MEDIA_CONNECT

#define RNDIS_STATUS_MEDIA_CONNECT   0x4001000B

Definition at line 66 of file rndis.h.

◆ RNDIS_STATUS_MEDIA_DISCONNECT

#define RNDIS_STATUS_MEDIA_DISCONNECT   0x4001000C

Definition at line 67 of file rndis.h.

◆ RNDIS_STATUS_NOT_SUPPORTED

#define RNDIS_STATUS_NOT_SUPPORTED   0xC00000BB

Definition at line 65 of file rndis.h.

◆ RNDIS_STATUS_SUCCESS

#define RNDIS_STATUS_SUCCESS   0x00000000

Definition at line 62 of file rndis.h.

◆ RNDIS_VENDOR_DESCRIPTION

#define RNDIS_VENDOR_DESCRIPTION   "Unknown"

Definition at line 33 of file rndis.h.

Enumeration Type Documentation

◆ RndisState

enum RndisState

RNDIS states.

Enumerator
RNDIS_STATE_UNINITIALIZED 
RNDIS_STATE_BUS_INITIALIZED 
RNDIS_STATE_INITIALIZED 
RNDIS_STATE_DATA_INITIALIZED 

Definition at line 183 of file rndis.h.

Function Documentation

◆ rndisChangeState()

void rndisChangeState ( RndisState  newState)

Update RNDIS state.

Parameters
[in]newStateNew RNDIS state to switch to

Definition at line 699 of file rndis.c.

◆ rndisFormatHaltMsg()

error_t rndisFormatHaltMsg ( void  )

Format RNDIS Halt message.

Returns
Error code

Definition at line 461 of file rndis.c.

◆ rndisFormatIndicateStatusMsg()

error_t rndisFormatIndicateStatusMsg ( uint32_t  status)

Format RNDIS Indicate Status message.

Parameters
[in]statusRNDIS status code
Returns
Error code

Definition at line 487 of file rndis.c.

◆ rndisFormatInitializeCmplt()

error_t rndisFormatInitializeCmplt ( uint32_t  requestId)

Format RNDIS Initialize Cmplt message.

Parameters
[in]requestIdRequest identifier
Returns
Error code

Definition at line 515 of file rndis.c.

◆ rndisFormatKeepAliveCmplt()

error_t rndisFormatKeepAliveCmplt ( uint32_t  requestId)

Format RNDIS Keep-Alive Cmplt message.

Parameters
[in]requestIdRequest identifier
Returns
Error code

Definition at line 645 of file rndis.c.

◆ rndisFormatQueryCmplt()

error_t rndisFormatQueryCmplt ( uint32_t  requestId,
uint32_t  status,
uint32_t  length 
)

Format RNDIS Query Cmplt message.

Parameters
[in]requestIdRequest identifier
[in]statusRNDIS status code
[in]lengthLength of the response data, in bytes
Returns
Error code

Definition at line 556 of file rndis.c.

◆ rndisFormatResetCmplt()

error_t rndisFormatResetCmplt ( void  )

Format RNDIS Reset Cmplt message.

Returns
Error code

Definition at line 615 of file rndis.c.

◆ rndisFormatSetCmplt()

error_t rndisFormatSetCmplt ( uint32_t  requestId,
uint32_t  status 
)

Format RNDIS Set Cmplt message.

Parameters
[in]requestIdRequest identifier
[in]statusRNDIS status code
Returns
Error code

Definition at line 586 of file rndis.c.

◆ rndisInit()

void rndisInit ( void  )

RNDIS core initialization.

Definition at line 77 of file rndis.c.

◆ rndisProcessHaltMsg()

error_t rndisProcessHaltMsg ( const RndisHaltMsg message,
size_t  length 
)

Process RNDIS Halt message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 184 of file rndis.c.

◆ rndisProcessInitializeMsg()

error_t rndisProcessInitializeMsg ( const RndisInitializeMsg message,
size_t  length 
)

Process RNDIS Initialize message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 157 of file rndis.c.

◆ rndisProcessKeepAliveMsg()

error_t rndisProcessKeepAliveMsg ( const RndisKeepAliveMsg message,
size_t  length 
)

Process RNDIS Keep-Alive message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 436 of file rndis.c.

◆ rndisProcessMsg()

error_t rndisProcessMsg ( const RndisMsg message,
size_t  length 
)

Process incoming RNDIS message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 99 of file rndis.c.

◆ rndisProcessQueryMsg()

error_t rndisProcessQueryMsg ( const RndisQueryMsg message,
size_t  length 
)

Process RNDIS Query message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 208 of file rndis.c.

◆ rndisProcessResetMsg()

error_t rndisProcessResetMsg ( const RndisResetMsg message,
size_t  length 
)

Process RNDIS Reset message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 406 of file rndis.c.

◆ rndisProcessSetMsg()

error_t rndisProcessSetMsg ( const RndisSetMsg message,
size_t  length 
)

Process RNDIS Set message.

Parameters
[in]messagePointer to the RNDIS message
[in]lengthLength of the RNDIS message, in bytes
Returns
Error code

Definition at line 357 of file rndis.c.

◆ rndisSendNotification()

error_t rndisSendNotification ( uint32_t  notification)

Send RNDIS notification message.

Parameters
[in]notificationDevice notification
Returns
Error code

Definition at line 672 of file rndis.c.

Variable Documentation

◆ rndisContext

RndisContext rndisContext

Definition at line 42 of file rndis.c.