Search in sources :

Example 1 with TracerouteEngine

use of org.batfish.common.plugin.TracerouteEngine in project batfish by batfish.

the class BgpTopologyUtils method addActivePeerEdges.

private static void addActivePeerEdges(BgpPeerConfigId neighborId, MutableValueGraph<BgpPeerConfigId, BgpSessionProperties> graph, NetworkConfigurations nc, Map<Ip, Map<String, Set<String>>> ipOwners, Map<String, Multimap<String, BgpPeerConfigId>> receivers, Set<Ip> potentialLocalIps, boolean checkReachability, TracerouteEngine tracerouteEngine) {
    BgpActivePeerConfig neighbor = nc.getBgpPointToPointPeerConfig(neighborId);
    if (neighbor == null || potentialLocalIps.isEmpty() || neighbor.getLocalAs() == null || neighbor.getPeerAddress() == null || neighbor.getRemoteAsns().isEmpty()) {
        return;
    }
    // Find nodes that own the neighbor's peer address
    Map<String, Set<String>> possibleVrfs = ipOwners.get(neighbor.getPeerAddress());
    if (possibleVrfs == null) {
        return;
    }
    Set<BgpPeerConfigId> alreadyEstablished = graph.adjacentNodes(neighborId);
    for (Entry<String, Set<String>> entry : possibleVrfs.entrySet()) {
        String node = entry.getKey();
        Set<String> vrfs = entry.getValue();
        Multimap<String, BgpPeerConfigId> receiversByVrf = receivers.get(node);
        if (receiversByVrf == null) {
            continue;
        }
        for (String vrf : vrfs) {
            receiversByVrf.get(vrf).stream().filter(candidateId -> !alreadyEstablished.contains(candidateId)).forEach(candidateId -> {
                // Ensure candidate has compatible local/remote AS, isn't in same vrf as initiator
                BgpPeerConfig candidate = nc.getBgpPeerConfig(candidateId);
                if (!bgpCandidatePassesSanityChecks(neighborId, neighbor, candidateId, candidate)) {
                    return;
                }
                // Check if neighbor has any feasible local IPs compatible with this candidate
                Set<Ip> feasibleLocalIpsForPeeringWithCandidate = getFeasibleLocalIps(potentialLocalIps, candidate);
                if (feasibleLocalIpsForPeeringWithCandidate.isEmpty()) {
                    return;
                }
                if (!checkReachability) {
                    feasibleLocalIpsForPeeringWithCandidate.forEach(ip -> addEdges(neighbor, neighborId, ip, candidateId, graph, nc));
                } else {
                    initiateBgpSessions(neighborId, candidateId, neighbor, feasibleLocalIpsForPeeringWithCandidate, tracerouteEngine).stream().filter(BgpSessionInitiationResult::isSuccessful).map(initiationResult -> initiationResult.getFlow().getSrcIp()).forEach(srcIp -> addEdges(neighbor, neighborId, srcIp, candidateId, graph, nc));
                }
            });
        }
    }
}
Also used : BgpPeerConfigType(org.batfish.datamodel.BgpPeerConfigId.BgpPeerConfigType) IpProtocol(org.batfish.datamodel.IpProtocol) Hop(org.batfish.datamodel.flow.Hop) FibForward(org.batfish.datamodel.FibForward) FibNextVrf(org.batfish.datamodel.FibNextVrf) Trace(org.batfish.datamodel.flow.Trace) Interface(org.batfish.datamodel.Interface) ValueGraphBuilder(com.google.common.graph.ValueGraphBuilder) Flow(org.batfish.datamodel.Flow) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) NetworkConfigurations(org.batfish.datamodel.NetworkConfigurations) Map(java.util.Map) Network(com.google.common.graph.Network) NamedPort(org.batfish.datamodel.NamedPort) Vrf(org.batfish.datamodel.Vrf) IpOwners(org.batfish.common.topology.IpOwners) ImmutableSetMultimap(com.google.common.collect.ImmutableSetMultimap) LinkedListMultimap(com.google.common.collect.LinkedListMultimap) ImmutableSet(com.google.common.collect.ImmutableSet) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) ImmutableMap(com.google.common.collect.ImmutableMap) FlowDisposition(org.batfish.datamodel.FlowDisposition) FibActionVisitor(org.batfish.datamodel.visitors.FibActionVisitor) Set(java.util.Set) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) Objects(java.util.Objects) List(java.util.List) BgpPassivePeerConfig(org.batfish.datamodel.BgpPassivePeerConfig) L3Adjacencies(org.batfish.common.topology.L3Adjacencies) Entry(java.util.Map.Entry) Ip(org.batfish.datamodel.Ip) LongSpace(org.batfish.datamodel.LongSpace) NodeInterfacePair(org.batfish.datamodel.collections.NodeInterfacePair) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) HashMap(java.util.HashMap) BgpProcess(org.batfish.datamodel.BgpProcess) Multimap(com.google.common.collect.Multimap) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId) ImmutableList(com.google.common.collect.ImmutableList) Configuration(org.batfish.datamodel.Configuration) FibNullRoute(org.batfish.datamodel.FibNullRoute) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ConcreteInterfaceAddress(org.batfish.datamodel.ConcreteInterfaceAddress) Fib(org.batfish.datamodel.Fib) MoreObjects(com.google.common.base.MoreObjects) SetMultimap(com.google.common.collect.SetMultimap) SessionType(org.batfish.datamodel.BgpSessionProperties.SessionType) MutableValueGraph(com.google.common.graph.MutableValueGraph) BgpSessionProperties(org.batfish.datamodel.BgpSessionProperties) VisibleForTesting(com.google.common.annotations.VisibleForTesting) FibEntry(org.batfish.datamodel.FibEntry) BgpUnnumberedPeerConfig(org.batfish.datamodel.BgpUnnumberedPeerConfig) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) Ip(org.batfish.datamodel.Ip) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId)

