INET Framework for OMNeT++/OMNEST
inet::IGMPv3::HostInterfaceData Struct Reference

#include <IGMPv3.h>

Public Member Functions

 HostInterfaceData (IGMPv3 *owner, InterfaceEntry *ie)
 
virtual ~HostInterfaceData ()
 
HostGroupDatagetOrCreateGroupData (IPv4Address group)
 
void deleteGroupData (IPv4Address group)
 

Public Attributes

IGMPv3owner
 
InterfaceEntryie
 
GroupToHostDataMap groups
 
cMessage * generalQueryTimer
 

Constructor & Destructor Documentation

inet::IGMPv3::HostInterfaceData::HostInterfaceData ( IGMPv3 owner,
InterfaceEntry ie 
)
240  : owner(owner), ie(ie)
241 {
242  ASSERT(owner);
243  ASSERT(ie);
244 
245  generalQueryTimer = new cMessage("IGMPv3 Host General Timer", IGMPV3_H_GENERAL_QUERY_TIMER);
246  generalQueryTimer->setContextPointer(this);
247 }
InterfaceEntry * ie
Definition: IGMPv3.h:98
cMessage * generalQueryTimer
Definition: IGMPv3.h:101
IGMPv3 * owner
Definition: IGMPv3.h:97
inet::IGMPv3::HostInterfaceData::~HostInterfaceData ( )
virtual
250 {
251  owner->cancelAndDelete(generalQueryTimer);
252 
253  for (auto & elem : groups)
254  delete elem.second;
255 }
GroupToHostDataMap groups
Definition: IGMPv3.h:100
cMessage * generalQueryTimer
Definition: IGMPv3.h:101
IGMPv3 * owner
Definition: IGMPv3.h:97

Member Function Documentation

void inet::IGMPv3::HostInterfaceData::deleteGroupData ( IPv4Address  group)
271 {
272  auto it = groups.find(group);
273  if (it != groups.end()) {
274  HostGroupData *data = it->second;
275  groups.erase(it);
276  delete data;
277  owner->numHostGroups--;
278  owner->numGroups--;
279  }
280 }
int numHostGroups
Definition: IGMPv3.h:195
int numGroups
Definition: IGMPv3.h:194
GroupToHostDataMap groups
Definition: IGMPv3.h:100
IGMPv3 * owner
Definition: IGMPv3.h:97
IGMPv3::HostGroupData * inet::IGMPv3::HostInterfaceData::getOrCreateGroupData ( IPv4Address  group)

Referenced by inet::IGMPv3::multicastSourceListChanged(), and inet::IGMPv3::processQuery().

258 {
259  auto it = groups.find(group);
260  if (it != groups.end())
261  return it->second;
262 
263  HostGroupData *data = new HostGroupData(this, group);
264  groups[group] = data;
265  owner->numGroups++;
266  owner->numHostGroups++;
267  return data;
268 }
int numHostGroups
Definition: IGMPv3.h:195
int numGroups
Definition: IGMPv3.h:194
GroupToHostDataMap groups
Definition: IGMPv3.h:100
IGMPv3 * owner
Definition: IGMPv3.h:97

Member Data Documentation

cMessage* inet::IGMPv3::HostInterfaceData::generalQueryTimer

The documentation for this struct was generated from the following files: