Skip to content

PacketStream does not set pcap timeout #30

@andrey-shigantsov

Description

@andrey-shigantsov

Hi, thanks for your work!

I started using your library and noticed that the capture cycle returns packets too slowly, although the default timeout is 100ms in the config.
https://github.com/protectwise/pcap-async/blob/master/src/config.rs#L94

I looked at the sources and noticed that the parameter setting is not happening.
https://github.com/protectwise/pcap-async/blob/master/src/stream.rs#L32-L34

I set this parameter manually and the program worked as expected.

pcap_handle.set_timeout(pcap_config.buffer_for())?;
let mut provider = pcap::PacketStream::new(pcap_config, Arc::clone(&pcap_handle))?.boxed();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions