Codota Logo
AbstractRoute.getNextHopIp
Code IndexAdd Codota to your IDE (free)

How to use
getNextHopIp
method
in
org.batfish.datamodel.AbstractRoute

Best Java code snippets using org.batfish.datamodel.AbstractRoute.getNextHopIp (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: batfish/batfish

 @Override
 protected Ip featureValueOf(AbstractRoute actual) {
  return actual.getNextHopIp();
 }
}
origin: batfish/batfish

@Override
public String toString() {
 return this.getClass().getSimpleName()
   + "<"
   + _network
   + ",nhip:"
   + getNextHopIp()
   + ",nhint:"
   + getNextHopInterface()
   + ">";
}
origin: batfish/batfish

@Override
public Ip evaluate(Environment env) {
 return env.getOriginalRoute().getNextHopIp();
}
origin: batfish/batfish

private Multimap<Ip, AbstractRoute> getResolvedNextHopWithRoutes(
  String nextHopInterfaceName,
  Map<AbstractRoute, Map<String, Map<Ip, Set<AbstractRoute>>>> nextHopInterfacesByRoute) {
 ImmutableMultimap.Builder<Ip, AbstractRoute> resolvedNextHopWithRoutesBuilder =
   new ImmutableMultimap.Builder<>();
 // Loop over all matching routes that use nextHopInterfaceName as one of the next hop
 // interfaces.
 for (Entry<AbstractRoute, Map<String, Map<Ip, Set<AbstractRoute>>>> e :
   nextHopInterfacesByRoute.entrySet()) {
  // finalNextHops: final resolved next hop IP -> interface routes
  Map<Ip, Set<AbstractRoute>> finalNextHops = e.getValue().get(nextHopInterfaceName);
  if (finalNextHops == null || finalNextHops.isEmpty()) {
   continue;
  }
  AbstractRoute matchingRoute = e.getKey();
  Ip nextHopIp = matchingRoute.getNextHopIp();
  if (nextHopIp.equals(Route.UNSET_ROUTE_NEXT_HOP_IP)) {
   resolvedNextHopWithRoutesBuilder.put(nextHopIp, matchingRoute);
  } else {
   for (Ip resolvedNextHopIp : finalNextHops.keySet()) {
    resolvedNextHopWithRoutesBuilder.put(resolvedNextHopIp, matchingRoute);
   }
  }
 }
 return resolvedNextHopWithRoutesBuilder.build();
}
origin: batfish/batfish

private Map<String, Map<String, Map<String, Set<AbstractRoute>>>>
  computeRoutesWithUnownedNextHopIpArpFalse() {
 return computeRoutesWithNextHopIpArpFalseFilter(
   route -> !_ipSpaceToBDD.toBDD(route.getNextHopIp()).and(_unownedIpsBDD).isZero());
}
origin: batfish/batfish

private Map<String, Map<String, Map<String, Set<AbstractRoute>>>>
  computeRoutesWithOwnedNextHopIpArpFalse() {
 return computeRoutesWithNextHopIpArpFalseFilter(
   route -> _ipSpaceToBDD.toBDD(route.getNextHopIp()).and(_unownedIpsBDD).isZero());
}
origin: batfish/batfish

if (!Route.UNSET_NEXT_HOP_INTERFACE.equals(nextHopInterface)) {
 Ip finalNextHopIp =
   route.getNextHopIp().equals(Route.UNSET_ROUTE_NEXT_HOP_IP)
     ? mostRecentNextHopIp
     : route.getNextHopIp();
 Map<Ip, Set<AbstractRoute>> nextHopInterfaceRoutesByFinalNextHopIp =
   nextHopInterfaces.computeIfAbsent(nextHopInterface, k -> new HashMap<>());
 nextHopInterfaceRoutes.add(route);
} else {
 Ip nextHopIp = route.getNextHopIp();
 if (!nextHopIp.equals(Route.UNSET_ROUTE_NEXT_HOP_IP)) {
  Set<AbstractRoute> nextHopLongestPrefixMatchRoutes =
origin: batfish/batfish

if (accept) {
 if (!generatedRoute.getDiscard()) {
  grb.setNextHopIp(contributingCandidate.getNextHopIp());
origin: batfish/batfish

.computeIfAbsent(
  new RouteRowSecondaryKey(
    route.getNextHopIp(),
    route.getProtocol().protocolName()),
  k -> new TreeSet<>())
  RouteRowAttribute.builder()
    .setNextHop(
      computeNextHopNode(route.getNextHopIp(), ipOwners))
    .setAdminDistance(route.getAdministrativeCost())
    .setMetric(route.getMetric())
origin: batfish/batfish

ImmutableMap.of(
  i1,
  ImmutableMap.of(r1.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
ifaceRoute,
ImmutableMap.of(
origin: batfish/batfish

            ImmutableMap.of(
              i1,
              ImmutableMap.of(r1.getNextHopIp(), ImmutableSet.of(ifaceRoute)))))
        .build()));
_someoneReplies = ImmutableMap.of(c1, ImmutableMap.of(i1, P2.getEndIp().toIpSpace()));
origin: batfish/batfish

/**
 * Converts a {@link AbstractRoute} to a {@link Row}
 *
 * @param hostName {@link String} host-name of the node containing the route
 * @param vrfName {@link String} name of the VRF containing the route
 * @param abstractRoute {@link AbstractRoute} to convert
 * @param columnMetadataMap Column metadata of the columns for this {@link Row} c
 * @return {@link Row} representing the {@link AbstractRoute}
 */
private static Row abstractRouteToRow(
  String hostName,
  String vrfName,
  AbstractRoute abstractRoute,
  Map<String, ColumnMetadata> columnMetadataMap,
  @Nullable Map<Ip, Set<String>> ipOwners) {
 return Row.builder(columnMetadataMap)
   .put(COL_NODE, new Node(hostName))
   .put(COL_VRF_NAME, vrfName)
   .put(COL_NETWORK, abstractRoute.getNetwork())
   .put(COL_NEXT_HOP_IP, abstractRoute.getNextHopIp())
   .put(COL_NEXT_HOP, computeNextHopNode(abstractRoute.getNextHopIp(), ipOwners))
   .put(COL_PROTOCOL, abstractRoute.getProtocol())
   .put(
     COL_TAG, abstractRoute.getTag() == AbstractRoute.NO_TAG ? null : abstractRoute.getTag())
   .put(COL_ADMIN_DISTANCE, abstractRoute.getAdministrativeCost())
   .put(COL_METRIC, abstractRoute.getMetric())
   .build();
}
origin: batfish/batfish

            ImmutableMap.of(
              i1,
              ImmutableMap.of(r1.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
            r2,
            ImmutableMap.of(
              i1,
              ImmutableMap.of(r2.getNextHopIp(), ImmutableSet.of(ifaceRoute)))))
        .build()));
_someoneReplies = ImmutableMap.of(c1, ImmutableMap.of(i1, P2.getEndIp().toIpSpace()));
origin: batfish/batfish

  outInterface,
  ImmutableMap.of(
    nextHopIpRoute1.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
nextHopIpRoute2,
ImmutableMap.of(
  outInterface,
  ImmutableMap.of(
    nextHopIpRoute2.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
ifaceRoute,
ImmutableMap.of(
origin: batfish/batfish

  outInterface,
  ImmutableMap.of(
    nextHopIpRoute1.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
nextHopIpRoute2,
ImmutableMap.of(
  outInterface,
  ImmutableMap.of(
    nextHopIpRoute2.getNextHopIp(), ImmutableSet.of(ifaceRoute))),
ifaceRoute,
ImmutableMap.of(
origin: batfish/batfish

_dataPlane.getRibs().get(currentNodeName).get(vrfName).longestPrefixMatch(dstIp).stream()
  .sorted()
  .map(rc -> new RouteInfo(rc.getProtocol(), rc.getNetwork(), rc.getNextHopIp()))
  .distinct()
  .collect(ImmutableList.toImmutableList());
Ip nextHopIp = routeCandidate.getNextHopIp();
if (nextHopIp.equals(Route.UNSET_ROUTE_NEXT_HOP_IP)) {
 resolvedNextHopWithRoutes.put(nextHopIp, routeCandidate);
origin: batfish/batfish

 localPreference = BgpRoute.DEFAULT_LOCAL_PREFERENCE;
} else {
 nextHopIp = route.getNextHopIp();
 BgpRoute remoteIbgpRoute = (BgpRoute) route;
 localPreference = remoteIbgpRoute.getLocalPreference();
org.batfish.datamodelAbstractRoutegetNextHopIp

Javadoc

Next hop IP for this route. If not known, Route#UNSET_ROUTE_NEXT_HOP_IP must be returned.

Popular methods of AbstractRoute

  • getMetric
  • getNetwork
    IPV4 network of this route
  • getProtocol
  • getNextHopInterface
    Name of the next-hop interface for this route. If not known, Route#UNSET_NEXT_HOP_INTERFACE must be
  • getNonForwarding
    Returns true if this route is non-forwarding, i.e., it can be installed in the main RIB but not the
  • getTag
    Return the route's tag or #NO_TAG if no tag is present
  • getAdministrativeCost
  • getNonRouting
    Check if this route is "non-routing", i.e., should not be installed in the main RIB.
  • toBuilder
    Return a AbstractRouteBuilder pre-populated with the values for this route.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • addToBackStack (FragmentTransaction)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now