NetBurner 3.5.8
PDF Version
Toggle main menu visibility
ueue/src/ncm_interface.h
1
10
11
#ifndef __NCM_INTERFACE_H
12
#define __NCM_INTERFACE_H
13
14
#ifdef SOMRT1061
15
#include <nettypes.h>
16
#include <netinterface.h>
17
18
// Forward declarations
19
class
dCDC_NCM
;
20
29
class
NcmInterfaceBlock
:
public
EtherLikeInterface
30
{
31
private
:
32
dCDC_NCM *pNcmDevice;
33
bool
linkActive;
34
int
speedMbps;
35
36
public
:
42
NcmInterfaceBlock
(
const
char
*name,
dCDC_NCM
*pDevice);
43
48
void
LinkToDevice
();
49
54
virtual
void
send_func
(PoolPtr poolPtr)
override
;
55
61
virtual
void
EnableMulticast
(
MACADR
macAddress, BOOL addAddress)
override
;
62
67
virtual
bool
LinkActive
()
override
;
68
73
virtual
int
LinkSpeed
()
override
;
74
79
void
SetLinkSpeed
(
int
speed);
80
85
virtual
bool
LinkDuplex
()
override
;
86
91
void
SetMACAddress
(
const
MACADR
&mac);
92
97
virtual
bool
bNeedsArp
()
override
;
98
103
dCDC_NCM
*
GetNcmDevice
() {
return
pNcmDevice; }
104
};
105
106
/*******************************************************************************
107
* Interface Registration Functions
108
******************************************************************************/
109
115
NcmInterfaceBlock
*RegisterNcmInterface1(
const
MACADR
&mac);
116
122
NcmInterfaceBlock
*RegisterNcmInterface2(
const
MACADR
&mac);
123
128
NcmInterfaceBlock
*GetNcmInterface1();
129
134
NcmInterfaceBlock
*GetNcmInterface2();
135
140
int
StartNcmTask();
141
145
void
StopNcmTask();
146
158
NcmInterfaceBlock
*InitializeNcmWithNetwork(
int
usbPort,
const
MACADR
&mac);
159
160
#endif
/* SOMRT1061 */
161
#endif
/* __NCM_INTERFACE_H */
MACADR
Used to store and manipulate MAC addresses.
Definition
nettypes.h:69
NcmInterfaceBlock
Network interface block for NCM USB device.
Definition
src/ncm_interface.h:30
NcmInterfaceBlock::send_func
virtual void send_func(PoolPtr poolPtr) override
Send function - called by network stack to transmit.
NcmInterfaceBlock::LinkToDevice
void LinkToDevice()
Register interface and link to NCM device Called after RegisterInterface() to update the device with ...
NcmInterfaceBlock::LinkSpeed
virtual int LinkSpeed() override
Returns link speed in Mbps.
NcmInterfaceBlock::EnableMulticast
virtual void EnableMulticast(MACADR macAddress, BOOL addAddress) override
Enable or disable multicast address reception.
NcmInterfaceBlock::SetLinkSpeed
void SetLinkSpeed(int speed)
Set the link speed.
NcmInterfaceBlock::bNeedsArp
virtual bool bNeedsArp() override
Check if this interface needs ARP.
NcmInterfaceBlock::LinkActive
virtual bool LinkActive() override
Returns current link status.
NcmInterfaceBlock::NcmInterfaceBlock
NcmInterfaceBlock(const char *name, dCDC_NCM *pDevice)
Constructor.
NcmInterfaceBlock::SetMACAddress
void SetMACAddress(const MACADR &mac)
Set the MAC address for this interface.
NcmInterfaceBlock::LinkDuplex
virtual bool LinkDuplex() override
Returns duplex mode.
NcmInterfaceBlock::GetNcmDevice
dCDC_NCM * GetNcmDevice()
Get the associated NCM device.
Definition
ueue/src/ncm_interface.h:103
dCDC_NCM
USB CDC NCM Device Class for Ethernet-over-USB.
Definition
src/usbd_cdc_ncm.h:63
examples
PlatformSpecific
SOMRT1061
USB
USB_NCM_NetworkInterfaceQueue
src
ncm_interface.h
Generated by
1.18.0