Shill: Incorporating the functionality of 'iw event' into shill.
'iw event' has been ported into shill and there are unit tests.
It still needs a facility to send individual messages to the
kernel (and there are comments in the code to show where this is
intended) but this will wait for a later commit.
BUG=None.
TEST=Enclosed unit tests verified against manual test. Ran all WiFi
autotests and output matched 'iw event'.
Change-Id: Ia5f5e8b440d0a657ce7fdb3e2b8b5fc6c95323fe
Reviewed-on: https://gerrit.chromium.org/gerrit/24508
Commit-Ready: Wade Guthrie <wdg@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/ieee80211.h b/ieee80211.h
index fd0fe26..83f53b2 100644
--- a/ieee80211.h
+++ b/ieee80211.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,8 +32,36 @@
const uint16_t kWPSElementModelName = 0x1023;
const uint16_t kWPSElementModelNumber = 0x1024;
const uint16_t kWPSElementDeviceName = 0x1011;
+
+// This structure is incomplete. Fields will be added as necessary.
+//
+// NOTE: the uint16_t stuff is in little-endian format so conversions are
+// required.
+struct ieee80211_frame {
+ uint16_t frame_control;
+ uint16_t duration_usec;
+ uint8_t destination_mac[6];
+ uint8_t source_mac[6];
+ uint8_t address[6];
+ uint16_t sequence_control;
+ union {
+ struct {
+ uint16_t reserved_1;
+ uint16_t reserved_2;
+ uint16_t status_code;
+ } authentiate_message;
+ struct {
+ uint16_t reason_code;
+ } deauthentiate_message;
+ struct {
+ uint16_t reserved_1;
+ uint16_t status_code;
+ } associate_response;
+ } u;
};
+}
+
} // namespace shill
#endif // SHILL_IEEE_80211_H