1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # Windows Filtering Platform (WFP) Rust library
//!
//! This crate provides a safe Rust library around the Windows Filtering Platform API,
//! allowing you to create and manage network filters on Windows.
//!
//! ## Overview
//!
//! The Windows Filtering Platform is a set of APIs that allow applications to handle
//! filtering and processing of network traffic.
//! This crate provides a type-safe interface to create filters that can block or permit
//! network traffic based on various criteria.
//!
//! ## Basic Usage
//!
//! ```no_run
//! use wfp::{FilterEngineBuilder, FilterBuilder, PortConditionBuilder, ActionType, Layer, Transaction};
//! use std::io;
//!
//! fn main() -> io::Result<()> {
//! // Open a dynamic filter engine session
//! let mut engine = FilterEngineBuilder::default().dynamic().open()?;
//!
//! // Create a transaction for atomic filter operations
//! let transaction = Transaction::new(&mut engine)?;
//!
//! // Create and add a filter
//! FilterBuilder::default()
//! .name("Block outbound connections")
//! .description("Blocks all outbound IPv4 connections")
//! .action(ActionType::Block)
//! .layer(Layer::ConnectV4)
//! .condition(
//! PortConditionBuilder::remote()
//! .equal(80)
//! .build(),
//! )
//! .add(&transaction)?;
//!
//! // Commit the transaction
//! transaction.commit()?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## Examples
//!
//! See the `examples/` directory for more usage examples.
//!
//! Run examples with: `cargo run --example <example>`
// Re-export public API
pub use ActionType;
pub use *;
pub use ;
pub use *;
pub use *;
pub use *;
pub use Transaction;