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
6 changes: 6 additions & 0 deletions etherparse/src/err/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ pub enum Layer {
Icmpv4TimestampReply,
/// Error occurred while parsing an ICMPv6 packet.
Icmpv6,
/// Error occurred while parsing an IGMPv1 packet.
Igmpv1,
/// Error occurred while parsing an Address Resolution Protocol packet.
Arp,
}
Expand Down Expand Up @@ -83,6 +85,7 @@ impl Layer {
Icmpv4Timestamp => "ICMP Timestamp Error",
Icmpv4TimestampReply => "ICMP Timestamp Reply Error",
Icmpv6 => "ICMPv6 Packet Error",
Igmpv1 => "IGMPv1 Packet Error",
Arp => "Address Resolution Protocol Packet Error",
}
}
Expand Down Expand Up @@ -116,6 +119,7 @@ impl core::fmt::Display for Layer {
Icmpv4Timestamp => write!(f, "ICMP timestamp message"),
Icmpv4TimestampReply => write!(f, "ICMP timestamp reply message"),
Icmpv6 => write!(f, "ICMPv6 packet"),
Igmpv1 => write!(f, "IGMPv1 packet"),
Arp => write!(f, "Address Resolution Protocol packet"),
}
}
Expand Down Expand Up @@ -185,6 +189,7 @@ mod test {
(Icmpv4Timestamp, "ICMP Timestamp Error"),
(Icmpv4TimestampReply, "ICMP Timestamp Reply Error"),
(Icmpv6, "ICMPv6 Packet Error"),
(Igmpv1, "IGMPv1 Packet Error"),
(Arp, "Address Resolution Protocol Packet Error"),
];
for test in tests {
Expand Down Expand Up @@ -219,6 +224,7 @@ mod test {
(Icmpv4Timestamp, "ICMP timestamp message"),
(Icmpv4TimestampReply, "ICMP timestamp reply message"),
(Icmpv6, "ICMPv6 packet"),
(Igmpv1, "IGMPv1 packet"),
(Arp, "Address Resolution Protocol packet"),
];
for test in tests {
Expand Down
Loading
Loading