private void Loop() { this.callback = new dotnetWinpCap.packet_handler(this.LoopCallback); IntPtr ptr1 = IntPtr.Zero; new HandleRef(this.callback, ptr1); dotnetWinpCap.pcap_loop(this.pcap_t, 0, this.callback, IntPtr.Zero); }
public dotnetWinpCap() { this.ListenThread = null; this.disposed = false; this.callback = null; this.fname = ""; this.maxb = 0; this.maxp = 0; this.m_islistening = false; this.m_isopen = false; this.m_attachedDevice = null; this.pcap_t = IntPtr.Zero; this.dumper = IntPtr.Zero; this.errbuf = new StringBuilder(0x100); }
private static extern int pcap_loop(IntPtr p, int cnt, packet_handler callback, IntPtr user);
public static extern int pcap_loop(IntPtr pcap_t, int count, packet_handler packet_handler, int id);