internal unsafe Packet(ref pcap_pkthdr header, byte* pkt) { len = header.len; time = BaseTime + (long)header.ts.tv_sec * 10000000 + (long)header.ts.tv_usec * 10; data = new byte[header.caplen]; for (int i = 0; i < header.caplen; i++) data[i] = pkt[i]; }
internal unsafe Packet(ref pcap_pkthdr header, byte *pkt) { len = header.len; time = BaseTime + (long)header.ts.tv_sec * 10000000 + (long)header.ts.tv_usec * 10; data = new byte[header.caplen]; for (int i = 0; i < header.caplen; i++) { data[i] = pkt[i]; } }
public static extern int pcap_next_ex(pcap_t* handle, ref pcap_pkthdr* header, ref byte* data);