2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sample.l2switch.md.flow;
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef;
14 * Service that adds packet forwarding flows to configuration data store.
16 public interface FlowWriterService {
19 * Writes a flow that forwards packets to destPort if destination mac in packet is destMac and
20 * source Mac in packet is sourceMac. If sourceMac is null then flow would not set any source mac,
21 * resulting in all packets with destMac being forwarded to destPort.
25 * @param destNodeConnectorRef
27 public void addMacToMacFlow(MacAddress sourceMac, MacAddress destMac, NodeConnectorRef destNodeConnectorRef);
30 * Writes mac-to-mac flow on all ports that are in the path between given source and destination ports.
31 * It uses path provided by NetworkGraphService{@link org.opendaylight.controller.sample.l2switch.md.topology.NetworkGraphService} to find a links{@link org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link}
32 * between given ports. And then writes appropriate flow on each port that is covered in that path.
35 * @param sourceNodeConnectorRef
37 * @param destNodeConnectorRef
39 public void addMacToMacFlowsUsingShortestPath(MacAddress sourceMac, NodeConnectorRef sourceNodeConnectorRef, MacAddress destMac, NodeConnectorRef destNodeConnectorRef);