Expand description
This is the module that contains the error types used in neli
There are four main types:
Nlmsgerr
- an application error returned from netlink as a packet.NlError
- a general netlink error wrapping application errors, serialization and deserialization errors, and other errors that occur inneli
.DeError
- error while deserializingSerError
- error while serializing
§Design decisions
All errors implement std::error::Error
in an attempt to allow
them to be used in conjunction with Result
for easier error
management even at the protocol error level.
As of v0.6.0, deserializing the NlmsghdrErr
struct has two
optional type parameters for specifying the type of the type
constant and the payload. If neither of these are provided,
the deserialization defaults to u16
and
Buffer
respectively which work for
all cases. See the examples/
directory for a usage example.
Structs§
- Nlmsgerr
- Struct representing netlink packets containing errors
- Nlmsghdr
Err - A special struct that represents the contents of an error
returned at the application level. Because the returned
nl_len
cannot always determine the length of the packet (as in the case of ACKs where no payload will be returned), this data structure relies on the total packet size for deserialization.
Enums§
- DeError
- Deserialization error
- NlError
- General netlink error
- SerError
- Serialization error
- Wrapped
Error - An error to wrap all system level errors in a single, higher level error.