Skip to content
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

Fix typos #609

Merged
merged 1 commit into from Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion benches/rs_sender.rs
Expand Up @@ -44,7 +44,7 @@ pub fn build_ipv4_header(packet: &mut [u8]) -> MutableIpv4Packet {
pub fn build_udp_header(packet: &mut [u8]) -> MutableUdpPacket {
let mut udp_header = MutableUdpPacket::new(packet).unwrap();

udp_header.set_source(1234); // Arbitary port number
udp_header.set_source(1234); // Arbitrary port number
udp_header.set_destination(1234);
udp_header.set_length((UDP_HEADER_LEN + TEST_DATA_LEN) as u16);

Expand Down
4 changes: 2 additions & 2 deletions pnet_macros_support/src/packet.rs
Expand Up @@ -50,10 +50,10 @@ impl<T: Packet> Packet for &T {

/// Represents a generic, mutable, network packet.
pub trait MutablePacket: Packet {
/// Retreive the underlying, mutable, buffer for the packet.
/// Retrieve the underlying, mutable, buffer for the packet.
fn packet_mut(&mut self) -> &mut [u8];

/// Retreive the mutable payload for the packet.
/// Retrieve the mutable payload for the packet.
fn payload_mut(&mut self) -> &mut [u8];

/// Initialize this packet by cloning another.
Expand Down
2 changes: 1 addition & 1 deletion src/pnettest.rs
Expand Up @@ -80,7 +80,7 @@ fn build_ipv6_header(packet: &mut [u8], offset: usize) {
fn build_udp_header(packet: &mut [u8], offset: usize) {
let mut udp_header = MutableUdpPacket::new(&mut packet[offset..]).expect("could not create MutableUdpPacket");

udp_header.set_source(1234); // Arbitary port number
udp_header.set_source(1234); // Arbitrary port number
udp_header.set_destination(1234);
udp_header.set_length((UDP_HEADER_LEN + TEST_DATA_LEN) as u16);
}
Expand Down