Lines Matching refs:Protocol
72 pub enum Protocol { enum
86 impl fmt::Display for Protocol { implementation
89 Protocol::HopByHop => write!(f, "Hop-by-Hop"), in fmt()
90 Protocol::Icmp => write!(f, "ICMP"), in fmt()
91 Protocol::Igmp => write!(f, "IGMP"), in fmt()
92 Protocol::Tcp => write!(f, "TCP"), in fmt()
93 Protocol::Udp => write!(f, "UDP"), in fmt()
94 Protocol::Ipv6Route => write!(f, "IPv6-Route"), in fmt()
95 Protocol::Ipv6Frag => write!(f, "IPv6-Frag"), in fmt()
96 Protocol::Icmpv6 => write!(f, "ICMPv6"), in fmt()
97 Protocol::Ipv6NoNxt => write!(f, "IPv6-NoNxt"), in fmt()
98 Protocol::Ipv6Opts => write!(f, "IPv6-Opts"), in fmt()
99 Protocol::Unknown(id) => write!(f, "0x{id:02x}"), in fmt()
104 impl From<smoltcp::wire::IpProtocol> for Protocol { implementation
107 Protocol::from(x) in from()
111 impl From<u8> for Protocol { implementation
114 0x00 => Protocol::HopByHop, in from()
115 0x01 => Protocol::Icmp, in from()
116 0x02 => Protocol::Igmp, in from()
117 0x06 => Protocol::Tcp, in from()
118 0x11 => Protocol::Udp, in from()
119 0x2b => Protocol::Ipv6Route, in from()
120 0x2c => Protocol::Ipv6Frag, in from()
121 0x3a => Protocol::Icmpv6, in from()
122 0x3b => Protocol::Ipv6NoNxt, in from()
123 0x3c => Protocol::Ipv6Opts, in from()
124 _ => Protocol::Unknown(value), in from()
129 impl From<Protocol> for u8 {
130 fn from(value: Protocol) -> Self { in from()
132 Protocol::HopByHop => 0x00, in from()
133 Protocol::Icmp => 0x01, in from()
134 Protocol::Igmp => 0x02, in from()
135 Protocol::Tcp => 0x06, in from()
136 Protocol::Udp => 0x11, in from()
137 Protocol::Ipv6Route => 0x2b, in from()
138 Protocol::Ipv6Frag => 0x2c, in from()
139 Protocol::Icmpv6 => 0x3a, in from()
140 Protocol::Ipv6NoNxt => 0x3b, in from()
141 Protocol::Ipv6Opts => 0x3c, in from()
142 Protocol::Unknown(id) => id, in from()