ReactOS  0.4.15-dev-494-g1d8c567
CEthernetFilter Class Reference
Inheritance diagram for CEthernetFilter:
Collaboration diagram for CEthernetFilter:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE GetMulticastListSize (ULONG *pulcbAddresses)
 
HRESULT STDMETHODCALLTYPE PutMulticastList (ULONG ulcbAddresses, BYTE *pAddressList)
 
HRESULT STDMETHODCALLTYPE GetMulticastList (ULONG *pulcbAddresses, BYTE *pAddressList)
 
HRESULT STDMETHODCALLTYPE PutMulticastMode (ULONG ulModeMask)
 
HRESULT STDMETHODCALLTYPE GetMulticastMode (ULONG *pulModeMask)
 
 CEthernetFilter (IBDA_NetworkProvider *pNetworkProvider)
 
virtual ~CEthernetFilter ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

IBDA_NetworkProviderm_pNetworkProvider
 
ULONG m_ulcbAddresses
 
BYTEm_pAddressList
 
ULONG m_ulModeMask
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 11 of file ethernetfilter.cpp.

Constructor & Destructor Documentation

◆ CEthernetFilter()

CEthernetFilter::CEthernetFilter ( IBDA_NetworkProvider pNetworkProvider)

Definition at line 37 of file ethernetfilter.cpp.

38  : m_pNetworkProvider(pNetworkProvider),
39  m_ulcbAddresses(0),
40  m_pAddressList(0),
41  m_ulModeMask(0)
42 {
43 }
IBDA_NetworkProvider * m_pNetworkProvider

◆ ~CEthernetFilter()

CEthernetFilter::~CEthernetFilter ( )
virtual

Definition at line 45 of file ethernetfilter.cpp.

46 {
47  if (m_pAddressList)
49 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442

Member Function Documentation

◆ GetMulticastList()

HRESULT STDMETHODCALLTYPE CEthernetFilter::GetMulticastList ( ULONG pulcbAddresses,
BYTE pAddressList 
)

Implements IBDA_EthernetFilter.

Definition at line 104 of file ethernetfilter.cpp.

107 {
108  if (!pulcbAddresses || !pAddressList)
109  return E_POINTER;
110 
111  if (*pulcbAddresses < m_ulcbAddresses)
112  return E_OUTOFMEMORY;
113 
114  CopyMemory(pAddressList, m_pAddressList, m_ulcbAddresses);
115  *pulcbAddresses = m_ulcbAddresses;
116  return NOERROR;
117 }
#define NOERROR
Definition: winerror.h:2354
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CopyMemory
Definition: winbase.h:1646
#define E_POINTER
Definition: winerror.h:2365

◆ GetMulticastListSize()

HRESULT STDMETHODCALLTYPE CEthernetFilter::GetMulticastListSize ( ULONG pulcbAddresses)

Implements IBDA_EthernetFilter.

Definition at line 121 of file ethernetfilter.cpp.

123 {
124  if (!pulcbAddresses)
125  return E_POINTER;
126 
127  *pulcbAddresses = m_ulcbAddresses;
128  return NOERROR;
129 }
#define NOERROR
Definition: winerror.h:2354
#define E_POINTER
Definition: winerror.h:2365

◆ GetMulticastMode()

HRESULT STDMETHODCALLTYPE CEthernetFilter::GetMulticastMode ( ULONG pulModeMask)

Implements IBDA_EthernetFilter.

Definition at line 142 of file ethernetfilter.cpp.

144 {
145  *pulModeMask = m_ulModeMask;
146  return NOERROR;
147 }
#define NOERROR
Definition: winerror.h:2354

◆ PutMulticastList()

HRESULT STDMETHODCALLTYPE CEthernetFilter::PutMulticastList ( ULONG  ulcbAddresses,
BYTE pAddressList 
)

Implements IBDA_EthernetFilter.

Definition at line 83 of file ethernetfilter.cpp.

86 {
87  if (!ulcbAddresses || !pAddressList)
88  return E_POINTER;
89 
90  if (m_pAddressList)
92 
93  m_pAddressList = (BYTE*)CoTaskMemAlloc(ulcbAddresses);
94  if (!m_pAddressList)
95  return E_OUTOFMEMORY;
96 
97  CopyMemory(m_pAddressList, pAddressList, ulcbAddresses);
98  m_ulcbAddresses = ulcbAddresses;
99  return NOERROR;
100 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define NOERROR
Definition: winerror.h:2354
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CopyMemory
Definition: winbase.h:1646
unsigned char BYTE
Definition: xxhash.c:193
#define E_POINTER
Definition: winerror.h:2365
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426

◆ PutMulticastMode()

HRESULT STDMETHODCALLTYPE CEthernetFilter::PutMulticastMode ( ULONG  ulModeMask)

Implements IBDA_EthernetFilter.

Definition at line 133 of file ethernetfilter.cpp.

135 {
136  m_ulModeMask = ulModeMask;
137  return NOERROR;
138 }
#define NOERROR
Definition: winerror.h:2354

◆ QueryInterface()

HRESULT STDMETHODCALLTYPE CEthernetFilter::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 53 of file ethernetfilter.cpp.

56 {
58  return m_pNetworkProvider->QueryInterface(InterfaceId, Interface);
59 }
IBDA_NetworkProvider * m_pNetworkProvider
#define assert(x)
Definition: debug.h:53
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ STDMETHODIMP_() [1/2]

CEthernetFilter::STDMETHODIMP_ ( ULONG  )

◆ STDMETHODIMP_() [2/2]

CEthernetFilter::STDMETHODIMP_ ( ULONG  )

Member Data Documentation

◆ m_pAddressList

BYTE* CEthernetFilter::m_pAddressList
protected

Definition at line 33 of file ethernetfilter.cpp.

Referenced by GetMulticastList(), PutMulticastList(), and ~CEthernetFilter().

◆ m_pNetworkProvider

IBDA_NetworkProvider* CEthernetFilter::m_pNetworkProvider
protected

Definition at line 31 of file ethernetfilter.cpp.

Referenced by QueryInterface().

◆ m_ulcbAddresses

ULONG CEthernetFilter::m_ulcbAddresses
protected

Definition at line 32 of file ethernetfilter.cpp.

Referenced by GetMulticastList(), GetMulticastListSize(), and PutMulticastList().

◆ m_ulModeMask

ULONG CEthernetFilter::m_ulModeMask
protected

Definition at line 34 of file ethernetfilter.cpp.

Referenced by GetMulticastMode(), and PutMulticastMode().


The documentation for this class was generated from the following file: