aboutsummaryrefslogtreecommitdiff
path: root/src/consts.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-04-27 18:23:36 +0000
committerGitHub <[email protected]>2023-04-27 18:23:36 +0000
commitc19de2984751ba6fa2972ee66cfa2a6310d5f0c1 (patch)
tree9ba8fa01994be9ef43af404cb4399854e8c6de22 /src/consts.rs
parentf4bfda345d3d18232926a87b10333a2e624f4d04 (diff)
parent9e96655757180d7fe32ebff1ed93a35a4c3cff28 (diff)
Merge pull request #63 from kbleeke/generalize-events
rework event handling to allow sending data to `Control`
Diffstat (limited to 'src/consts.rs')
-rw-r--r--src/consts.rs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/consts.rs b/src/consts.rs
index fee2d01ab..18502bd1a 100644
--- a/src/consts.rs
+++ b/src/consts.rs
@@ -109,6 +109,50 @@ pub(crate) const READ: bool = false;
109pub(crate) const INC_ADDR: bool = true; 109pub(crate) const INC_ADDR: bool = true;
110pub(crate) const FIXED_ADDR: bool = false; 110pub(crate) const FIXED_ADDR: bool = false;
111 111
112#[allow(non_camel_case_types)]
113#[derive(Copy, Clone)]
114#[repr(u8)]
115pub enum EStatus {
116 /// operation was successful
117 SUCCESS = 0,
118 /// operation failed
119 FAIL = 1,
120 /// operation timed out
121 TIMEOUT = 2,
122 /// failed due to no matching network found
123 NO_NETWORKS = 3,
124 /// operation was aborted
125 ABORT = 4,
126 /// protocol failure: packet not ack'd
127 NO_ACK = 5,
128 /// AUTH or ASSOC packet was unsolicited
129 UNSOLICITED = 6,
130 /// attempt to assoc to an auto auth configuration
131 ATTEMPT = 7,
132 /// scan results are incomplete
133 PARTIAL = 8,
134 /// scan aborted by another scan
135 NEWSCAN = 9,
136 /// scan aborted due to assoc in progress
137 NEWASSOC = 10,
138 /// 802.11h quiet period started
139 _11HQUIET = 11,
140 /// user disabled scanning (WLC_SET_SCANSUPPRESS)
141 SUPPRESS = 12,
142 /// no allowable channels to scan
143 NOCHANS = 13,
144 /// scan aborted due to CCX fast roam
145 CCXFASTRM = 14,
146 /// abort channel select
147 CS_ABORT = 15,
148}
149
150impl PartialEq<EStatus> for u32 {
151 fn eq(&self, other: &EStatus) -> bool {
152 *self == *other as Self
153 }
154}
155
112#[allow(dead_code)] 156#[allow(dead_code)]
113pub(crate) struct FormatStatus(pub u32); 157pub(crate) struct FormatStatus(pub u32);
114 158