batman_robin/model/client_flag.rs
1use bitflags::bitflags;
2
3bitflags! {
4 /// Flags representing the state or behavior of a BATMAN-adv client.
5 ///
6 /// These flags are associated with entries in the translation table (TT)
7 /// and describe attributes such as whether the client is roaming,
8 /// isolated, or temporarily connected.
9 #[doc = "Flags representing the state or behavior of a BATMAN-adv client."]
10 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
11 pub struct ClientFlags: u32 {
12 /// Client has been deleted from the translation table.
13 const DEL = 1 << 0;
14
15 /// Client is currently roaming between interfaces.
16 const ROAM = 1 << 1;
17
18 /// Client is connected via Wi-Fi.
19 const WIFI = 1 << 4;
20
21 /// Client is isolated (AP isolation is enabled).
22 const ISOLA = 1 << 5;
23
24 /// Client should not be purged from the translation table automatically.
25 const NOPURGE = 1 << 8;
26
27 /// Client is newly detected in the translation table.
28 const NEW = 1 << 9;
29
30 /// Client entry is pending (not fully validated yet).
31 const PENDING = 1 << 10;
32
33 /// Client entry is temporary.
34 const TEMP = 1 << 11;
35 }
36}