/** * Gets the short key * * * @return the short key */ public String getShortKey() { int sourcePort = 0; int destinationPort = 0; if(Constants.PROTOCOL_UDP == ipv4Packet.getProtocol()) { sourcePort = udpPacket.getSourcePort(); destinationPort = udpPacket.getDestinationPort(); } else if (Constants.PROTOCOL_TCP == ipv4Packet.getProtocol()) { sourcePort = tcpPacket.getSourcePort(); destinationPort = tcpPacket.getDestinationPort(); } return PcapUtils.getShortSessionKey(ipv4Packet.getSourceAddress().getHostAddress(), ipv4Packet.getDestinationAddress().getHostAddress(), ipv4Packet.getProtocol(), sourcePort, destinationPort); }