pub fn open_in_immediate_mode(self) -> Result<Capture<Active>, Error> {
        // From version 1.5.0 libpcap handles platform specifics through the
        // library call. Prior to that version, different platforms need to be
        // handled differently. Note that WinPcap is based on 1.0.0.

        #[cfg(pcap_1_5_0)]
        unsafe { raw::pcap_set_immediate_mode(*self.handle, true as _) };

        // Pre-1.5.0 Linux captures are always in immediate mode.

        // Pre-1.5.0 Windows just sets mintocopy to 0 for immediate mode.
        #[cfg(all(windows, not(pcap_1_5_0)))]
        unsafe { raw::pcap_setmintocopy(*self.handle, 0) };

        let active = self.open()?;

        // Pre-1.5.0 BSD/MacOS require an ioctl call to be made on an _active_
        // capture to set immediate mode.
        #[cfg(all(unix, not(target_os = "linux"), not(pcap_1_5_0)))]
        check_ioctl_err(
            unsafe {
                libc::ioctl(
                    raw::pcap_fileno(*active.handle),
                    libc::BIOCIMMEDIATE,
                    &(true as libc::c_uint),
                )
            } >= 0
        )?;

        Ok(active)
    }
/// Activates an inactive capture created from `Capture::from_device()` in
/// immediate mode or returns an error. In immediate mode, packets are
/// always delivered as soon as they arrive, with no buffering.
///
/// On Linux for libpcap versions < 1.5.0 captures are always in immediate
/// mode and this function has the same effect as `open`.
///
/// On Windows (WinPcap) immediate mode changes the value `min_to_copy`
/// value to 0. You should not call `min_to_copy` on captures opened in
/// immediate mode if you want them to stay in immediate mode.
Activates an inactive capture created from `Capture::from_device()` in
immediate mode or returns an error. In immediate mode, packets are
always delivered as soon as they arrive, with no buffering.

On Linux for libpcap versions < 1.5.0 captures are always in immediate
mode and this function has the same effect as `open`.

On Windows (WinPcap) immediate mode changes the value `min_to_copy`
value to 0. You should not call `min_to_copy` on captures opened in
immediate mode if you want them to stay in immediate mode.
Activates an inactive capture created from ` Capture :: from_device () ` in immediate mode or returns an error . In immediate mode packets are always delivered as soon as they arrive with no buffering . On Linux for libpcap versions < 1 . 5 . 0 captures are always in immediate mode and this function has the same effect as ` open ` . On Windows ( WinPcap ) immediate mode changes the value ` min_to_copy ` value to 0 . You should not call ` min_to_copy ` on captures opened in immediate mode if you want them to stay in immediate mode .
pub fn open_in_immediate_mode(self) -> Result<Capture<Active>, Error> {
        // From version 1.5.0 libpcap handles platform specifics through the
        // library call. Prior to that version, different platforms need to be
        // handled differently. Note that WinPcap is based on 1.0.0.
        #[cfg(pcap_1_5_0)]
        unsafe { raw::pcap_set_immediate_mode(*self.handle, true as _) };
        // Pre-1.5.0 Linux captures are always in immediate mode.
        // Pre-1.5.0 Windows just sets mintocopy to 0 for immediate mode.
        #[cfg(all(windows, not(pcap_1_5_0)))]
        unsafe { raw::pcap_setmintocopy(*self.handle, 0) };
        let active = self.open()?;
        // Pre-1.5.0 BSD/MacOS require an ioctl call to be made on an _active_
        // capture to set immediate mode.
        #[cfg(all(unix, not(target_os = "linux"), not(pcap_1_5_0)))]
        check_ioctl_err(
            unsafe {
                libc::ioctl(
                    raw::pcap_fileno(*active.handle),
                    libc::BIOCIMMEDIATE,
                    &(true as libc::c_uint),
                )
            } >= 0
        )?;
        Ok(active)
    }
pub fn open_in_immediate_mode ( self ) -> Result < Capture < Active > , Error > { // From version 1.5.0 libpcap handles platform specifics through the // library call. Prior to that version, different platforms need to be // handled differently. Note that WinPcap is based on 1.0.0. # [ cfg ( pcap_1_5_0 ) ] unsafe { raw :: pcap_set_immediate_mode ( * self . handle , true as _ ) } ; // Pre-1.5.0 Linux captures are always in immediate mode. // Pre-1.5.0 Windows just sets mintocopy to 0 for immediate mode. # [ cfg ( all ( windows not ( pcap_1_5_0 ) ) ) ] unsafe { raw :: pcap_setmintocopy ( * self . handle , 0 ) } ; let active = self . open ( ) ? ; // Pre-1.5.0 BSD/MacOS require an ioctl call to be made on an _active_ // capture to set immediate mode. # [ cfg ( all ( unix not ( target_os " " ) not ( pcap_1_5_0 ) ) ) ] check_ioctl_err ( unsafe { libc :: ioctl ( raw :: pcap_fileno ( * active . handle ) , libc :: BIOCIMMEDIATE , & ( true as libc :: c_uint ) , ) } >= 0 ) ? ; Ok ( active ) }
Activates an inactive capture created from `Capture::from_device()` in
immediate mode or returns an error.
Activates an inactive capture created from ` Capture :: from_device () ` in immediate mode or returns an error .
self
self