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

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)
 
 CIPV4Filter (IBDA_NetworkProvider *pNetworkProvider)
 
virtual ~CIPV4Filter ()
 
- 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 ipv4.cpp.

Constructor & Destructor Documentation

◆ CIPV4Filter()

CIPV4Filter::CIPV4Filter ( IBDA_NetworkProvider pNetworkProvider)

Definition at line 36 of file ipv4.cpp.

37  : m_pNetworkProvider(pNetworkProvider),
38  m_ulcbAddresses(0),
39  m_pAddressList(0),
40  m_ulModeMask(0)
41 {
42 }
IBDA_NetworkProvider * m_pNetworkProvider
Definition: ipv4.cpp:30
ULONG m_ulcbAddresses
Definition: ipv4.cpp:31
ULONG m_ulModeMask
Definition: ipv4.cpp:33
BYTE * m_pAddressList
Definition: ipv4.cpp:32

◆ ~CIPV4Filter()

CIPV4Filter::~CIPV4Filter ( )
virtual

Definition at line 44 of file ipv4.cpp.

45 {
46  if (m_pAddressList)
48 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
BYTE * m_pAddressList
Definition: ipv4.cpp:32

Member Function Documentation

◆ GetMulticastList()

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

Implements IBDA_IPV4Filter.

Definition at line 117 of file ipv4.cpp.

120 {
121  if (!pulcbAddresses || !pAddressList)
122  return E_POINTER;
123 
124  if (*pulcbAddresses < m_ulcbAddresses)
125  return E_OUTOFMEMORY;
126 
127  CopyMemory(pAddressList, m_pAddressList, m_ulcbAddresses);
128  *pulcbAddresses = m_ulcbAddresses;
129  return NOERROR;
130 }
#define NOERROR
Definition: winerror.h:2354
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONG m_ulcbAddresses
Definition: ipv4.cpp:31
#define CopyMemory
Definition: winbase.h:1646
BYTE * m_pAddressList
Definition: ipv4.cpp:32
#define E_POINTER
Definition: winerror.h:2365

◆ GetMulticastListSize()

HRESULT STDMETHODCALLTYPE CIPV4Filter::GetMulticastListSize ( ULONG pulcbAddresses)

Implements IBDA_IPV4Filter.

Definition at line 84 of file ipv4.cpp.

86 {
87  if (!pulcbAddresses)
88  return E_POINTER;
89 
90  *pulcbAddresses = 0;
91  return NOERROR;
92 }
#define NOERROR
Definition: winerror.h:2354
#define E_POINTER
Definition: winerror.h:2365

◆ GetMulticastMode()

HRESULT STDMETHODCALLTYPE CIPV4Filter::GetMulticastMode ( ULONG pulModeMask)

Implements IBDA_IPV4Filter.

Definition at line 143 of file ipv4.cpp.

145 {
146  *pulModeMask = m_ulModeMask;
147  return NOERROR;
148 }
#define NOERROR
Definition: winerror.h:2354
ULONG m_ulModeMask
Definition: ipv4.cpp:33

◆ PutMulticastList()

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

Implements IBDA_IPV4Filter.

Definition at line 96 of file ipv4.cpp.

99 {
100  if (!ulcbAddresses || !pAddressList)
101  return E_POINTER;
102 
103  if (m_pAddressList)
105 
106  m_pAddressList = (BYTE*)CoTaskMemAlloc(ulcbAddresses);
107  if (!m_pAddressList)
108  return E_OUTOFMEMORY;
109 
110  CopyMemory(m_pAddressList, pAddressList, ulcbAddresses);
111  m_ulcbAddresses = ulcbAddresses;
112  return NOERROR;
113 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define NOERROR
Definition: winerror.h:2354
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONG m_ulcbAddresses
Definition: ipv4.cpp:31
#define CopyMemory
Definition: winbase.h:1646
BYTE * m_pAddressList
Definition: ipv4.cpp:32
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 CIPV4Filter::PutMulticastMode ( ULONG  ulModeMask)

Implements IBDA_IPV4Filter.

Definition at line 134 of file ipv4.cpp.

136 {
137  m_ulModeMask = ulModeMask;
138  return NOERROR;
139 }
#define NOERROR
Definition: winerror.h:2354
ULONG m_ulModeMask
Definition: ipv4.cpp:33

◆ QueryInterface()

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

Definition at line 53 of file ipv4.cpp.

56 {
58  return m_pNetworkProvider->QueryInterface(InterfaceId, Interface);
59 }
#define assert(x)
Definition: debug.h:53
IBDA_NetworkProvider * m_pNetworkProvider
Definition: ipv4.cpp:30
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]

CIPV4Filter::STDMETHODIMP_ ( ULONG  )

◆ STDMETHODIMP_() [2/2]

CIPV4Filter::STDMETHODIMP_ ( ULONG  )

Member Data Documentation

◆ m_pAddressList

BYTE* CIPV4Filter::m_pAddressList
protected

Definition at line 32 of file ipv4.cpp.

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

◆ m_pNetworkProvider

IBDA_NetworkProvider* CIPV4Filter::m_pNetworkProvider
protected

Definition at line 30 of file ipv4.cpp.

Referenced by QueryInterface().

◆ m_ulcbAddresses

ULONG CIPV4Filter::m_ulcbAddresses
protected

Definition at line 31 of file ipv4.cpp.

Referenced by GetMulticastList(), and PutMulticastList().

◆ m_ulModeMask

ULONG CIPV4Filter::m_ulModeMask
protected

Definition at line 33 of file ipv4.cpp.

Referenced by GetMulticastMode(), and PutMulticastMode().


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