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