Packet packet = new Packet();
while(packet != null )
{
packet = jpcap.getPacket();
TCPPacket tcp = (TCPPacket)jpcap.getPacket();
IPPacket ipp = (IPPacket)packet;
UDPPacket udp = (UDPPacket)jpcap.getPacket();
ipp = (IPPacket)tcp;
}
TCPPacket tcp = (TCPPacket)jpcap.getPacket(); 此行出现错误 jpcap.packet.Packet 无法转换为 jpcap.packet.TCPPacket 为什么?请帮助解决它。谢谢