Example 2 with TracerouteEngine

use of org.batfish.common.plugin.TracerouteEngine in project batfish by batfish.

the class BgpTopologyUtils method initBgpTopology.

/**
 * Compute the BGP topology -- a network of {@link BgpPeerConfigId}s connected by {@link
 * BgpSessionProperties}.
 *
 * @param configurations node configurations, keyed by hostname
 * @param ipVrfOwners network Ip owners (see {@link IpOwners#computeIpNodeOwners(Map, boolean)}
 *     for reference)
 * @param keepInvalid whether to keep improperly configured neighbors. If performing configuration
 *     checks, you probably want this set to {@code true}, otherwise (e.g., computing dataplane)
 *     you want this to be {@code false}.
 * @param checkReachability whether to perform dataplane-level checks to ensure that neighbors are
 *     reachable and sessions can be established correctly. <b>Note:</b> this is different from
 *     {@code keepInvalid=false}, which only does filters invalid neighbors at the control-plane
 *     level
 * @param tracerouteEngine an instance of {@link TracerouteEngine} for doing reachability checks.
 * @param l3Adjacencies {@link L3Adjacencies} of the network, for checking BGP unnumbered
 *     reachability.
 * @return A graph ({@link Network}) representing all BGP peerings.
 */
@Nonnull
public static BgpTopology initBgpTopology(Map<String, Configuration> configurations, Map<Ip, Map<String, Set<String>>> ipVrfOwners, boolean keepInvalid, boolean checkReachability, @Nullable TracerouteEngine tracerouteEngine, Map<String, Map<String, Fib>> fibs, L3Adjacencies l3Adjacencies) {
    checkArgument(!checkReachability || !keepInvalid, "Cannot check reachability while keeping invalid peers");
    checkArgument(!checkReachability || tracerouteEngine != null, "Cannot check reachability without a traceroute engine");
    // TODO: handle duplicate ips on different vrfs
    NetworkConfigurations networkConfigurations = NetworkConfigurations.of(configurations);
    /*
     * First pass: identify all addresses "owned" by BgpNeighbors, add neighbor ids as vertices to
     * the graph; dynamically determine local IPs as needed
     */
    MutableValueGraph<BgpPeerConfigId, BgpSessionProperties> graph = ValueGraphBuilder.directed().allowsSelfLoops(false).build();
    /*
     * Multimap of active peers' BgpPeerConfigIds to all IPs that each peer may use as local IP
     * when initiating a session. For a peer with an explicitly configured local IP, that IP is
     * the only value associated with the peer in this map. Otherwise:
     * - If FIBs are provided, the map contains all local IPs with which the peer may initiate,
     *   as inferred by getPotentialSrcIps().
     * - Else no IPs are associated with the peer.
     */
    ImmutableSetMultimap.Builder<BgpPeerConfigId, Ip> localIpsBuilder = ImmutableSetMultimap.builder();
    for (Configuration node : configurations.values()) {
        String hostname = node.getHostname();
        for (Vrf vrf : node.getVrfs().values()) {
            String vrfName = vrf.getName();
            BgpProcess proc = vrf.getBgpProcess();
            if (proc == null) {
                // nothing to do if no bgp process on this VRF
                continue;
            }
            Fib fib = fibs.getOrDefault(hostname, ImmutableMap.of()).get(vrfName);
            for (Entry<Ip, BgpActivePeerConfig> e : proc.getActiveNeighbors().entrySet()) {
                Ip peerAddress = e.getKey();
                BgpActivePeerConfig config = e.getValue();
                if (!keepInvalid && !bgpConfigPassesSanityChecks(config, hostname, vrfName, ipVrfOwners)) {
                    continue;
                }
                BgpPeerConfigId neighborId = new BgpPeerConfigId(hostname, vrfName, peerAddress.toPrefix(), false);
                graph.addNode(neighborId);
                if (config.getLocalIp() != null) {
                    localIpsBuilder.put(neighborId, config.getLocalIp());
                } else if (fib != null) {
                    // No explicitly configured local IP. Check for dynamically resolvable local IPs.
                    localIpsBuilder.putAll(neighborId, getPotentialSrcIps(peerAddress, fib, node));
                }
            }
            // Dynamic peers: map of prefix to BgpPassivePeerConfig
            proc.getPassiveNeighbors().entrySet().stream().filter(entry -> keepInvalid || bgpConfigPassesSanityChecks(entry.getValue(), hostname, vrfName, ipVrfOwners)).forEach(entry -> graph.addNode(new BgpPeerConfigId(hostname, vrfName, entry.getKey(), true)));
            // Unnumbered BGP peers: map of interface name to BgpUnnumberedPeerConfig
            proc.getInterfaceNeighbors().entrySet().stream().filter(e -> keepInvalid || bgpConfigPassesSanityChecks(e.getValue(), hostname, vrfName, ipVrfOwners)).forEach(e -> graph.addNode(new BgpPeerConfigId(hostname, vrf.getName(), e.getKey())));
        }
    }
    // Second pass: add edges to the graph. Note, these are directed edges.
    Map<String, Multimap<String, BgpPeerConfigId>> receivers = new HashMap<>();
    for (BgpPeerConfigId peer : graph.nodes()) {
        if (peer.getType() == BgpPeerConfigType.UNNUMBERED) {
            // Unnumbered configs only form sessions with each other
            continue;
        }
        Multimap<String, BgpPeerConfigId> vrf = receivers.computeIfAbsent(peer.getHostname(), name -> LinkedListMultimap.create());
        vrf.put(peer.getVrfName(), peer);
    }
    SetMultimap<BgpPeerConfigId, Ip> localIps = localIpsBuilder.build();
    for (BgpPeerConfigId neighborId : graph.nodes()) {
        switch(neighborId.getType()) {
            case DYNAMIC:
                // Passive end of the peering cannot initiate a connection
                continue;
            case ACTIVE:
                addActivePeerEdges(neighborId, graph, networkConfigurations, ipVrfOwners, receivers, localIps.get(neighborId), checkReachability, tracerouteEngine);
                break;
            case UNNUMBERED:
                addUnnumberedPeerEdges(neighborId, graph, networkConfigurations, l3Adjacencies);
                break;
            default:
                throw new IllegalArgumentException(String.format("Unrecognized peer type: %s", neighborId));
        }
    }
    return new BgpTopology(graph);
}
Also used : BgpPeerConfigType(org.batfish.datamodel.BgpPeerConfigId.BgpPeerConfigType) IpProtocol(org.batfish.datamodel.IpProtocol) Hop(org.batfish.datamodel.flow.Hop) FibForward(org.batfish.datamodel.FibForward) FibNextVrf(org.batfish.datamodel.FibNextVrf) Trace(org.batfish.datamodel.flow.Trace) Interface(org.batfish.datamodel.Interface) ValueGraphBuilder(com.google.common.graph.ValueGraphBuilder) Flow(org.batfish.datamodel.Flow) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) NetworkConfigurations(org.batfish.datamodel.NetworkConfigurations) Map(java.util.Map) Network(com.google.common.graph.Network) NamedPort(org.batfish.datamodel.NamedPort) Vrf(org.batfish.datamodel.Vrf) IpOwners(org.batfish.common.topology.IpOwners) ImmutableSetMultimap(com.google.common.collect.ImmutableSetMultimap) LinkedListMultimap(com.google.common.collect.LinkedListMultimap) ImmutableSet(com.google.common.collect.ImmutableSet) BgpPeerConfig(org.batfish.datamodel.BgpPeerConfig) ImmutableMap(com.google.common.collect.ImmutableMap) FlowDisposition(org.batfish.datamodel.FlowDisposition) FibActionVisitor(org.batfish.datamodel.visitors.FibActionVisitor) Set(java.util.Set) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) Objects(java.util.Objects) List(java.util.List) BgpPassivePeerConfig(org.batfish.datamodel.BgpPassivePeerConfig) L3Adjacencies(org.batfish.common.topology.L3Adjacencies) Entry(java.util.Map.Entry) Ip(org.batfish.datamodel.Ip) LongSpace(org.batfish.datamodel.LongSpace) NodeInterfacePair(org.batfish.datamodel.collections.NodeInterfacePair) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) HashMap(java.util.HashMap) BgpProcess(org.batfish.datamodel.BgpProcess) Multimap(com.google.common.collect.Multimap) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId) ImmutableList(com.google.common.collect.ImmutableList) Configuration(org.batfish.datamodel.Configuration) FibNullRoute(org.batfish.datamodel.FibNullRoute) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ConcreteInterfaceAddress(org.batfish.datamodel.ConcreteInterfaceAddress) Fib(org.batfish.datamodel.Fib) MoreObjects(com.google.common.base.MoreObjects) SetMultimap(com.google.common.collect.SetMultimap) SessionType(org.batfish.datamodel.BgpSessionProperties.SessionType) MutableValueGraph(com.google.common.graph.MutableValueGraph) BgpSessionProperties(org.batfish.datamodel.BgpSessionProperties) VisibleForTesting(com.google.common.annotations.VisibleForTesting) FibEntry(org.batfish.datamodel.FibEntry) BgpUnnumberedPeerConfig(org.batfish.datamodel.BgpUnnumberedPeerConfig) Configuration(org.batfish.datamodel.Configuration) ImmutableSetMultimap(com.google.common.collect.ImmutableSetMultimap) BgpProcess(org.batfish.datamodel.BgpProcess) HashMap(java.util.HashMap) NetworkConfigurations(org.batfish.datamodel.NetworkConfigurations) Ip(org.batfish.datamodel.Ip) FibNextVrf(org.batfish.datamodel.FibNextVrf) Vrf(org.batfish.datamodel.Vrf) BgpSessionProperties(org.batfish.datamodel.BgpSessionProperties) ImmutableSetMultimap(com.google.common.collect.ImmutableSetMultimap) LinkedListMultimap(com.google.common.collect.LinkedListMultimap) Multimap(com.google.common.collect.Multimap) SetMultimap(com.google.common.collect.SetMultimap) BgpActivePeerConfig(org.batfish.datamodel.BgpActivePeerConfig) BgpPeerConfigId(org.batfish.datamodel.BgpPeerConfigId) Fib(org.batfish.datamodel.Fib) Nonnull(javax.annotation.Nonnull)

