netlink_packet_route/neighbour_discovery_user_option/
mod.rs
1use netlink_packet_utils::DecodeError;
4use thiserror::Error;
5
6mod buffer;
7mod constants;
8mod header;
9mod message;
10mod nla;
11#[cfg(test)]
12mod tests;
13
14pub use self::buffer::NeighbourDiscoveryUserOptionMessageBuffer;
15pub use self::constants::*;
16pub use self::header::{
17 NeighbourDiscoveryIcmpType, NeighbourDiscoveryIcmpV6Type, NeighbourDiscoveryUserOptionHeader,
18};
19pub use self::message::NeighbourDiscoveryUserOptionMessage;
20pub use self::nla::Nla;
21
22#[derive(Error, Debug)]
23#[non_exhaustive]
24pub enum NeighbourDiscoveryUserOptionError {
25 #[error("Failed to initialize nduseropt message buffer: {0}")]
26 ParseBuffer(#[source] DecodeError),
27 #[error("Invalid nduseropt message header: {0}")]
28 InvalidHeader(#[source] DecodeError),
29 #[error("Invalid NLA in nduseropt message: {0}")]
30 InvalidNla(#[source] DecodeError),
31}