pub struct Config {
pub device_name: Option<String>,
pub filter: Option<String>,
pub server_port: Vec<u16>,
pub known_seeds: String,
}Expand description
Configuration used for the sniffer.
This does not include any programmable logic.
Fields§
§device_name: Option<String>This is the name of the capturing device to use.
The name can be found with pcap_findalldevs.
When left blank, the first active device is used.
filter: Option<String>This is the filter to apply to the capture device. A blank filter can result in the program receiving more traffic than necessary.
When left blank, no filter is applied.
§Default
udp portrange 22101-22102
server_port: Vec<u16>A list of ports which the server listens for traffic on. This is used for determining if a packet is incoming or outgoing.
This cannot be left blank.
§Default
[22101, 22102]
known_seeds: StringThe path to a file containing known seeds. The specific path needs to be readable and writable.
This cannot be left blank.
§Default
known_seeds.txt
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more