31#ifndef _RNDIS_DRIVER_H
32#define _RNDIS_DRIVER_H
38#ifndef RNDIS_TX_BUFFER_COUNT
39 #define RNDIS_TX_BUFFER_COUNT 2
40#elif (RNDIS_TX_BUFFER_COUNT < 1)
41 #error RNDIS_TX_BUFFER_COUNT parameter is not valid
45#ifndef RNDIS_TX_BUFFER_SIZE
46 #define RNDIS_TX_BUFFER_SIZE 2048
47#elif (RNDIS_TX_BUFFER_SIZE != 2048)
48 #error RNDIS_TX_BUFFER_SIZE parameter is not valid
52#ifndef RNDIS_RX_BUFFER_COUNT
53 #define RNDIS_RX_BUFFER_COUNT 1
54#elif (RNDIS_RX_BUFFER_COUNT < 1)
55 #error RNDIS_RX_BUFFER_COUNT parameter is not valid
59#ifndef RNDIS_RX_BUFFER_SIZE
60 #define RNDIS_RX_BUFFER_SIZE 2048
61#elif (RNDIS_RX_BUFFER_SIZE != 2048)
62 #error RNDIS_RX_BUFFER_SIZE parameter is not valid
74 uint8_t data[RNDIS_TX_BUFFER_SIZE];
86 uint8_t data[RNDIS_RX_BUFFER_SIZE];
93extern NetInterface *rndisDriverInterface;
100extern uint_t rndisTxWriteIndex;
101extern uint_t rndisTxReadIndex;
102extern uint_t rndisRxWriteIndex;
103extern uint_t rndisRxReadIndex;
106error_t rndisDriverInit(NetInterface *interface);
108void rndisDriverTick(NetInterface *interface);
110void rndisDriverEnableIrq(NetInterface *interface);
111void rndisDriverDisableIrq(NetInterface *interface);
112void rndisDriverEventHandler(NetInterface *interface);
114error_t rndisDriverSendPacket(NetInterface *interface,
115 const NetBuffer *buffer,
size_t offset, NetTxAncillary *ancillary);
117error_t rndisDriverReceivePacket(NetInterface *interface,
118 uint8_t *buffer,
size_t size,
size_t *length);
120error_t rndisDriverSetMulticastFilter(NetInterface *interface);
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
NIC driver.
Definition nic.h:283
RX buffer descriptor.
Definition rndis_driver.h:83
TX buffer descriptor.
Definition rndis_driver.h:71