Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

Hi,

check out method sendEchoReply in https://github.com/fredhsu/odl-apps/blob/master/icmpreply/src/main/java/com/example/icmpreply/ICMPReply.java

Ethernet ethernet = new Ethernet();
ethernet.setSourceMACAddress(sourceMAC)
        .setDestinationMACAddress(destinationMAC)
        .setEtherType(EtherTypes.IPv4.shortValue())
        .setPayload(payload);

RawPacket rawPacket = dataPacketService.encodeDataPacket(ethernet);
rawPacket.setOutgoingNodeConnector(nodeConnector);

dataPacketService.transmitDataPacket(rawPacket);

May the Flow be with you