Committed by
Gerrit Code Review
Rename some classes and methods of neighbour API
Change-Id: I77763adbd19b35fe9ad7efa2926751a68bf9a1ef
Showing
4 changed files
with
14 additions
and
14 deletions
... | @@ -142,12 +142,12 @@ public class BgpSpeakerNeighbourHandler { | ... | @@ -142,12 +142,12 @@ public class BgpSpeakerNeighbourHandler { |
142 | case REQUEST: | 142 | case REQUEST: |
143 | // Reply to requests that target our configured interface IP | 143 | // Reply to requests that target our configured interface IP |
144 | // address on this port. Drop all other requests. | 144 | // address on this port. Drop all other requests. |
145 | - | ||
146 | interfaceService.getInterfacesByPort(context.inPort()) | 145 | interfaceService.getInterfacesByPort(context.inPort()) |
147 | .stream() | 146 | .stream() |
148 | .filter(intf -> intf.ipAddresses() | 147 | .filter(intf -> intf.ipAddresses() |
149 | .stream() | 148 | .stream() |
150 | - .anyMatch(ia -> ia.ipAddress().equals(context.target()))) | 149 | + .anyMatch(ia -> ia.ipAddress().equals(context.target()) && |
150 | + ia.subnetAddress().contains(context.sender()))) | ||
151 | .forEach(intf -> context.reply(intf.mac())); | 151 | .forEach(intf -> context.reply(intf.mac())); |
152 | 152 | ||
153 | break; | 153 | break; | ... | ... |
... | @@ -36,21 +36,21 @@ public interface NeighbourMessageActions { | ... | @@ -36,21 +36,21 @@ public interface NeighbourMessageActions { |
36 | void reply(NeighbourMessageContext context, MacAddress targetMac); | 36 | void reply(NeighbourMessageContext context, MacAddress targetMac); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | - * Proxies the incoming message to the given connect point. | 39 | + * Forwards the incoming message to the given connect point. |
40 | * | 40 | * |
41 | * @param context incoming message context | 41 | * @param context incoming message context |
42 | * @param outPort port to send the message out | 42 | * @param outPort port to send the message out |
43 | */ | 43 | */ |
44 | - void proxy(NeighbourMessageContext context, ConnectPoint outPort); | 44 | + void forward(NeighbourMessageContext context, ConnectPoint outPort); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | - * Proxies the incoming message to a given interface. | 47 | + * Forwards the incoming message to a given interface. The message will be |
48 | + * modified to fit the parameters of the outgoing interface. | ||
48 | * | 49 | * |
49 | * @param context incoming message context | 50 | * @param context incoming message context |
50 | - * @param outIntf interface to send the message out. The message will be | 51 | + * @param outIntf interface to send the message out |
51 | - * modified to fit the parameters of the outgoing interface. | ||
52 | */ | 52 | */ |
53 | - void proxy(NeighbourMessageContext context, Interface outIntf); | 53 | + void forward(NeighbourMessageContext context, Interface outIntf); |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Floods the incoming message to all edge ports except the in port. | 56 | * Floods the incoming message to all edge ports except the in port. | ... | ... |
... | @@ -125,12 +125,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext { | ... | @@ -125,12 +125,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext { |
125 | 125 | ||
126 | @Override | 126 | @Override |
127 | public void proxy(ConnectPoint outPort) { | 127 | public void proxy(ConnectPoint outPort) { |
128 | - actions.proxy(this, outPort); | 128 | + actions.forward(this, outPort); |
129 | } | 129 | } |
130 | 130 | ||
131 | @Override | 131 | @Override |
132 | public void proxy(Interface outIntf) { | 132 | public void proxy(Interface outIntf) { |
133 | - actions.proxy(this, outIntf); | 133 | + actions.forward(this, outIntf); |
134 | } | 134 | } |
135 | 135 | ||
136 | @Override | 136 | @Override | ... | ... |
... | @@ -85,7 +85,7 @@ import static org.onosproject.net.packet.PacketPriority.CONTROL; | ... | @@ -85,7 +85,7 @@ import static org.onosproject.net.packet.PacketPriority.CONTROL; |
85 | */ | 85 | */ |
86 | @Service | 86 | @Service |
87 | @Component(immediate = true) | 87 | @Component(immediate = true) |
88 | -public class NeighbourPacketManager implements NeighbourResolutionService { | 88 | +public class NeighbourResolutionManager implements NeighbourResolutionService { |
89 | 89 | ||
90 | private final Logger log = LoggerFactory.getLogger(getClass()); | 90 | private final Logger log = LoggerFactory.getLogger(getClass()); |
91 | 91 | ||
... | @@ -509,16 +509,16 @@ public class NeighbourPacketManager implements NeighbourResolutionService { | ... | @@ -509,16 +509,16 @@ public class NeighbourPacketManager implements NeighbourResolutionService { |
509 | 509 | ||
510 | @Override | 510 | @Override |
511 | public void reply(NeighbourMessageContext context, MacAddress targetMac) { | 511 | public void reply(NeighbourMessageContext context, MacAddress targetMac) { |
512 | - NeighbourPacketManager.this.reply(context, targetMac); | 512 | + NeighbourResolutionManager.this.reply(context, targetMac); |
513 | } | 513 | } |
514 | 514 | ||
515 | @Override | 515 | @Override |
516 | - public void proxy(NeighbourMessageContext context, ConnectPoint outPort) { | 516 | + public void forward(NeighbourMessageContext context, ConnectPoint outPort) { |
517 | sendTo(context.packet(), outPort); | 517 | sendTo(context.packet(), outPort); |
518 | } | 518 | } |
519 | 519 | ||
520 | @Override | 520 | @Override |
521 | - public void proxy(NeighbourMessageContext context, Interface outIntf) { | 521 | + public void forward(NeighbourMessageContext context, Interface outIntf) { |
522 | // TODO implement | 522 | // TODO implement |
523 | } | 523 | } |
524 | 524 | ... | ... |
-
Please register or login to post a comment