Jonathan Hart
Committed by Gerrit Code Review

Rename some classes and methods of neighbour API

Change-Id: I77763adbd19b35fe9ad7efa2926751a68bf9a1ef
......@@ -142,12 +142,12 @@ public class BgpSpeakerNeighbourHandler {
case REQUEST:
// Reply to requests that target our configured interface IP
// address on this port. Drop all other requests.
interfaceService.getInterfacesByPort(context.inPort())
.stream()
.filter(intf -> intf.ipAddresses()
.stream()
.anyMatch(ia -> ia.ipAddress().equals(context.target())))
.anyMatch(ia -> ia.ipAddress().equals(context.target()) &&
ia.subnetAddress().contains(context.sender())))
.forEach(intf -> context.reply(intf.mac()));
break;
......
......@@ -36,21 +36,21 @@ public interface NeighbourMessageActions {
void reply(NeighbourMessageContext context, MacAddress targetMac);
/**
* Proxies the incoming message to the given connect point.
* Forwards the incoming message to the given connect point.
*
* @param context incoming message context
* @param outPort port to send the message out
*/
void proxy(NeighbourMessageContext context, ConnectPoint outPort);
void forward(NeighbourMessageContext context, ConnectPoint outPort);
/**
* Proxies the incoming message to a given interface.
* Forwards the incoming message to a given interface. The message will be
* modified to fit the parameters of the outgoing interface.
*
* @param context incoming message context
* @param outIntf interface to send the message out. The message will be
* modified to fit the parameters of the outgoing interface.
* @param outIntf interface to send the message out
*/
void proxy(NeighbourMessageContext context, Interface outIntf);
void forward(NeighbourMessageContext context, Interface outIntf);
/**
* Floods the incoming message to all edge ports except the in port.
......
......@@ -125,12 +125,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext {
@Override
public void proxy(ConnectPoint outPort) {
actions.proxy(this, outPort);
actions.forward(this, outPort);
}
@Override
public void proxy(Interface outIntf) {
actions.proxy(this, outIntf);
actions.forward(this, outIntf);
}
@Override
......
......@@ -85,7 +85,7 @@ import static org.onosproject.net.packet.PacketPriority.CONTROL;
*/
@Service
@Component(immediate = true)
public class NeighbourPacketManager implements NeighbourResolutionService {
public class NeighbourResolutionManager implements NeighbourResolutionService {
private final Logger log = LoggerFactory.getLogger(getClass());
......@@ -509,16 +509,16 @@ public class NeighbourPacketManager implements NeighbourResolutionService {
@Override
public void reply(NeighbourMessageContext context, MacAddress targetMac) {
NeighbourPacketManager.this.reply(context, targetMac);
NeighbourResolutionManager.this.reply(context, targetMac);
}
@Override
public void proxy(NeighbourMessageContext context, ConnectPoint outPort) {
public void forward(NeighbourMessageContext context, ConnectPoint outPort) {
sendTo(context.packet(), outPort);
}
@Override
public void proxy(NeighbourMessageContext context, Interface outIntf) {
public void forward(NeighbourMessageContext context, Interface outIntf) {
// TODO implement
}
......