rndis_driver.c File Reference

RNDIS driver. More...

#include "usbd_def.h"
#include "usbd_rndis.h"
#include "core/net.h"
#include "rndis.h"
#include "rndis_driver.h"
#include "rndis_debug.h"
#include "debug.h"

Go to the source code of this file.




error_t rndisDriverInit (NetInterface *interface)
 RNDIS driver initialization. More...
void rndisDriverTick (NetInterface *interface)
 RNDIS driver timer handler. More...
void rndisDriverEnableIrq (NetInterface *interface)
 Enable interrupts. More...
void rndisDriverDisableIrq (NetInterface *interface)
 Disable interrupts. More...
void rndisDriverEventHandler (NetInterface *interface)
 RNDIS driver event handler. More...
error_t rndisDriverSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet. More...
error_t rndisDriverReceivePacket (NetInterface *interface, uint8_t *buffer, size_t size, size_t *length)
 Receive a packet. More...
error_t rndisDriverSetMulticastFilter (NetInterface *interface)
 Configure multicast MAC address filtering. More...


RndisTxBufferDesc rndisTxBuffer [RNDIS_TX_BUFFER_COUNT]
RndisRxBufferDesc rndisRxBuffer [RNDIS_RX_BUFFER_COUNT]
uint_t rndisTxWriteIndex
uint_t rndisTxReadIndex
uint_t rndisRxWriteIndex
uint_t rndisRxReadIndex
const NicDriver rndisDriver
 RNDIS driver. More...

Detailed Description

RNDIS driver.


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.

Oryx Embedded SARL (www.oryx-embedded.com)

Definition in file rndis_driver.c.

Macro Definition Documentation



Definition at line 20 of file rndis_driver.c.

Function Documentation

◆ rndisDriverDisableIrq()

void rndisDriverDisableIrq ( NetInterface interface)

Disable interrupts.

[in]interfaceUnderlying network interface

Definition at line 139 of file rndis_driver.c.

◆ rndisDriverEnableIrq()

void rndisDriverEnableIrq ( NetInterface interface)

Enable interrupts.

[in]interfaceUnderlying network interface

Definition at line 127 of file rndis_driver.c.

◆ rndisDriverEventHandler()

void rndisDriverEventHandler ( NetInterface interface)

RNDIS driver event handler.

[in]interfaceUnderlying network interface

Definition at line 151 of file rndis_driver.c.

◆ rndisDriverInit()

error_t rndisDriverInit ( NetInterface interface)

RNDIS driver initialization.

[in]interfaceUnderlying network interface
Error code

Definition at line 76 of file rndis_driver.c.

◆ rndisDriverReceivePacket()

error_t rndisDriverReceivePacket ( NetInterface interface,
uint8_t *  buffer,
size_t  size,
size_t *  length 

Receive a packet.

[in]interfaceUnderlying network interface
[out]bufferBuffer where to store the incoming data
[in]sizeMaximum number of bytes that can be received
[out]lengthNumber of bytes that have been received
Error code

Definition at line 310 of file rndis_driver.c.

◆ rndisDriverSendPacket()

error_t rndisDriverSendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset 

Send a packet.

[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
Error code

Definition at line 208 of file rndis_driver.c.

◆ rndisDriverSetMulticastFilter()

error_t rndisDriverSetMulticastFilter ( NetInterface interface)

Configure multicast MAC address filtering.

[in]interfaceUnderlying network interface
Error code

Definition at line 394 of file rndis_driver.c.

◆ rndisDriverTick()

void rndisDriverTick ( NetInterface interface)

RNDIS driver timer handler.

This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state

[in]interfaceUnderlying network interface

Definition at line 116 of file rndis_driver.c.

Variable Documentation

◆ rndisDriver

const NicDriver rndisDriver
Initial value:
void rndisDriverEnableIrq(NetInterface *interface)
Enable interrupts.
Definition: rndis_driver.c:127
error_t rndisDriverSetMulticastFilter(NetInterface *interface)
Configure multicast MAC address filtering.
Definition: rndis_driver.c:394
#define TRUE
Definition: os_port.h:48
error_t rndisDriverSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset)
Send a packet.
Definition: rndis_driver.c:208
error_t rndisDriverInit(NetInterface *interface)
RNDIS driver initialization.
Definition: rndis_driver.c:76
void rndisDriverDisableIrq(NetInterface *interface)
Disable interrupts.
Definition: rndis_driver.c:139
#define ETH_MTU
Definition: ethernet.h:82
Ethernet interface.
Definition: nic.h:69
void rndisDriverTick(NetInterface *interface)
RNDIS driver timer handler.
Definition: rndis_driver.c:116
void rndisDriverEventHandler(NetInterface *interface)
RNDIS driver event handler.
Definition: rndis_driver.c:151

RNDIS driver.

Definition at line 49 of file rndis_driver.c.

◆ rndisDriverInterface

NetInterface* rndisDriverInterface

Definition at line 32 of file rndis_driver.c.

◆ rndisRxBuffer

Definition at line 36 of file rndis_driver.c.

◆ rndisRxReadIndex

uint_t rndisRxReadIndex

Definition at line 42 of file rndis_driver.c.

◆ rndisRxWriteIndex

uint_t rndisRxWriteIndex

Definition at line 41 of file rndis_driver.c.

◆ rndisTxBuffer

Definition at line 35 of file rndis_driver.c.

◆ rndisTxReadIndex

uint_t rndisTxReadIndex

Definition at line 40 of file rndis_driver.c.

◆ rndisTxWriteIndex

uint_t rndisTxWriteIndex

Definition at line 39 of file rndis_driver.c.