Example 3 with TracerouteEngine

use of org.batfish.common.plugin.TracerouteEngine in project batfish by batfish.

the class BidirectionalTracerouteAnswererTest method testMultipath.

@Test
public void testMultipath() {
    Trace forwardTrace1 = new Trace(ACCEPTED, ImmutableList.of());
    Trace forwardTrace2 = new Trace(DENIED_IN, ImmutableList.of());
    Trace forwardTrace3 = new Trace(DELIVERED_TO_SUBNET, ImmutableList.of());
    TraceAndReverseFlow forwardTarf1 = new TraceAndReverseFlow(forwardTrace1, REVERSE_FLOW, ImmutableSet.of());
    TraceAndReverseFlow forwardTarf2 = new TraceAndReverseFlow(forwardTrace2, null, ImmutableSet.of());
    TraceAndReverseFlow forwardTarf3 = new TraceAndReverseFlow(forwardTrace3, REVERSE_FLOW, ImmutableSet.of());
    Trace reverseTrace1 = new Trace(DENIED_IN, ImmutableList.of());
    Trace reverseTrace2 = new Trace(EXITS_NETWORK, ImmutableList.of());
    TraceAndReverseFlow reverseTarf1 = new TraceAndReverseFlow(reverseTrace1, null, ImmutableSet.of());
    TraceAndReverseFlow reverseTarf2 = new TraceAndReverseFlow(reverseTrace2, FORWARD_FLOW, ImmutableSet.of());
    TracerouteEngine tracerouteEngine = forFlows(ImmutableMap.of(FORWARD_FLOW, ImmutableList.of(forwardTarf1, forwardTarf2, forwardTarf3), REVERSE_FLOW, ImmutableList.of(reverseTarf1, reverseTarf2)));
    List<BidirectionalTrace> bidirectionalTraces = computeBidirectionalTraces(ImmutableSet.of(FORWARD_FLOW), tracerouteEngine, false);
    assertThat(bidirectionalTraces, contains(new BidirectionalTrace(FORWARD_FLOW, forwardTrace1, ImmutableSet.of(), REVERSE_FLOW, reverseTrace1), new BidirectionalTrace(FORWARD_FLOW, forwardTrace1, ImmutableSet.of(), REVERSE_FLOW, reverseTrace2), new BidirectionalTrace(FORWARD_FLOW, forwardTrace2, ImmutableSet.of(), null, null), new BidirectionalTrace(FORWARD_FLOW, forwardTrace3, ImmutableSet.of(), REVERSE_FLOW, reverseTrace1), new BidirectionalTrace(FORWARD_FLOW, forwardTrace3, ImmutableSet.of(), REVERSE_FLOW, reverseTrace2)));
}
Also used : Trace(org.batfish.datamodel.flow.Trace) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) Test(org.junit.Test)

