#[repr(u16)]pub enum NetError {
Show 25 variants
PacketTooShort = 1,
PacketTooLarge = 2,
InvalidEthernetFrame = 3,
UnsupportedEtherType = 4,
InvalidIpv4Header = 5,
Ipv4ChecksumError = 6,
InvalidIpVersion = 7,
InvalidIpHeaderLength = 8,
TtlExpired = 9,
InvalidUdpHeader = 10,
UdpChecksumError = 11,
InvalidIcmpHeader = 12,
InvalidArpPacket = 13,
ArpNotFound = 14,
ArpCacheFull = 15,
SocketNotBound = 16,
PortInUse = 17,
NoPortsAvailable = 18,
DestinationUnreachable = 19,
DeviceError = 20,
BufferTooSmall = 21,
WouldBlock = 22,
InvalidPort = 23,
FragmentationNotSupported = 24,
KernelError(u16),
}Expand description
Network error codes.
These errors cover all network stack operations from Ethernet to UDP.
Variants§
PacketTooShort = 1
The packet is too short to contain the expected header.
PacketTooLarge = 2
The packet exceeds the maximum allowed size.
InvalidEthernetFrame = 3
Invalid Ethernet frame format.
UnsupportedEtherType = 4
Unknown or unsupported EtherType.
InvalidIpv4Header = 5
Invalid IPv4 header format or checksum.
Ipv4ChecksumError = 6
IPv4 header checksum mismatch.
InvalidIpVersion = 7
IPv4 version is not 4.
InvalidIpHeaderLength = 8
IPv4 header length is invalid.
TtlExpired = 9
IPv4 Time To Live expired.
InvalidUdpHeader = 10
Invalid UDP header format or checksum.
UdpChecksumError = 11
UDP checksum mismatch.
InvalidIcmpHeader = 12
Invalid ICMP header format.
InvalidArpPacket = 13
Invalid ARP packet format.
ArpNotFound = 14
No ARP entry found for the target IP.
ArpCacheFull = 15
ARP cache is full.
SocketNotBound = 16
The socket is not bound to a port.
PortInUse = 17
The port is already in use.
NoPortsAvailable = 18
No available ports for ephemeral allocation.
DestinationUnreachable = 19
The destination is unreachable.
DeviceError = 20
Network device error.
BufferTooSmall = 21
The provided buffer is too small.
WouldBlock = 22
Operation would block (non-blocking mode).
InvalidPort = 23
Invalid port number (0 for source).
FragmentationNotSupported = 24
Fragment reassembly not supported.
KernelError(u16)
Kernel error passthrough.