Skip to content

Commit

Permalink
Update docs and fix warnings
Browse files Browse the repository at this point in the history
Closes: #238
Approved by: dlrobertson
  • Loading branch information
dlrobertson authored and Homu committed Jun 18, 2018
1 parent 06d1813 commit 8f9ac1d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -72,7 +72,7 @@
//! | ARP | Yes | Yes |
//! | IPv4 | Yes | Yes |
//! | ICMPv4 | Yes | Yes |
//! | IGMPv1/2 | Yes | No |
//! | IGMPv1/2 | Yes | Yes |
//! | IPv6 | Yes | Yes |
//! | ICMPv6 | Yes | Yes |
//! | TCP | Yes | Yes |
Expand Down
10 changes: 5 additions & 5 deletions src/socket/icmp.rs
Expand Up @@ -38,15 +38,15 @@ impl Default for Endpoint {
fn default() -> Endpoint { Endpoint::Unspecified }
}

/// An ICMPv4 packet metadata.
/// An ICMP packet metadata.
pub type IcmpPacketMetadata = PacketMetadata<IpAddress>;

/// An ICMPv4 packet ring buffer.
/// An ICMP packet ring buffer.
pub type IcmpSocketBuffer<'a, 'b> = PacketBuffer<'a, 'b, IpAddress>;

/// An ICMPv4 socket
/// A ICMP socket
///
/// An ICMPv4 socket is bound to a specific [IcmpEndpoint] which may
/// An ICMP socket is bound to a specific [IcmpEndpoint] which may
/// be a sepecific UDP port to listen for ICMP error messages related
/// to the port or a specific ICMP identifier value. See [bind] for
/// more details.
Expand All @@ -65,7 +65,7 @@ pub struct IcmpSocket<'a, 'b: 'a> {
}

impl<'a, 'b> IcmpSocket<'a, 'b> {
/// Create an ICMPv4 socket with the given buffers.
/// Create an ICMP socket with the given buffers.
pub fn new(rx_buffer: IcmpSocketBuffer<'a, 'b>,
tx_buffer: IcmpSocketBuffer<'a, 'b>) -> IcmpSocket<'a, 'b> {
IcmpSocket {
Expand Down
2 changes: 1 addition & 1 deletion src/wire/icmpv6.rs
Expand Up @@ -398,7 +398,7 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
/// Set the pointer field (for parameter problem messages).
///
/// # Panics
/// This function may panic if this packet
/// This function may panic if this packet is not a parameter problem message.
#[inline]
pub fn set_param_problem_ptr(&mut self, value: u32) {
let data = self.buffer.as_mut();
Expand Down
12 changes: 6 additions & 6 deletions src/wire/ipv6routing.rs
Expand Up @@ -234,7 +234,7 @@ impl<T: AsRef<[u8]>> Header<T> {
}


/// Return the number of prefix octects elided from the last address (addresses[n]).
/// Return the number of prefix octects elided from the last address (`addresses[n]`).
///
/// # Panics
/// This function may panic if this header is not the RPL Source Routing Header routing type.
Expand All @@ -243,7 +243,7 @@ impl<T: AsRef<[u8]>> Header<T> {
data[field::CMPR] & 0xf
}

/// Return the number of octects used for padding after addresses[n].
/// Return the number of octects used for padding after `addresses[n]`.
///
/// # Panics
/// This function may panic if this header is not the RPL Source Routing Header routing type.
Expand Down Expand Up @@ -344,7 +344,7 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
data[field::CMPR] = raw;
}

/// Set the number of prefix octects elided from the last address (addresses[n]).
/// Set the number of prefix octects elided from the last address (`addresses[n]`).
///
/// # Panics
/// This function may panic if this header is not the RPL Source Routing Header routing type.
Expand All @@ -354,7 +354,7 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
data[field::CMPR] = raw;
}

/// Set the number of octects used for padding after addresses[n].
/// Set the number of octects used for padding after `addresses[n]`.
///
/// # Panics
/// This function may panic if this header is not the RPL Source Routing Header routing type.
Expand Down Expand Up @@ -411,10 +411,10 @@ pub enum Repr<'a> {
cmpr_i: u8,
/// Number of prefix octets from the last segment that are elided.
cmpr_e: u8,
/// Number of octets that are used for padding after Address[n] at the end of the
/// Number of octets that are used for padding after `address[n]` at the end of the
/// RPL Source Route Header.
pad: u8,
/// Vector of addresses, numbered 1 to n.
/// Vector of addresses, numbered 1 to `n`.
addresses: &'a[u8],
},

Expand Down
4 changes: 2 additions & 2 deletions src/wire/ndisc.rs
Expand Up @@ -63,7 +63,7 @@ impl<T: AsRef<[u8]>> Packet<T> {
}
}

/// Getters for the [Neighbor Solicitation], [Neighbor Advertisement], and
/// Common getters for the [Neighbor Solicitation], [Neighbor Advertisement], and
/// [Redirect] message types.
///
/// [Neighbor Solicitation]: https://tools.ietf.org/html/rfc4861#section-4.3
Expand Down Expand Up @@ -158,7 +158,7 @@ impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
}
}

/// Setters for the [Neighbor Solicitation], [Neighbor Advertisement], and
/// Common setters for the [Neighbor Solicitation], [Neighbor Advertisement], and
/// [Redirect] message types.
///
/// [Neighbor Solicitation]: https://tools.ietf.org/html/rfc4861#section-4.3
Expand Down

0 comments on commit 8f9ac1d

Please sign in to comment.