-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some nit-picky comments but looks good!
/// Print detailed information about a network packet. | ||
/// | ||
/// This function takes an `IntermediateBuffer` containing a network packet and prints various | ||
/// details about the packet, such as Ethernet, IPv4, IPv6, ICMPv4, ICMPv6, UDP, and TCP information. | ||
/// | ||
/// # Arguments | ||
/// | ||
/// * `packet` - A mutable reference to an `ndisapi::IntermediateBuffer` containing the network packet. | ||
/// | ||
/// # Examples | ||
/// | ||
/// ```no_run | ||
/// let mut packet: ndisapi::IntermediateBuffer = ...; | ||
/// print_packet_info(&mut packet); | ||
/// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functions in example are not exposed therefore docs aren't generated.
So we shouldn't write examples here or comments with ///
. We can just write:
// Print into stdout detailed information about a network packet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
/// Print detailed information about a network packet. | ||
/// | ||
/// This function takes an `IntermediateBuffer` containing a network packet and prints various | ||
/// details about the packet, such as Ethernet, IPv4, IPv6, ICMPv4, ICMPv6, UDP, and TCP information. | ||
/// | ||
/// # Arguments | ||
/// | ||
/// * `packet` - A mutable reference to an `ndisapi::IntermediateBuffer` containing the network packet. | ||
/// | ||
/// # Examples | ||
/// | ||
/// ```no_run | ||
/// let mut packet: ndisapi::IntermediateBuffer = ...; | ||
/// print_packet_info(&mut packet); | ||
/// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above for comments in examples
@@ -174,3 +118,85 @@ fn main() -> Result<()> { | |||
|
|||
Ok(()) | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
No description provided.