Struct windivert_sys::WinDivertFlags [−][src]
#[repr(transparent)]pub struct WinDivertFlags(_);Expand description
Flag type required by WinDivertOpen(). It follows a builder like style.
Different flags affect how the opened handle behaves. The following flags are supported:
sniff: This flag opens the WinDivert handle inpacket sniffingmode. In packet sniffing mode the original packet is not dropped-and-diverted (the default) but copied-and-diverted. This mode is useful for implementing packet sniffing tools similar to those applications that currently use Winpcap.drop: This flag indicates that the user application does not intend to read matching packets withrecv()(or any of it’s variants), instead the packets should be silently dropped. This is useful for implementing simple packet filters using the WinDivert filter language.recv_only: This flags forces the handle into receive only mode which effectively disablessend()(and any of it’s variants). This means that it is possible to block/capture packets or events but not inject them.send_only: This flags forces the handle into send only mode which effectively disablesrecv()(and any of it’s variants). This means that it is possible to inject packets or events, but not block/capture them.no_installs: This flags causesWinDivertOpento fail with ERROR_SERVICE_DOES_NOT_EXIST (1060) if the WinDivert driver is not already installed. This flag is useful for querying the WinDivert driver state usingReflectlayer.fragments: If set, the handle will capture inbound IP fragments, but not inbound reassembled IP packets. Otherwise, if not set (the default), the handle will capture inbound reassembled IP packets, but not inbound IP fragments. This flag only affects inbound packets at theNetworklayer, else the flag is ignored. Note that any combination of (snif|drop) or (recv_only|send_only) are considered invalid.
Some layers have mandatory flags:
WinDivertLayer::Flow: (sniff|recv_only)WinDivertLayer::Reflect: (sniff|recv_only)
Implementations
WinDivertFlags builder methods.
Unsets sniff flag.
Unsets drop flag.
Sets recv_only flag
Unsets recv_only flag
Sets send_only flag.
Unsets send_only flag.
Sets no_installs flag.
Unsets no_installs flag.
Sets fragments flag.
Unsets fragments flag.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for WinDivertFlags
impl Send for WinDivertFlags
impl Sync for WinDivertFlags
impl Unpin for WinDivertFlags
impl UnwindSafe for WinDivertFlags
Blanket Implementations
Mutably borrows from an owned value. Read more
