Exemple #1
0
        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];
        }
Exemple #2
0
        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];
            }
        }
Exemple #3
0
 public static extern int pcap_next_ex(pcap_t* handle, ref pcap_pkthdr* header, ref byte* data);