bool add_interface(Interface interface) { if (interface.validate()) { _interfaces.push_back(interface); _sub.notify(dynamic_cast<Module*>(&interface), Subscriber::Interface, Event::ADD); return true; } return false; }
InterfaceMap::Interfaces InterfaceMap::getInterfacesInVlanIf(VlanID vlan) const { Interfaces interfaces; for (auto itr = begin(); itr != end(); ++itr) { if ((*itr)->getVlanID() == vlan) { interfaces.push_back(*itr); } } return interfaces; }