文章列表
测试一个在Android读取Tcpdump抓取的网络包应用,取Packet的代码如下:
(此为AndroidShark中的代码,为一开源项目)
private ArrayList<JPacket> packets = new ArrayList<JPacket>();
StringBuilder errbuf = new StringBuilder();
// Opening the .pcap file.
final Pcap parser = Pcap.openOffline("/mnt/sdcard/shark/shark_capture.pcap&qu ...