summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_var.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2007-03-11 07:15:38 +0000
committersam <sam@FreeBSD.org>2007-03-11 07:15:38 +0000
commita0ffc0834867892a7aace699b65132a9ee33110d (patch)
tree250562f8025aaea05de7282e567617a655f43b65 /sys/net80211/ieee80211_var.h
parentc8efce1b967630b0ef256c732ae3991bef23ce37 (diff)
downloadFreeBSD-src-a0ffc0834867892a7aace699b65132a9ee33110d.zip
FreeBSD-src-a0ffc0834867892a7aace699b65132a9ee33110d.tar.gz
expose IEEE80211_DISCARD, IEEE80211_DISCARD_IE, and IEEE80211_DISCARD_MAC
so they can be used within net80211 but outside ieee80211_input.c MFC after: 2 weeks
Diffstat (limited to 'sys/net80211/ieee80211_var.h')
-rw-r--r--sys/net80211/ieee80211_var.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 482687c..1ebd6ef 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -419,12 +419,43 @@ void ieee80211_note_frame(struct ieee80211com *ic,
((_ic)->ic_debug & IEEE80211_MSG_SCAN)
#define ieee80211_msg_assoc(_ic) \
((_ic)->ic_debug & IEEE80211_MSG_ASSOC)
+
+/*
+ * Emit a debug message about discarding a frame or information
+ * element. One format is for extracting the mac address from
+ * the frame header; the other is for when a header is not
+ * available or otherwise appropriate.
+ */
+#define IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...) do { \
+ if ((_ic)->ic_debug & (_m)) \
+ ieee80211_discard_frame(_ic, _wh, _type, _fmt, __VA_ARGS__);\
+} while (0)
+#define IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...) do { \
+ if ((_ic)->ic_debug & (_m)) \
+ ieee80211_discard_ie(_ic, _wh, _type, _fmt, __VA_ARGS__);\
+} while (0)
+#define IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...) do { \
+ if ((_ic)->ic_debug & (_m)) \
+ ieee80211_discard_mac(_ic, _mac, _type, _fmt, __VA_ARGS__);\
+} while (0)
+
+void ieee80211_discard_frame(struct ieee80211com *,
+ const struct ieee80211_frame *, const char *type, const char *fmt, ...);
+void ieee80211_discard_ie(struct ieee80211com *,
+ const struct ieee80211_frame *, const char *type, const char *fmt, ...);
+void ieee80211_discard_mac(struct ieee80211com *,
+ const u_int8_t mac[IEEE80211_ADDR_LEN], const char *type,
+ const char *fmt, ...);
#else
#define IEEE80211_DPRINTF(_ic, _m, _fmt, ...)
#define IEEE80211_NOTE_FRAME(_ic, _m, _wh, _fmt, ...)
#define IEEE80211_NOTE_MAC(_ic, _m, _mac, _fmt, ...)
#define ieee80211_msg_dumppkts(_ic) 0
#define ieee80211_msg(_ic, _m) 0
+
+#define IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...)
+#define IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...)
+#define IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...)
#endif
#endif /* _NET80211_IEEE80211_VAR_H_ */
OpenPOWER on IntegriCloud