Example 4 with TracerouteEngine

use of org.batfish.common.plugin.TracerouteEngine in project batfish by batfish.

the class BidirectionalTracerouteAnswererTest method testSessions.

/**
 * Make sure we don't mix traces and sessions.
 */
@Test
public void testSessions() {
    Trace sessionForwardTrace = new Trace(ACCEPTED, ImmutableList.of());
    Trace noSessionForwardTrace = new Trace(DELIVERED_TO_SUBNET, ImmutableList.of());
    FirewallSessionTraceInfo session = new FirewallSessionTraceInfo("session", Accept.INSTANCE, ImmutableSet.of(), DUMMY_SESSION_FLOW, null);
    TraceAndReverseFlow sessionForwardTarf = new TraceAndReverseFlow(sessionForwardTrace, REVERSE_FLOW, ImmutableList.of(session));
    TraceAndReverseFlow noSessionForwardTarf = new TraceAndReverseFlow(noSessionForwardTrace, REVERSE_FLOW, ImmutableList.of());
    Trace sessionReverseTrace = new Trace(DENIED_IN, ImmutableList.of());
    Trace noSessionReverseTrace = new Trace(DENIED_OUT, ImmutableList.of());
    TraceAndReverseFlow sessionReverseTarf = new TraceAndReverseFlow(sessionReverseTrace, null, ImmutableList.of());
    TraceAndReverseFlow noSessionReverseTarf = new TraceAndReverseFlow(noSessionReverseTrace, null, ImmutableList.of());
    TracerouteEngine tracerouteEngine = forSessions(ImmutableMap.of(ImmutableSet.of(), ImmutableMap.of(FORWARD_FLOW, ImmutableList.of(sessionForwardTarf, noSessionForwardTarf), REVERSE_FLOW, ImmutableList.of(noSessionReverseTarf)), ImmutableSet.of(session), ImmutableMap.of(REVERSE_FLOW, ImmutableList.of(sessionReverseTarf))));
    List<BidirectionalTrace> bidirectionalTraces = computeBidirectionalTraces(ImmutableSet.of(FORWARD_FLOW), tracerouteEngine, false);
    assertThat(bidirectionalTraces, containsInAnyOrder(new BidirectionalTrace(FORWARD_FLOW, sessionForwardTrace, ImmutableSet.of(session), REVERSE_FLOW, sessionReverseTrace), new BidirectionalTrace(FORWARD_FLOW, noSessionForwardTrace, ImmutableSet.of(), REVERSE_FLOW, noSessionReverseTrace)));
}
Also used : Trace(org.batfish.datamodel.flow.Trace) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) FirewallSessionTraceInfo(org.batfish.datamodel.flow.FirewallSessionTraceInfo) Test(org.junit.Test)

