ReactOS 0.4.15-dev-7931-gfd331f1
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 ()
 
HRESULT GetMulticastListSize ([in, out] ULONG *pulcbAddresses)
 
HRESULT PutMulticastList ([in] ULONG ulcbAddresses, [in] BYTE *pAddressList)
 
HRESULT GetMulticastList ([in, out] ULONG *pulcbAddresses, [out] BYTE *pAddressList)
 
HRESULT PutMulticastMode ([in] ULONG ulModeMask)
 
HRESULT GetMulticastMode ([out] ULONG *pulModeMask)
 
- 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),
42{
43}
IBDA_NetworkProvider * m_pNetworkProvider

◆ ~CEthernetFilter()

CEthernetFilter::~CEthernetFilter ( )
virtual

Definition at line 45 of file ethernetfilter.cpp.

46{
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
115 *pulcbAddresses = m_ulcbAddresses;
116 return NOERROR;
117}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CopyMemory
Definition: winbase.h:1710
#define NOERROR
Definition: winerror.h:2354
#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}

◆ 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}

◆ 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
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}
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
unsigned char BYTE
Definition: xxhash.c:193

◆ 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}

◆ 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}
#define assert(x)
Definition: debug.h:53
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465

◆ 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: