标签:floodlight packet_in upstream
Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD); if(eth.getEtherType() == Ethernet.TYPE_IPv4){ IPv4 ipPkt = (IPv4)eth.getPayload(); if(ipPkt.getProtocol() == IPv4.PROTOCOL_UDP){ UDP udpPkt = (UDP)ipPkt.getPayload(); Data dataPkt = (Data)udpPkt.getPayload(); System.out.println(dataPkt.getData().length); byte[] arr = dataPkt.getData(); for (int i = 0; i < dataPkt.getData().length; i++){ System.out.print((char)arr[i]); } } }
从PACKET_IN消息中得到packet data,布布扣,bubuko.com
标签:floodlight packet_in upstream
原文地址:http://blog.csdn.net/vonzhoufz/article/details/31356485