Example 5 with TracerouteEngine

use of org.batfish.common.plugin.TracerouteEngine in project batfish by batfish.

the class BidirectionalTracerouteAnswerer method bidirectionalTracerouteAnswerElement.

public static AnswerElement bidirectionalTracerouteAnswerElement(Question question, Set<Flow> flows, TracerouteEngine tracerouteEngine, boolean ignoreFilters, @Nullable Integer maxTraces) {
    List<BidirectionalTrace> bidirectionalTraces = computeBidirectionalTraces(flows, tracerouteEngine, ignoreFilters);
    List<BidirectionalTrace> prunedTraces = maxTraces == null ? bidirectionalTraces : prune(bidirectionalTraces, maxTraces);
    ImmutableMultiset<Row> rows = groupTraces(prunedTraces).entrySet().stream().map(entry -> toRow(entry.getKey(), entry.getValue())).collect(ImmutableMultiset.toImmutableMultiset());
    TableAnswerElement table = new TableAnswerElement(metadata());
    table.postProcessAnswer(question, rows);
    return table;
}
Also used : TableMetadata(org.batfish.datamodel.table.TableMetadata) TracerouteEngine(org.batfish.common.plugin.TracerouteEngine) BidirectionalTracePruner.prune(org.batfish.datamodel.flow.BidirectionalTracePruner.prune) TableAnswerElement(org.batfish.datamodel.table.TableAnswerElement) Function(java.util.function.Function) Trace(org.batfish.datamodel.flow.Trace) ArrayList(java.util.ArrayList) Flow(org.batfish.datamodel.Flow) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) ImmutableList(com.google.common.collect.ImmutableList) ImmutableMultiset(com.google.common.collect.ImmutableMultiset) Map(java.util.Map) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) Answerer(org.batfish.common.Answerer) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) Schema(org.batfish.datamodel.answers.Schema) Collectors(java.util.stream.Collectors) TraceAndReverseFlow(org.batfish.datamodel.flow.TraceAndReverseFlow) IBatfish(org.batfish.common.plugin.IBatfish) Objects(java.util.Objects) FirewallSessionTraceInfo(org.batfish.datamodel.flow.FirewallSessionTraceInfo) Row(org.batfish.datamodel.table.Row) List(java.util.List) CollectionUtil.toImmutableMap(org.batfish.common.util.CollectionUtil.toImmutableMap) Question(org.batfish.datamodel.questions.Question) AnswerElement(org.batfish.datamodel.answers.AnswerElement) VisibleForTesting(com.google.common.annotations.VisibleForTesting) NetworkSnapshot(org.batfish.common.NetworkSnapshot) ColumnMetadata(org.batfish.datamodel.table.ColumnMetadata) SortedMap(java.util.SortedMap) BidirectionalTrace(org.batfish.datamodel.flow.BidirectionalTrace) Row(org.batfish.datamodel.table.Row) TableAnswerElement(org.batfish.datamodel.table.TableAnswerElement)

Aggregations

TracerouteEngine (org.batfish.common.plugin.TracerouteEngine)35 Test (org.junit.Test)24 TraceAndReverseFlow (org.batfish.datamodel.flow.TraceAndReverseFlow)22 Flow (org.batfish.datamodel.Flow)17 Trace (org.batfish.datamodel.flow.Trace)15 Configuration (org.batfish.datamodel.Configuration)14 List (java.util.List)11 Ip (org.batfish.datamodel.Ip)10 Vrf (org.batfish.datamodel.Vrf)10 ImmutableList (com.google.common.collect.ImmutableList)9 NetworkSnapshot (org.batfish.common.NetworkSnapshot)9 IBatfish (org.batfish.common.plugin.IBatfish)9 Interface (org.batfish.datamodel.Interface)9 FirewallSessionTraceInfo (org.batfish.datamodel.flow.FirewallSessionTraceInfo)9 ImmutableSet (com.google.common.collect.ImmutableSet)8 Map (java.util.Map)8 Nonnull (javax.annotation.Nonnull)8 Batfish (org.batfish.main.Batfish)8 VisibleForTesting (com.google.common.annotations.VisibleForTesting)7 Objects (java.util.Objects)7