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.
Macros | |
#define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
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, NetTxAncillary *ancillary) |
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... | |
Detailed Description
RNDIS driver.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file rndis_driver.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL NIC_TRACE_LEVEL |
Definition at line 32 of file rndis_driver.c.
Function Documentation
◆ rndisDriverDisableIrq()
void rndisDriverDisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 151 of file rndis_driver.c.
◆ rndisDriverEnableIrq()
void rndisDriverEnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 139 of file rndis_driver.c.
◆ rndisDriverEventHandler()
void rndisDriverEventHandler | ( | NetInterface * | interface | ) |
RNDIS driver event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 163 of file rndis_driver.c.
◆ rndisDriverInit()
error_t rndisDriverInit | ( | NetInterface * | interface | ) |
RNDIS driver initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 88 of file rndis_driver.c.
◆ rndisDriverReceivePacket()
error_t rndisDriverReceivePacket | ( | NetInterface * | interface, |
uint8_t * | buffer, | ||
size_t | size, | ||
size_t * | length | ||
) |
Receive a packet.
- Parameters
-
[in] interface Underlying network interface [out] buffer Buffer where to store the incoming data [in] size Maximum number of bytes that can be received [out] length Number of bytes that have been received
- Returns
- Error code
Definition at line 329 of file rndis_driver.c.
◆ rndisDriverSendPacket()
error_t rndisDriverSendPacket | ( | NetInterface * | interface, |
const NetBuffer * | buffer, | ||
size_t | offset, | ||
NetTxAncillary * | ancillary | ||
) |
Send a packet.
- Parameters
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Definition at line 227 of file rndis_driver.c.
◆ rndisDriverSetMulticastFilter()
error_t rndisDriverSetMulticastFilter | ( | NetInterface * | interface | ) |
Configure multicast MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 413 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
- Parameters
-
[in] interface Underlying network interface
Definition at line 128 of file rndis_driver.c.
Variable Documentation
◆ rndisDriver
const NicDriver rndisDriver |
RNDIS driver.
Definition at line 61 of file rndis_driver.c.
◆ rndisDriverInterface
NetInterface* rndisDriverInterface |
Definition at line 44 of file rndis_driver.c.
◆ rndisRxBuffer
RndisRxBufferDesc rndisRxBuffer[RNDIS_RX_BUFFER_COUNT] |
Definition at line 48 of file rndis_driver.c.
◆ rndisRxReadIndex
uint_t rndisRxReadIndex |
Definition at line 54 of file rndis_driver.c.
◆ rndisRxWriteIndex
uint_t rndisRxWriteIndex |
Definition at line 53 of file rndis_driver.c.
◆ rndisTxBuffer
RndisTxBufferDesc rndisTxBuffer[RNDIS_TX_BUFFER_COUNT] |
Definition at line 47 of file rndis_driver.c.
◆ rndisTxReadIndex
uint_t rndisTxReadIndex |
Definition at line 52 of file rndis_driver.c.
◆ rndisTxWriteIndex
uint_t rndisTxWriteIndex |
Definition at line 51 of file rndis_driver.c.