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 爲什麼?請幫忙解決這個問題.thanksjpcap.packet.Packet無法轉換爲jpcap.packet.TCPPacket