Struct netscan::AsyncPortScanner[][src]

pub struct AsyncPortScanner {
    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 async port scan with various options.

Currently only Unix-Like OS is supported.

Should be constructed using AsyncPortScanner::new

Fields

src_ip: IpAddr

Source IP Address

dst_ip: IpAddr

Destination IP Address

src_port: u16

Source port

dst_ports: Vec<u16>

Destination ports

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 AsyncPortScanner

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 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

Run scan with current settings

Results are stored in AsyncPortScanner::scan_result

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.