Showing
1 changed file
with
1 additions
and
54 deletions
... | @@ -123,18 +123,7 @@ public class PeerConnectivity { | ... | @@ -123,18 +123,7 @@ public class PeerConnectivity { |
123 | // TODO: The usage of PacketMatchBuilder will be improved, then we | 123 | // TODO: The usage of PacketMatchBuilder will be improved, then we |
124 | // only need to new the PacketMatchBuilder once. | 124 | // only need to new the PacketMatchBuilder once. |
125 | // By then, the code here will be improved accordingly. | 125 | // By then, the code here will be improved accordingly. |
126 | - /*PacketMatch packetMatch = new PacketMatchBuilder().setEtherType( | 126 | + TrafficSelector selector = DefaultTrafficSelector.builder() |
127 | - Ethernet.TYPE_IPV4) | ||
128 | - .setIpProto(PROTOCOL_TCP) | ||
129 | - .setSrcIpNet(new Ip4Prefix(bgpdAddress, | ||
130 | - (short) Ip4Address.BIT_LENGTH)) | ||
131 | - .setDstIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
132 | - (short) Ip4Address.BIT_LENGTH)) | ||
133 | - .setDstTcpPort(BGP_PORT) | ||
134 | - .build(); | ||
135 | - */ | ||
136 | - | ||
137 | - TrafficSelector selector = DefaultTrafficSelector.builder() | ||
138 | .matchEthType(Ethernet.TYPE_IPV4) | 127 | .matchEthType(Ethernet.TYPE_IPV4) |
139 | .matchIPProtocol(IPv4.PROTOCOL_TCP) | 128 | .matchIPProtocol(IPv4.PROTOCOL_TCP) |
140 | .matchIPSrc(IpPrefix.valueOf(bgpdAddress.toRealInt(), IPV4_BIT_LENGTH)) | 129 | .matchIPSrc(IpPrefix.valueOf(bgpdAddress.toRealInt(), IPV4_BIT_LENGTH)) |
... | @@ -155,14 +144,6 @@ public class PeerConnectivity { | ... | @@ -155,14 +144,6 @@ public class PeerConnectivity { |
155 | 144 | ||
156 | // install intent for BGP path from BGPd to BGP peer matching | 145 | // install intent for BGP path from BGPd to BGP peer matching |
157 | // source TCP port 179 | 146 | // source TCP port 179 |
158 | - /*packetMatch = new PacketMatchBuilder().setEtherType(Ethernet.TYPE_IPV4) | ||
159 | - .setIpProto(PROTOCOL_TCP) | ||
160 | - .setSrcIpNet(new Ip4Prefix(bgpdAddress, | ||
161 | - (short) Ip4Address.BIT_LENGTH)) | ||
162 | - .setDstIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
163 | - (short) Ip4Address.BIT_LENGTH)) | ||
164 | - .setSrcTcpPort(BGP_PORT) | ||
165 | - .build();*/ | ||
166 | selector = DefaultTrafficSelector.builder() | 147 | selector = DefaultTrafficSelector.builder() |
167 | .matchEthType(Ethernet.TYPE_IPV4) | 148 | .matchEthType(Ethernet.TYPE_IPV4) |
168 | .matchIPProtocol(IPv4.PROTOCOL_TCP) | 149 | .matchIPProtocol(IPv4.PROTOCOL_TCP) |
... | @@ -181,14 +162,6 @@ public class PeerConnectivity { | ... | @@ -181,14 +162,6 @@ public class PeerConnectivity { |
181 | 162 | ||
182 | // install intent for reversed BGP path from BGP peer to BGPd | 163 | // install intent for reversed BGP path from BGP peer to BGPd |
183 | // matching destination TCP port 179 | 164 | // matching destination TCP port 179 |
184 | - /*packetMatch = new PacketMatchBuilder().setEtherType(Ethernet.TYPE_IPV4) | ||
185 | - .setIpProto(PROTOCOL_TCP) | ||
186 | - .setSrcIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
187 | - (short) Ip4Address.BIT_LENGTH)) | ||
188 | - .setDstIpNet(new Ip4Prefix(bgpdAddress, | ||
189 | - (short) Ip4Address.BIT_LENGTH)) | ||
190 | - .setDstTcpPort(BGP_PORT) | ||
191 | - .build();*/ | ||
192 | selector = DefaultTrafficSelector.builder() | 165 | selector = DefaultTrafficSelector.builder() |
193 | .matchEthType(Ethernet.TYPE_IPV4) | 166 | .matchEthType(Ethernet.TYPE_IPV4) |
194 | .matchIPProtocol(IPv4.PROTOCOL_TCP) | 167 | .matchIPProtocol(IPv4.PROTOCOL_TCP) |
... | @@ -207,14 +180,6 @@ public class PeerConnectivity { | ... | @@ -207,14 +180,6 @@ public class PeerConnectivity { |
207 | 180 | ||
208 | // install intent for reversed BGP path from BGP peer to BGPd | 181 | // install intent for reversed BGP path from BGP peer to BGPd |
209 | // matching source TCP port 179 | 182 | // matching source TCP port 179 |
210 | - /*packetMatch = new PacketMatchBuilder().setEtherType(Ethernet.TYPE_IPV4) | ||
211 | - .setIpProto(PROTOCOL_TCP) | ||
212 | - .setSrcIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
213 | - (short) Ip4Address.BIT_LENGTH)) | ||
214 | - .setDstIpNet(new Ip4Prefix(bgpdAddress, | ||
215 | - (short) Ip4Address.BIT_LENGTH)) | ||
216 | - .setSrcTcpPort(BGP_PORT) | ||
217 | - .build();*/ | ||
218 | selector = DefaultTrafficSelector.builder() | 183 | selector = DefaultTrafficSelector.builder() |
219 | .matchEthType(Ethernet.TYPE_IPV4) | 184 | .matchEthType(Ethernet.TYPE_IPV4) |
220 | .matchIPProtocol(IPv4.PROTOCOL_TCP) | 185 | .matchIPProtocol(IPv4.PROTOCOL_TCP) |
... | @@ -283,15 +248,6 @@ public class PeerConnectivity { | ... | @@ -283,15 +248,6 @@ public class PeerConnectivity { |
283 | ConnectPoint bgpdPeerConnectPoint = peerInterface.connectPoint(); | 248 | ConnectPoint bgpdPeerConnectPoint = peerInterface.connectPoint(); |
284 | 249 | ||
285 | // install intent for ICMP path from BGPd to BGP peer | 250 | // install intent for ICMP path from BGPd to BGP peer |
286 | - /*PacketMatch packetMatch = | ||
287 | - new PacketMatchBuilder().setEtherType( | ||
288 | - Ethernet.TYPE_IPV4) | ||
289 | - .setIpProto(PROTOCOL_ICMP) | ||
290 | - .setSrcIpNet(new Ip4Prefix(bgpdAddress, | ||
291 | - (short) Ip4Address.BIT_LENGTH)) | ||
292 | - .setDstIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
293 | - (short) Ip4Address.BIT_LENGTH)) | ||
294 | - .build();*/ | ||
295 | TrafficSelector selector = DefaultTrafficSelector.builder() | 251 | TrafficSelector selector = DefaultTrafficSelector.builder() |
296 | .matchEthType(Ethernet.TYPE_IPV4) | 252 | .matchEthType(Ethernet.TYPE_IPV4) |
297 | .matchIPProtocol(IPv4.PROTOCOL_ICMP) | 253 | .matchIPProtocol(IPv4.PROTOCOL_ICMP) |
... | @@ -310,15 +266,6 @@ public class PeerConnectivity { | ... | @@ -310,15 +266,6 @@ public class PeerConnectivity { |
310 | + " {}", bgpdAddress, bgpdPeerAddress, intent); | 266 | + " {}", bgpdAddress, bgpdPeerAddress, intent); |
311 | 267 | ||
312 | // install intent for reversed ICMP path from BGP peer to BGPd | 268 | // install intent for reversed ICMP path from BGP peer to BGPd |
313 | - /*packetMatch = new PacketMatchBuilder().setEtherType( | ||
314 | - Ethernet.TYPE_IPV4) | ||
315 | - .setIpProto(PROTOCOL_ICMP) | ||
316 | - .setSrcIpNet(new Ip4Prefix(bgpdPeerAddress, | ||
317 | - (short) Ip4Address.BIT_LENGTH)) | ||
318 | - .setDstIpNet(new Ip4Prefix(bgpdAddress, | ||
319 | - (short) Ip4Address.BIT_LENGTH)) | ||
320 | - .build();*/ | ||
321 | - | ||
322 | selector = DefaultTrafficSelector.builder() | 269 | selector = DefaultTrafficSelector.builder() |
323 | .matchEthType(Ethernet.TYPE_IPV4) | 270 | .matchEthType(Ethernet.TYPE_IPV4) |
324 | .matchIPProtocol(IPv4.PROTOCOL_ICMP) | 271 | .matchIPProtocol(IPv4.PROTOCOL_ICMP) | ... | ... |
-
Please register or login to post a comment