Exemple #1
0
 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;
 }
Exemple #2
0
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;
}