mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-10-24 08:02:12 +00:00
updated docs
This commit is contained in:
parent
458bb399db
commit
10b9e061be
26 changed files with 40 additions and 22 deletions
|
|
@ -4,10 +4,10 @@
|
|||
<><> Packets are sniffed from adapter 'en0'
|
||||
<><>
|
||||
<><> Report updates info
|
||||
<><> Report start time: 16/08/2022 15:38:48
|
||||
<><> Report last update: 16/08/2022 15:38:58
|
||||
<><> Report update frequency: every 5 seconds
|
||||
<><> Number of times report was updated: 2
|
||||
<><> Report start time: 16/08/2022 16:25:14
|
||||
<><> Report last update: 16/08/2022 16:26:02
|
||||
<><> Report update frequency: every 2 seconds
|
||||
<><> Number of times report was updated: 20
|
||||
<><>
|
||||
<><> Filters
|
||||
<><> Considering address:port pairs featured by any number of packets
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ fn set_status_by_key(status_pair: Arc<(Mutex<Status>, Condvar)>) {
|
|||
InputEvent::Keyboard(KeyEvent::Char('s')) => {
|
||||
*status = Status::Stop;
|
||||
cvar.notify_all();
|
||||
println!("\n\t{}", "Capture stopped\r".red());
|
||||
println!("\n\t{}", "Capture stopped\n\r".red());
|
||||
return;
|
||||
}
|
||||
_ => { /* Other events */ }
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ use crate::{AddressPort, AppProtocol, ReportInfo, Status, TransProtocol};
|
|||
/// ```-t``` option.
|
||||
///
|
||||
/// * `mutex_map` - Mutex to permit exclusive access to the shared variable in which the parsed packets are inserted.
|
||||
///
|
||||
/// * `status_pair` - Shared variable to check the application current status.
|
||||
pub fn parse_packets_loop(mut cap: Capture<Active>, lowest_port: u16, highest_port: u16,
|
||||
network_layer_filter: String, transport_layer_filter: String,
|
||||
mutex_map: Arc<Mutex<HashMap<AddressPort,ReportInfo>>>,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ use crate::{AddressPort, ReportInfo, Status};
|
|||
/// ```-o``` option.
|
||||
///
|
||||
/// * `mutex_map` - Mutex to permit exclusive access to the shared variable containing the parsed packets.
|
||||
///
|
||||
/// * `status_pair` - Shared variable to check the application current status.
|
||||
pub fn sleep_and_write_report_loop(lowest_port: u16, highest_port: u16, interval: u64, min_packets: u32,
|
||||
device_name: String, network_layer: String, transport_layer: String,
|
||||
output_file: String, mutex_map: Arc<Mutex<HashMap<AddressPort,ReportInfo>>>,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
22c8030a7ec18d42
|
||||
81d1caf43e23eb94
|
||||
|
|
@ -1 +1 @@
|
|||
{"rustc":1057704222874089767,"features":"[]","target":1089383778197212572,"profile":7205898968962111825,"path":1684066648322511884,"deps":[[1007160655150010859,"etherparse",false,2001235469302492025],[2546391497213564629,"crossterm",false,12305349783692866968],[10684445640410993552,"clap",false,518261689120114046],[13706948548054529507,"pcap",false,18010210317093663328],[14419135841914355888,"chrono",false,12893910902775493131],[17707344772896049979,"colored",false,16682548037058840226]],"local":[{"Precalculated":"1660659606.777190526s (src/main.rs)"}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
||||
{"rustc":1057704222874089767,"features":"[]","target":1089383778197212572,"profile":7205898968962111825,"path":1684066648322511884,"deps":[[1007160655150010859,"etherparse",false,2001235469302492025],[2546391497213564629,"crossterm",false,12305349783692866968],[10684445640410993552,"clap",false,518261689120114046],[13706948548054529507,"pcap",false,18010210317093663328],[14419135841914355888,"chrono",false,12893910902775493131],[17707344772896049979,"colored",false,16682548037058840226]],"local":[{"Precalculated":"1660660310.266129890s (src/thread_write_report_functions.rs)"}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This function analyzes the network layer header passed as parameter and updates variables passed by reference on the basis of the packet header content."><meta name="keywords" content="rust, rustlang, rust-lang, analyze_network_header"><title>analyze_network_header in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="analyze_network_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">analyze_network_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#140-176" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn analyze_network_header(<br> network_header: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><IpHeader>, <br> exchanged_bytes: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> network_layer: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> address1: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> address2: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> skip_packet: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This function analyzes the network layer header passed as parameter and updates variables
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="analyze_network_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">analyze_network_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#142-178" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn analyze_network_header(<br> network_header: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><IpHeader>, <br> exchanged_bytes: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> network_layer: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> address1: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> address2: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> skip_packet: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This function analyzes the network layer header passed as parameter and updates variables
|
||||
passed by reference on the basis of the packet header content.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="This function analyzes the transport layer header passed as parameter and updates variables passed by reference on the basis of the packet header content."><meta name="keywords" content="rust, rustlang, rust-lang, analyze_transport_header"><title>analyze_transport_header in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="analyze_transport_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">analyze_transport_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#212-251" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn analyze_transport_header(<br> transport_header: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><TransportHeader>, <br> transport_layer: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> port1: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> port2: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> application_protocol_1: &mut <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: &mut <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> transport_protocol: &mut <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> skip_packet: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This function analyzes the transport layer header passed as parameter and updates variables
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="analyze_transport_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">analyze_transport_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#214-253" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn analyze_transport_header(<br> transport_header: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><TransportHeader>, <br> transport_layer: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> port1: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> port2: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> application_protocol_1: &mut <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: &mut <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: &mut <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> transport_protocol: &mut <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> skip_packet: &mut <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.bool.html">bool</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This function analyzes the transport layer header passed as parameter and updates variables
|
||||
passed by reference on the basis of the packet header content.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Given an integer in the range `0..=65535`, this function returns an `Option<AppProtocol>` containing the respective application protocol represented by a value of the `AppProtocol` enum. Only the most common application layer protocols are considered; if a unknown port number is provided, this function returns `None`."><meta name="keywords" content="rust, rustlang, rust-lang, from_port_to_application_protocol"><title>from_port_to_application_protocol in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="from_port_to_application_protocol" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">from_port_to_application_protocol</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#376-398" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn from_port_to_application_protocol(port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given an integer in the range <code>0..=65535</code>, this function returns an <code>Option<AppProtocol></code> containing
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="from_port_to_application_protocol" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">from_port_to_application_protocol</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#378-400" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn from_port_to_application_protocol(port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given an integer in the range <code>0..=65535</code>, this function returns an <code>Option<AppProtocol></code> containing
|
||||
the respective application protocol represented by a value of the <code>AppProtocol</code> enum.
|
||||
Only the most common application layer protocols are considered; if a unknown port number
|
||||
is provided, this function returns <code>None</code>.</p>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Function to insert the destination of a packet into the shared map containing the analyzed traffic."><meta name="keywords" content="rust, rustlang, rust-lang, modify_or_insert_destination_in_map"><title>modify_or_insert_destination_in_map in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="modify_or_insert_destination_in_map" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">modify_or_insert_destination_in_map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#323-352" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn modify_or_insert_destination_in_map(<br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> key: <a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <br> exchanged_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> transport_protocol: <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> application_protocol_1: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Function to insert the destination of a packet into the shared map containing the analyzed traffic.</p>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="modify_or_insert_destination_in_map" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">modify_or_insert_destination_in_map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#325-354" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn modify_or_insert_destination_in_map(<br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> key: <a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <br> exchanged_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> transport_protocol: <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> application_protocol_1: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Function to insert the destination of a packet into the shared map containing the analyzed traffic.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Function to insert the source of a packet into the shared map containing the analyzed traffic."><meta name="keywords" content="rust, rustlang, rust-lang, modify_or_insert_source_in_map"><title>modify_or_insert_source_in_map in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="modify_or_insert_source_in_map" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">modify_or_insert_source_in_map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#272-301" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn modify_or_insert_source_in_map(<br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> key: <a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <br> exchanged_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> transport_protocol: <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> application_protocol_1: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Function to insert the source of a packet into the shared map containing the analyzed traffic.</p>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="modify_or_insert_source_in_map" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">modify_or_insert_source_in_map</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#274-303" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn modify_or_insert_source_in_map(<br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> key: <a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <br> exchanged_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> transport_protocol: <a class="enum" href="../report_info/enum.TransProtocol.html" title="enum packet_sniffer::report_info::TransProtocol">TransProtocol</a>, <br> application_protocol_1: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocol_2: <a class="enum" href="https://doc.rust-lang.org/1.59.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>>, <br> application_protocols: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a><<a class="enum" href="../report_info/enum.AppProtocol.html" title="enum packet_sniffer::report_info::AppProtocol">AppProtocol</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Function to insert the source of a packet into the shared map containing the analyzed traffic.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The calling thread enters in a loop in which it waits for network packets, parses them according to the user specified filters, and inserts them into the shared map variable."><meta name="keywords" content="rust, rustlang, rust-lang, parse_packets_loop"><title>parse_packets_loop in packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="parse_packets_loop" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">parse_packets_loop</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#33-115" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn parse_packets_loop(<br> cap: Capture<Active>, <br> lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> network_layer_filter: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> transport_layer_filter: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> status_pair: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="enum" href="../enum.Status.html" title="enum packet_sniffer::Status">Status</a>>, <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/condvar/struct.Condvar.html" title="struct std::sync::condvar::Condvar">Condvar</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The calling thread enters in a loop in which it waits for network packets, parses them according
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a></h2><div id="sidebar-vars" data-name="parse_packets_loop" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_parse_packets_functions</a>::<wbr><a class="fn" href="#">parse_packets_loop</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#35-117" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn parse_packets_loop(<br> cap: Capture<Active>, <br> lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> network_layer_filter: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> transport_layer_filter: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> mutex_map: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="struct" href="https://doc.rust-lang.org/1.59.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../address_port/struct.AddressPort.html" title="struct packet_sniffer::address_port::AddressPort">AddressPort</a>, <a class="struct" href="../report_info/struct.ReportInfo.html" title="struct packet_sniffer::report_info::ReportInfo">ReportInfo</a>>>>, <br> status_pair: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">(</a><a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/mutex/struct.Mutex.html" title="struct std::sync::mutex::Mutex">Mutex</a><<a class="enum" href="../enum.Status.html" title="enum packet_sniffer::Status">Status</a>>, <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/sync/condvar/struct.Condvar.html" title="struct std::sync::condvar::Condvar">Condvar</a><a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.tuple.html">)</a>><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The calling thread enters in a loop in which it waits for network packets, parses them according
|
||||
to the user specified filters, and inserts them into the shared map variable.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
@ -26,6 +26,9 @@ through the <code>-h</code> option.</p>
|
|||
<li>
|
||||
<p><code>mutex_map</code> - Mutex to permit exclusive access to the shared variable in which the parsed packets are inserted.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>status_pair</code> - Shared variable to check the application current status.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div></details></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="packet_sniffer" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||||
</body></html>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Module containing functions executed by the thread in charge of parsing sniffed packets and inserting them in the shared map."><meta name="keywords" content="rust, rustlang, rust-lang, thread_parse_packets_functions"><title>packet_sniffer::thread_parse_packets_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Module thread_parse_packets_functions</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="thread_parse_packets_functions" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">packet_sniffer</a>::<wbr><a class="mod" href="#">thread_parse_packets_functions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#1-398" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Module containing functions executed by the thread in charge of parsing sniffed packets and
|
||||
</a><h2 class="location">Module thread_parse_packets_functions</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="thread_parse_packets_functions" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">packet_sniffer</a>::<wbr><a class="mod" href="#">thread_parse_packets_functions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_parse_packets_functions.rs.html#1-400" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Module containing functions executed by the thread in charge of parsing sniffed packets and
|
||||
inserting them in the shared map.</p>
|
||||
</div></details><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.analyze_network_header.html" title="packet_sniffer::thread_parse_packets_functions::analyze_network_header fn">analyze_network_header</a></div><div class="item-right docblock-short"><p>This function analyzes the network layer header passed as parameter and updates variables
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Given the minimum packets number, the function generates the corresponding String to be used in the output report file header."><meta name="keywords" content="rust, rustlang, rust-lang, get_min_packets_string"><title>get_min_packets_string in packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_min_packets_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_min_packets_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#122-129" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_min_packets_string(min_packets: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the minimum packets number, the function generates the corresponding String
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_min_packets_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_min_packets_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#124-131" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_min_packets_string(min_packets: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the minimum packets number, the function generates the corresponding String
|
||||
to be used in the output report file header.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Given the network layer textual filter, the function generates the corresponding String to be used in the output report file header."><meta name="keywords" content="rust, rustlang, rust-lang, get_network_layer_string"><title>get_network_layer_string in packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_network_layer_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_network_layer_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#139-149" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_network_layer_string(network_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the network layer textual filter, the function generates the corresponding String
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_network_layer_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_network_layer_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#141-151" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_network_layer_string(network_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the network layer textual filter, the function generates the corresponding String
|
||||
to be used in the output report file header.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Given the lowest and highest port numbers, the function generates the corresponding String to be used in the output report file header."><meta name="keywords" content="rust, rustlang, rust-lang, get_ports_string"><title>get_ports_string in packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_ports_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_ports_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#102-112" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_ports_string(lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the lowest and highest port numbers, the function generates the corresponding String
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_ports_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_ports_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#104-114" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_ports_string(lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the lowest and highest port numbers, the function generates the corresponding String
|
||||
to be used in the output report file header.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Given the transport layer textual filter, the function generates the corresponding String to be used in the output report file header."><meta name="keywords" content="rust, rustlang, rust-lang, get_transport_layer_string"><title>get_transport_layer_string in packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_transport_layer_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_transport_layer_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#159-169" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_transport_layer_string(transport_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the transport layer textual filter, the function generates the corresponding String
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="get_transport_layer_string" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">get_transport_layer_string</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#161-171" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn get_transport_layer_string(transport_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given the transport layer textual filter, the function generates the corresponding String
|
||||
to be used in the output report file header.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Writes the output report file header, which contains useful info about the sniffing process."><meta name="keywords" content="rust, rustlang, rust-lang, write_report_file_header"><title>write_report_file_header in packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="write_report_file_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">write_report_file_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#227-259" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn write_report_file_header(<br> output: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>, <br> device_name: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> first_timestamp: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> times_report_updated: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, <br> interval: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u64.html">u64</a>, <br> lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> min_packets: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> network_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> transport_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Writes the output report file header, which contains useful info about the sniffing process.</p>
|
||||
</a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a></h2><div id="sidebar-vars" data-name="write_report_file_header" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">packet_sniffer</a>::<wbr><a href="index.html">thread_write_report_functions</a>::<wbr><a class="fn" href="#">write_report_file_header</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#229-261" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn write_report_file_header(<br> output: <a class="struct" href="https://doc.rust-lang.org/1.59.0/std/fs/struct.File.html" title="struct std::fs::File">File</a>, <br> device_name: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> first_timestamp: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> times_report_updated: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a>, <br> interval: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u64.html">u64</a>, <br> lowest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> highest_port: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a>, <br> min_packets: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>, <br> network_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br> transport_layer: <a class="struct" href="https://doc.rust-lang.org/1.59.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a><br>)</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Writes the output report file header, which contains useful info about the sniffing process.</p>
|
||||
<h2 id="arguments" class="section-header"><a href="#arguments">Arguments</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Module containing functions executed by the thread in charge of updating the output report every `interval` seconds, with `interval` specified by the user through the `-i` command line option."><meta name="keywords" content="rust, rustlang, rust-lang, thread_write_report_functions"><title>packet_sniffer::thread_write_report_functions - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
|
||||
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../../packet_sniffer/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></div>
|
||||
</a><h2 class="location">Module thread_write_report_functions</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="thread_write_report_functions" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">packet_sniffer</a>::<wbr><a class="mod" href="#">thread_write_report_functions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#1-259" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Module containing functions executed by the thread in charge of updating the output report
|
||||
</a><h2 class="location">Module thread_write_report_functions</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="thread_write_report_functions" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../packet_sniffer/index.html"><img class="rust-logo" src="../../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">packet_sniffer</a>::<wbr><a class="mod" href="#">thread_write_report_functions</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/packet_sniffer/thread_write_report_functions.rs.html#1-261" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Module containing functions executed by the thread in charge of updating the output report
|
||||
every <code>interval</code> seconds, with <code>interval</code> specified by the user through the
|
||||
<code>-i</code> command line option.</p>
|
||||
<p>If the <code>-i</code> option is not specified, the report is updated every 5 seconds.</p>
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@
|
|||
<span class="ident">InputEvent::Keyboard</span>(<span class="ident">KeyEvent::Char</span>(<span class="string">'s'</span>)) => {
|
||||
<span class="kw-2">*</span><span class="ident">status</span> <span class="op">=</span> <span class="ident">Status::Stop</span>;
|
||||
<span class="ident">cvar</span>.<span class="ident">notify_all</span>();
|
||||
<span class="macro">println!</span>(<span class="string">"\n\t{}"</span>, <span class="string">"Capture stopped\r"</span>.<span class="ident">red</span>());
|
||||
<span class="macro">println!</span>(<span class="string">"\n\t{}"</span>, <span class="string">"Capture stopped\n\r"</span>.<span class="ident">red</span>());
|
||||
<span class="kw">return</span>;
|
||||
}
|
||||
<span class="kw">_</span> => { <span class="comment">/* Other events */</span> }
|
||||
|
|
|
|||
|
|
@ -398,6 +398,8 @@
|
|||
<span id="396">396</span>
|
||||
<span id="397">397</span>
|
||||
<span id="398">398</span>
|
||||
<span id="399">399</span>
|
||||
<span id="400">400</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Module containing functions executed by the thread in charge of parsing sniffed packets and</span>
|
||||
<span class="doccomment">//! inserting them in the shared map.</span>
|
||||
|
||||
|
|
@ -430,6 +432,8 @@
|
|||
<span class="doccomment">/// ```-t``` option.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// * `mutex_map` - Mutex to permit exclusive access to the shared variable in which the parsed packets are inserted.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// * `status_pair` - Shared variable to check the application current status.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">parse_packets_loop</span>(<span class="kw-2">mut</span> <span class="ident">cap</span>: <span class="ident">Capture</span><span class="op"><</span><span class="ident">Active</span><span class="op">></span>, <span class="ident">lowest_port</span>: <span class="ident">u16</span>, <span class="ident">highest_port</span>: <span class="ident">u16</span>,
|
||||
<span class="ident">network_layer_filter</span>: <span class="ident">String</span>, <span class="ident">transport_layer_filter</span>: <span class="ident">String</span>,
|
||||
<span class="ident">mutex_map</span>: <span class="ident">Arc</span><span class="op"><</span><span class="ident">Mutex</span><span class="op"><</span><span class="ident">HashMap</span><span class="op"><</span><span class="ident">AddressPort</span>,<span class="ident">ReportInfo</span><span class="op">></span><span class="op">></span><span class="op">></span>,
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@
|
|||
<span id="257">257</span>
|
||||
<span id="258">258</span>
|
||||
<span id="259">259</span>
|
||||
<span id="260">260</span>
|
||||
<span id="261">261</span>
|
||||
</pre><pre class="rust"><code><span class="doccomment">//! Module containing functions executed by the thread in charge of updating the output report</span>
|
||||
<span class="doccomment">//! every ```interval``` seconds, with ```interval``` specified by the user through the</span>
|
||||
<span class="doccomment">//! ```-i``` command line option.</span>
|
||||
|
|
@ -307,6 +309,8 @@
|
|||
<span class="doccomment">/// ```-o``` option.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// * `mutex_map` - Mutex to permit exclusive access to the shared variable containing the parsed packets.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// * `status_pair` - Shared variable to check the application current status.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">sleep_and_write_report_loop</span>(<span class="ident">lowest_port</span>: <span class="ident">u16</span>, <span class="ident">highest_port</span>: <span class="ident">u16</span>, <span class="ident">interval</span>: <span class="ident">u64</span>, <span class="ident">min_packets</span>: <span class="ident">u32</span>,
|
||||
<span class="ident">device_name</span>: <span class="ident">String</span>, <span class="ident">network_layer</span>: <span class="ident">String</span>, <span class="ident">transport_layer</span>: <span class="ident">String</span>,
|
||||
<span class="ident">output_file</span>: <span class="ident">String</span>, <span class="ident">mutex_map</span>: <span class="ident">Arc</span><span class="op"><</span><span class="ident">Mutex</span><span class="op"><</span><span class="ident">HashMap</span><span class="op"><</span><span class="ident">AddressPort</span>,<span class="ident">ReportInfo</span><span class="op">></span><span class="op">></span><span class="op">></span>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue