use of org.batfish.representation.cisco.OspfNetwork in project batfish by batfish.
the class CiscoControlPlaneExtractor method enterRoa_interface.
@Override
public void enterRoa_interface(Roa_interfaceContext ctx) {
String ifaceName = ctx.iname.getText();
String canonicalIfaceName = getCanonicalInterfaceName(ifaceName);
Interface iface = _configuration.getInterfaces().get(canonicalIfaceName);
if (iface == null) {
_w.redFlag("OSPF: Interface: '" + ifaceName + "' not declared before OSPF process");
iface = addInterface(canonicalIfaceName, ctx.iname, false);
}
// whatever
for (InterfaceAddress address : iface.getAllAddresses()) {
Prefix prefix = address.getPrefix();
OspfNetwork network = new OspfNetwork(prefix, _currentOspfArea);
_currentOspfProcess.getNetworks().add(network);
}
_currentOspfInterface = iface.getName();
}
Aggregations