Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
0xphen committed Nov 8, 2023
1 parent cf206ae commit 7869382
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub mod parsers;
pub mod parsers;
9 changes: 8 additions & 1 deletion src/parsers/ethernet_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,19 @@ impl EthernetFrame {
/// Constructs an `EthernetFrame` from a slice of bytes.
///
/// This function parses the bytes to form an Ethernet frame, accounting for the presence
/// of an optional VLAN tag and an optional Frame Check Sequence (FCS).
/// of an optional VLAN tag and an optional Frame Check Sequence (FCS). The `fcs_enabled` flag
/// indicates whether the parser should expect and parse the FCS. This flag is needed because
/// the inclusion of the FCS in the captured packet data can vary depending on the network interface
/// configuration. Some network setups or packet capture software may strip the FCS during
/// capture, hence the need for a flag to accommodate both scenarios.
///
/// # Arguments
///
/// * `frame`: A byte slice representing the Ethernet frame.
/// * `fcs_enabled`: A boolean indicating whether the FCS should be expected and parsed.
/// This is necessary because not all packet captures include the FCS.
/// It is typically stripped by the NIC before packet data is passed to the capturing
/// software, and only included if the capture setup explicitly preserves it.
///
/// # Returns
///
Expand Down

0 comments on commit 7869382

Please sign in to comment.