ndisapi/lib.rs
1//! The NDISAPI crate is a Rust library that provides functionality for capturing and filtering network packets
2//! on Windows operating systems. The crate contains the following main modules: driver, ndisapi, async_api, and main.
3//!
4//! ## driver
5//! The driver module provides low-level functionality for interacting with Windows Packet Filter driver, and is used
6//! by the ndisapi module to capture and filter network packets.
7//!
8//! ## ndisapi
9//! The ndisapi module contains the main functionality for capturing and filtering network packets.
10//! This includes various structs and enums for representing packet data and filter settings, as well as an Ndisapi
11//! struct for interacting with the driver and performing packet capture and filtering operations.
12//!
13//! ## async_io
14//! The async_io module provides asynchronous methods for managing and interacting with the network adapter. This includes
15//! reading and writing Ethernet packets, and adjusting adapter settings. This is achieved through the use of `async` functions,
16//! which allow these operations to be performed without blocking the rest of your application.
17//!
18//! ## netlib
19//! The netlib module provides functionality for interacting with the Windows IP Helper API. This includes structs and enums
20//! for representing network adapter information, IP addresses, and other network-related data.
21
22mod async_api;
23mod driver;
24mod ndisapi;
25mod netlib;
26
27pub use crate::ndisapi::{
28 ByteRange, DataLinkLayerFilter, DataLinkLayerFilterUnion, DirectionFlags, Eth8023Filter,
29 Eth802_3FilterFlags, EthMRequest, EthMRequestMut, EthPacket, EthPacketMut, EthRequest,
30 EthRequestMut, FastIoSection, FastIoSectionHeader, FilterFlags, FilterLayerFlags, IcmpFilter,
31 IcmpFilterFlags, IntermediateBuffer, IntermediateBufferArray, IntermediateBufferArrayMut,
32 IpAddressV4, IpAddressV4Union, IpAddressV6, IpAddressV6Union, IpRangeV4, IpRangeV6, IpSubnetV4,
33 IpSubnetV6, IpV4Filter, IpV4FilterFlags, IpV6Filter, IpV6FilterFlags, Ndisapi,
34 NetworkAdapterInfo, NetworkLayerFilter, NetworkLayerFilterUnion, PacketOidData, PortRange,
35 RasLinks, StaticFilter, StaticFilterTable, TcpUdpFilter, TcpUdpFilterFlags,
36 TransportLayerFilter, TransportLayerFilterUnion, UnsortedReadRequest, UnsortedSendRequest,
37 Version, ETHER_ADDR_LENGTH, ETH_802_3, FILTER_PACKET_DROP, FILTER_PACKET_DROP_RDR,
38 FILTER_PACKET_PASS, FILTER_PACKET_PASS_RDR, FILTER_PACKET_REDIRECT, ICMP, IPV4, IPV6,
39 IP_RANGE_V4_TYPE, IP_RANGE_V6_TYPE, IP_SUBNET_V4_TYPE, IP_SUBNET_V6_TYPE, TCPUDP,
40};
41
42pub use crate::async_api::AsyncNdisapiAdapter;
43
44pub use crate::netlib::ip_helper::{
45 guid_wrapper::GuidWrapper, if_luid::IfLuid, ip_gateway_info::IpGatewayInfo,
46 network_adapter_info::IphlpNetworkAdapterInfo, sockaddr_storage::SockAddrStorage,
47};
48
49pub use netlib::net::MacAddress;