Esempio n. 1
0
 protected override bool ReleaseHandle()
 {
     LibPcapSafeNativeMethods.pcap_freecode(handle);
     //Alocate an unmanaged buffer
     Marshal.FreeHGlobal(handle);
     return(true);
 }
Esempio n. 2
0
        public static void FreeBpfProgram(IntPtr bpfProgram)
        {
            // free any pcap internally allocated memory from pcap_compile()
            LibPcapSafeNativeMethods.pcap_freecode(bpfProgram);

            // free allocated buffers
            Marshal.FreeHGlobal(bpfProgram);
        }