Skip to content

Add specific enum value to pcap::Error for an interface that has disappeared #393

@GyulyVGC

Description

@GyulyVGC

Currently if you are capturing packets from an interface and such interface is taken down, the next_packet method will indefinitely throw a generic PcapError("The interface disappeared").

If possible, it'd be better to add a new enum value just for this specific error to better identify it in a robust and platform-independent way.
For example this could be useful to break the associated loop.
This is particularly significant since, at least on macOS, such capture will always return that error even in case the corresponding interface is brought back up.

Related issue that would benefit from this: GyulyVGC/sniffnet#1028

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