parent
728ae3fbb5
commit
126f144295
|
@ -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 |
|
||||
|
|
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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],
|
||||
},
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue