Struct netscan::PortScanner [−][src]
pub struct PortScanner {Show 13 fields
pub if_index: u32,
pub if_name: String,
pub src_mac: MacAddr,
pub dst_mac: MacAddr,
pub src_ip: IpAddr,
pub dst_ip: IpAddr,
pub src_port: u16,
pub dst_ports: Vec<u16>,
pub scan_type: PortScanType,
pub timeout: Duration,
pub wait_time: Duration,
pub send_rate: Duration,
pub scan_result: PortScanResult,
}
Expand description
Structure for port scan with various options.
Should be constructed using PortScanner::new
Fields
if_index: u32
Index of network interface
if_name: String
Name of network interface
src_mac: MacAddr
Source MAC Address
dst_mac: MacAddr
Destination MAC Address
src_ip: IpAddr
Source IP Address
dst_ip: IpAddr
Destination IP Address
src_port: u16
Source port
dst_ports: Vec<u16>
Destination port
scan_type: PortScanType
Type of port scan. Default is PortScanType::SynScan
timeout: Duration
Timeout setting of port scan
wait_time: Duration
Wait time after send task is finished
send_rate: Duration
Packet send rate
scan_result: PortScanResult
Result of port scan
Implementations
Construct new PortScanner (with network interface name)
Specify None for default. PortScanner::new(None)
Set source IP address
Set destination IP address
Set source port number
Add destination port
Set range of destination ports (by start and end)
Set the destination port list (Replace the entire destination list)
Set PortScanType. Default is PortScanType::SynScan
Set scan timeout
Set scan wait-time
Set packet send rate
Set scan result
Get network interface index
Get network interface name
Get source ip address
Get destination ip address
Get source port
Get destination ports
Get PortScanType
Get timeout
Get wait-time
Get send rate
Get scan result
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PortScanner
impl Send for PortScanner
impl Sync for PortScanner
impl Unpin for PortScanner
impl UnwindSafe for PortScanner
Blanket Implementations
Mutably borrows from an owned value. Read more