Skip to content

Commit 8ed8956

Browse files
Tuetuopaycathay4t
authored andcommitted
Add NetlinkEvent type
A Netlink event is an unsolicited event from netlink. In most cases, it will be a Netlink message, but it may also be an overrun notification.
1 parent 03f30cb commit 8ed8956

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/message.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ use crate::{
1010
NetlinkSerializable, Parseable,
1111
};
1212

13+
/// Represent a Netlink event
14+
#[derive(Debug, PartialEq, Eq, Clone)]
15+
pub enum NetlinkEvent<M> {
16+
/// An actual message was received from Netlink
17+
Message(M),
18+
/// The socket receive buffer filled up
19+
Overrun,
20+
}
21+
1322
/// Represent a netlink message.
1423
#[derive(Debug, PartialEq, Eq, Clone)]
1524
pub struct NetlinkMessage<I> {

0 commit comments

Comments
 (0)