Skip to content

Commit

Permalink
Merge pull request #609 from darxriggs/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
mrmonday committed Mar 21, 2023
2 parents b82d042 + 3189dc4 commit f5ab216
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benches/rs_sender.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit f5ab216

Please sign in to comment.