createPeerObjBuilder(toRouterL3Unicast, routerIp.ipAddress().toIpPrefix()).remove()); }); createPeerObjBuilder(toPeerL3Unicast, peerIp.toIpPrefix()).remove()); });
src.getAddr().toIpPrefix(), grp.getAddr().toIpPrefix(), true); src.deserialize(bb); jp.addJoinPrune( src.getAddr().toIpPrefix(), grp.getAddr().toIpPrefix(), false);
private void peerAdded(HostEvent event) { Host peer = event.subject(); Optional<Interface> peerIntf = interfaceService.getInterfacesByPort(peer.location()).stream() .filter(intf -> interfaces.isEmpty() || interfaces.contains(intf.name())) .filter(intf -> peer.vlan().equals(intf.vlan())) .findFirst(); if (!peerIntf.isPresent()) { log.debug("Adding peer {}/{} on {} but the interface is not configured", peer.mac(), peer.vlan(), peer.location()); return; } // Generate L3 Unicast groups and store it in the map int toRouterL3Unicast = createPeerGroup(peer.mac(), peerIntf.get().mac(), peer.vlan(), peer.location().deviceId(), controlPlaneConnectPoint.port()); int toPeerL3Unicast = createPeerGroup(peerIntf.get().mac(), peer.mac(), peer.vlan(), peer.location().deviceId(), peer.location().port()); peerNextId.put(peer, ImmutableSortedSet.of(toRouterL3Unicast, toPeerL3Unicast)); // From peer to router peerIntf.get().ipAddresses().forEach(routerIp -> { flowObjectiveService.forward(peer.location().deviceId(), createPeerObjBuilder(toRouterL3Unicast, routerIp.ipAddress().toIpPrefix()).add()); }); // From router to peer peer.ipAddresses().forEach(peerIp -> { flowObjectiveService.forward(peer.location().deviceId(), createPeerObjBuilder(toPeerL3Unicast, peerIp.toIpPrefix()).add()); }); }
ModIPInstruction ipInstr = (ModIPInstruction) l3instruction; IpPrefix prefix = ipInstr.ip().toIpPrefix(); switch (ipInstr.subtype()) { case IPV4_SRC:
.matchEthType(EthType.EtherType.IPV4.ethType().toShort()) .matchVlanId(intf.vlan()) .matchIPDst(ip.ipAddress().toIpPrefix()) .build(); .matchVlanId(intf.vlan()) .matchEthType(EthType.EtherType.IPV4.ethType().toShort()) .matchIPSrc(ip.ipAddress().toIpPrefix()) .build();