about summary refs log tree commit diff
path: root/src/ethertype.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ethertype.rs')
-rw-r--r--src/ethertype.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/ethertype.rs b/src/ethertype.rs
deleted file mode 100644
index 0d728f3..0000000
--- a/src/ethertype.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-#[derive(Copy, Clone, Debug, PartialEq)]
-pub enum EtherType {
-	/// The frame type is IEEE 802.3 and this is it's length
-	Length(u16),
-	IPv4,
-	IPv6,
-	Unknown(u16),
-}
-
-impl EtherType {
-	//TODO: check ethertype is correct
-	pub fn new(n: u16) -> Self {
-		match n {
-			n if n <= 1500 => Self::Length(n),
-			0x0800 => Self::IPv4,
-			0x86DD => Self::IPv6,
-			n => Self::Unknown(n),
-		}
-	}
-}