checkInput(data, offset, length, TCP_HEADER_LENGTH); TCP tcp = new TCP();
@Override public void sendPacketIn(PccId pccId) { TCP tcp = new TCP(); // Set the well known PCEP port. To be used to decide to process/discard the packet while processing. tcp.setDestinationPort(PCEP_PORT); IPv4 ipv4 = new IPv4(); ipv4.setProtocol(IPv4.PROTOCOL_TCP); ipv4.setPayload(tcp); Ethernet eth = new Ethernet(); eth.setEtherType(Ethernet.TYPE_IPV4); eth.setDestinationMACAddress(MacAddress.NONE); eth.setPayload(ipv4); // Get lsrId of the PCEP client from the PCC ID. Session info is based on lsrID. String lsrId = String.valueOf(pccId.ipAddress()); DeviceId pccDeviceId = DeviceId.deviceId(lsrId); InboundPacket inPkt = new DefaultInboundPacket(new ConnectPoint(pccDeviceId, PortNumber.portNumber(PCEP_PORT)), eth, null); packetProviderService.processPacket(new PcepPacketContext(inPkt, null)); } }