ReactOS 0.4.16-dev-320-g3bd9ddc
sendrcv.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DC_COALESCE_BUFFER
 
struct  _DC_TCB
 
struct  _DC_RCB
 

Macros

#define DC_LIST_ENTRY_FROM_PACKET(Packet)    ((PLIST_ENTRY)(&(Packet)->MiniportReservedEx[0]))
 
#define DC_PACKET_FROM_LIST_ENTRY(ListEntry)    (CONTAINING_RECORD(ListEntry, NDIS_PACKET, MiniportReservedEx))
 
#define DC_RCB_FROM_PACKET(Packet)    ((PDC_RCB*)&(Packet)->MiniportReservedEx[0])
 
#define DC_RBD_FROM_PACKET(Packet)    ((PDC_RBD*)&(Packet)->MiniportReservedEx[sizeof(PVOID)])
 
#define DC_RCB_FLAG_RECLAIM   0x80000000
 

Typedefs

typedef struct _DC_COALESCE_BUFFER DC_COALESCE_BUFFER
 
typedef struct _DC_COALESCE_BUFFERPDC_COALESCE_BUFFER
 
typedef struct _DC_TCB DC_TCB
 
typedef struct _DC_TCBPDC_TCB
 
typedef struct _DC_RCB DC_RCB
 
typedef struct _DC_RCBPDC_RCB
 

Functions

FORCEINLINE VOID DC_RELEASE_TCB (_In_ PDC21X4_ADAPTER Adapter, _In_ PDC_TCB Tcb)
 
FORCEINLINE PDC_TCB DC_NEXT_TCB (_In_ PDC21X4_ADAPTER Adapter, _In_ PDC_TCB Tcb)
 
FORCEINLINE PDC_TBD DC_NEXT_TBD (_In_ PDC21X4_ADAPTER Adapter, _In_ PDC_TBD Tbd)
 
FORCEINLINE PDC_RBD DC_NEXT_RBD (_In_ PDC21X4_ADAPTER Adapter, _In_ PDC_RBD Rbd)
 
FORCEINLINE PDC_RCBDC_GET_RCB_SLOT (_In_ PDC21X4_ADAPTER Adapter, _In_ PDC_RBD Rbd)
 

Macro Definition Documentation

◆ DC_LIST_ENTRY_FROM_PACKET

#define DC_LIST_ENTRY_FROM_PACKET (   Packet)     ((PLIST_ENTRY)(&(Packet)->MiniportReservedEx[0]))

Definition at line 10 of file sendrcv.h.

◆ DC_PACKET_FROM_LIST_ENTRY

#define DC_PACKET_FROM_LIST_ENTRY (   ListEntry)     (CONTAINING_RECORD(ListEntry, NDIS_PACKET, MiniportReservedEx))

Definition at line 13 of file sendrcv.h.

◆ DC_RBD_FROM_PACKET

#define DC_RBD_FROM_PACKET (   Packet)     ((PDC_RBD*)&(Packet)->MiniportReservedEx[sizeof(PVOID)])

Definition at line 19 of file sendrcv.h.

◆ DC_RCB_FLAG_RECLAIM

#define DC_RCB_FLAG_RECLAIM   0x80000000

Definition at line 46 of file sendrcv.h.

◆ DC_RCB_FROM_PACKET

#define DC_RCB_FROM_PACKET (   Packet)     ((PDC_RCB*)&(Packet)->MiniportReservedEx[0])

Definition at line 16 of file sendrcv.h.

Typedef Documentation

◆ DC_COALESCE_BUFFER

◆ DC_RCB

◆ DC_TCB

◆ PDC_COALESCE_BUFFER

◆ PDC_RCB

typedef struct _DC_RCB * PDC_RCB

◆ PDC_TCB

typedef struct _DC_TCB * PDC_TCB

Function Documentation

◆ DC_GET_RCB_SLOT()

FORCEINLINE PDC_RCB * DC_GET_RCB_SLOT ( _In_ PDC21X4_ADAPTER  Adapter,
_In_ PDC_RBD  Rbd 
)

Definition at line 110 of file sendrcv.h.

113{
114 return Adapter->RcbArray + (((ULONG_PTR)(Rbd - Adapter->HeadRbd)));
115}
#define ULONG_PTR
Definition: config.h:101

Referenced by DcCreateRxRing(), and DcHandleRxReceivedFrames().

◆ DC_NEXT_RBD()

FORCEINLINE PDC_RBD DC_NEXT_RBD ( _In_ PDC21X4_ADAPTER  Adapter,
_In_ PDC_RBD  Rbd 
)

Definition at line 98 of file sendrcv.h.

101{
102 if (Rbd++ == Adapter->TailRbd)
103 return Adapter->HeadRbd;
104 else
105 return Rbd;
106}

Referenced by DcHandleRxReceivedFrames().

◆ DC_NEXT_TBD()

FORCEINLINE PDC_TBD DC_NEXT_TBD ( _In_ PDC21X4_ADAPTER  Adapter,
_In_ PDC_TBD  Tbd 
)

Definition at line 86 of file sendrcv.h.

89{
90 if (Tbd++ == Adapter->TailTbd)
91 return Adapter->HeadTbd;
92 else
93 return Tbd;
94}

Referenced by DcSetupFrameDownload(), DcTestPacket(), and DcTransmitPacket().

◆ DC_NEXT_TCB()

FORCEINLINE PDC_TCB DC_NEXT_TCB ( _In_ PDC21X4_ADAPTER  Adapter,
_In_ PDC_TCB  Tcb 
)

Definition at line 74 of file sendrcv.h.

77{
78 if (Tcb++ == Adapter->TailTcb)
79 return Adapter->HeadTcb;
80 else
81 return Tcb;
82}

Referenced by DcFlushTransmitQueue(), DcHandleTxCompletedFrames(), DcSendPacket(), DcSetupFrameDownload(), and DcTestPacket().

◆ DC_RELEASE_TCB()

FORCEINLINE VOID DC_RELEASE_TCB ( _In_ PDC21X4_ADAPTER  Adapter,
_In_ PDC_TCB  Tcb 
)

Definition at line 58 of file sendrcv.h.

61{
62 if (Tcb->Buffer)
63 {
64 PushEntryList(&Adapter->SendBufferList, &Tcb->Buffer->ListEntry);
65 }
66
67 ++Adapter->TcbSlots;
68
69 Adapter->TbdSlots += Tcb->SlotsUsed;
70}
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:256

Referenced by DcFlushTransmitQueue(), and DcHandleTxCompletedFrames().