Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etherparse/src/net/ipv4_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use arrayvec::ArrayVec;
/// assert_eq!(header, decoded);
/// assert_eq!(slice_rest, &[]);
/// ```
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
pub struct Ipv4Header {
/// Differentiated Services Code Point
pub dscp: IpDscp,
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/net/ipv4_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use core::borrow::{Borrow, BorrowMut};
/// assert_eq!(result, Err(BadOptionsLen { bad_len: 3 }));
/// }
/// ```
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct Ipv4Options {
pub(crate) len: u8,
pub(crate) buf: [u8; 40],
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/net/ipv6_header.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{err::ValueTooBigError, *};

/// IPv6 header according to rfc8200.
#[derive(Clone, Debug, Eq, PartialEq, Default)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Default, PartialOrd, Ord)]
pub struct Ipv6Header {
pub traffic_class: u8,
/// If non 0 serves as a hint to router and switches with multiple outbound paths that these packets should stay on the same path, so that they will not be reordered.
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/transport/tcp_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub const TCP_MAXIMUM_DATA_OFFSET: u8 = 0xf;
/// TCP header according to rfc 793.
///
/// Field descriptions copied from RFC 793 page 15++
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
pub struct TcpHeader {
/// The source port number.
pub source_port: u16,
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/transport/tcp_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ use crate::{tcp_option, TcpHeader, TcpOptionElement, TcpOptionWriteError, TcpOpt
/// ]
/// );
/// ```
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct TcpOptions {
/// Number of bytes in the buffer.
pub(crate) len: u8,
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/transport/udp_header.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{err::ValueTooBigError, *};

/// Udp header according to rfc768.
#[derive(Clone, Debug, Eq, PartialEq, Default)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Default, PartialOrd, Ord)]
pub struct UdpHeader {
/// Source port of the packet (optional).
pub source_port: u16,
Expand Down