\hypertarget{ieee80211__monitor_8c_source}{}\doxysection{ieee80211\+\_\+monitor.\+c}
\label{ieee80211__monitor_8c_source}\index{net80211/ieee80211\_monitor.c@{net80211/ieee80211\_monitor.c}}
\mbox{\hyperlink{ieee80211__monitor_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2007-\/2008 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00017}00017 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00018}00018 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00019}00019 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00020}00020 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00021}00021 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00022}00022 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00023}00023 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00024}00024 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00025}00025 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00028}00028 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00029}00029 \textcolor{preprocessor}{\#ifdef \_\_FreeBSD\_\_}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00030}\mbox{\hyperlink{ieee80211__monitor_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{ieee80211__monitor_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00031}00031 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00033}00033 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00034}00034 \textcolor{comment}{ * IEEE 802.11 Monitor mode support.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00035}00035 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}opt\_inet.h"{}}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00037}00037 \textcolor{preprocessor}{\#include "{}opt\_wlan.h"{}}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/systm.h>} }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/mbuf.h>}   }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <net/if\_llc.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ieee80211__var_8h}{net80211/ieee80211\_var.h}}>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ieee80211__monitor_8h}{net80211/ieee80211\_monitor.h}}>}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00063}00063 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ieee80211__monitor_8c_a03e7d4489af7ef1236b77a82d5f46f6b}{monitor\_vattach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00064}00064 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{ieee80211__monitor_8c_aae6d365ee9ee83f7e942e01bd4fa4353}{monitor\_newstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *, \textcolor{keyword}{enum} \mbox{\hyperlink{ieee80211__proto_8h_a6c8e7861891c9e21e6a02ccdba514944}{ieee80211\_state}}, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00065}00065 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{ieee80211__monitor_8c_a1132ff6c533ee81faf61ba3dad56d88a}{monitor\_input}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211__node}{ieee80211\_node}} *ni, \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00066}00066         \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211__rx__stats}{ieee80211\_rx\_stats}} *rxs, \textcolor{keywordtype}{int} rssi, \textcolor{keywordtype}{int} nf);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00068}00068 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00069}\mbox{\hyperlink{ieee80211__monitor_8c_ada670d8254c64035414baa798cd47526}{00069}} \mbox{\hyperlink{ieee80211__monitor_8c_ada670d8254c64035414baa798cd47526}{ieee80211\_monitor\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211com}{ieee80211com}} *ic)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00070}00070 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00071}00071         ic-\/>\mbox{\hyperlink{structieee80211com_a310b0d3a36b0d5c9a322e6a291d9652f}{ic\_vattach}}[\mbox{\hyperlink{__ieee80211_8h_ab624e38122a844713ca48c7307772ed1af8306ebf9aeeade67a9f1f9d1acaa80f}{IEEE80211\_M\_MONITOR}}] = \mbox{\hyperlink{ieee80211__monitor_8c_a03e7d4489af7ef1236b77a82d5f46f6b}{monitor\_vattach}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00072}00072 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00074}00074 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00075}\mbox{\hyperlink{ieee80211__monitor_8c_ac3e73bfb4a90ea4ef3f95ec429eb9c8c}{00075}} \mbox{\hyperlink{ieee80211__monitor_8c_ac3e73bfb4a90ea4ef3f95ec429eb9c8c}{ieee80211\_monitor\_detach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211com}{ieee80211com}} *ic)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00076}00076 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00077}00077 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00079}00079 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00080}\mbox{\hyperlink{ieee80211__monitor_8c_a7b465eb42809b991bd7839a4a2a2724e}{00080}} \mbox{\hyperlink{ieee80211__monitor_8c_a7b465eb42809b991bd7839a4a2a2724e}{monitor\_vdetach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *vap)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00081}00081 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00082}00082 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00084}00084 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00085}\mbox{\hyperlink{ieee80211__monitor_8c_a03e7d4489af7ef1236b77a82d5f46f6b}{00085}} \mbox{\hyperlink{ieee80211__monitor_8c_a03e7d4489af7ef1236b77a82d5f46f6b}{monitor\_vattach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *vap)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00086}00086 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00087}00087         vap-\/>\mbox{\hyperlink{structieee80211vap_afb26bef583b00e4d02e4854676a80cc1}{iv\_newstate}} = \mbox{\hyperlink{ieee80211__monitor_8c_aae6d365ee9ee83f7e942e01bd4fa4353}{monitor\_newstate}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00088}00088         vap-\/>\mbox{\hyperlink{structieee80211vap_ab225a61914234523f0f1f26e4759b3c5}{iv\_input}} = \mbox{\hyperlink{ieee80211__monitor_8c_a1132ff6c533ee81faf61ba3dad56d88a}{monitor\_input}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00089}00089         vap-\/>\mbox{\hyperlink{structieee80211vap_a8bbc49a111f65bc934689b0d97beaf19}{iv\_opdetach}} = \mbox{\hyperlink{ieee80211__monitor_8c_a7b465eb42809b991bd7839a4a2a2724e}{monitor\_vdetach}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00090}00090 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00092}00092 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00093}00093 \textcolor{comment}{ * IEEE80211\_M\_MONITOR vap state machine handler.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00094}00094 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00095}00095 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00096}\mbox{\hyperlink{ieee80211__monitor_8c_aae6d365ee9ee83f7e942e01bd4fa4353}{00096}} \mbox{\hyperlink{ieee80211__monitor_8c_aae6d365ee9ee83f7e942e01bd4fa4353}{monitor\_newstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *vap, \textcolor{keyword}{enum} \mbox{\hyperlink{ieee80211__proto_8h_a6c8e7861891c9e21e6a02ccdba514944}{ieee80211\_state}} nstate, \textcolor{keywordtype}{int} arg)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00097}00097 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00098}00098         \textcolor{keyword}{struct }\mbox{\hyperlink{structieee80211com}{ieee80211com}} *ic = vap-\/>\mbox{\hyperlink{structieee80211vap_a043409de0850043e3574182889cdaac0}{iv\_ic}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00099}00099         \textcolor{keyword}{enum} \mbox{\hyperlink{ieee80211__proto_8h_a6c8e7861891c9e21e6a02ccdba514944}{ieee80211\_state}} ostate;}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00101}00101         \mbox{\hyperlink{ieee80211__freebsd_8h_a92da71d7f298d51a339c7d06a610b947}{IEEE80211\_LOCK\_ASSERT}}(ic);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00103}00103         ostate = vap-\/>\mbox{\hyperlink{structieee80211vap_a80866880b00a3d4ef5d37df580155905}{iv\_state}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00104}00104         \mbox{\hyperlink{ieee80211__var_8h_ac185ad5fc3b0a56653d4ea243a100a1c}{IEEE80211\_DPRINTF}}(vap, \mbox{\hyperlink{ieee80211__var_8h_a0b669672e833a8e854063e445080fb59}{IEEE80211\_MSG\_STATE}}, \textcolor{stringliteral}{"{}\%s: \%s -\/> \%s (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00105}00105             \_\_func\_\_, \mbox{\hyperlink{ieee80211__proto_8c_a7743c46d5b77e40c7abac1417ee35dd8}{ieee80211\_state\_name}}[ostate],}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00106}00106             \mbox{\hyperlink{ieee80211__proto_8c_a7743c46d5b77e40c7abac1417ee35dd8}{ieee80211\_state\_name}}[nstate], arg);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00107}00107         vap-\/>\mbox{\hyperlink{structieee80211vap_a80866880b00a3d4ef5d37df580155905}{iv\_state}} = nstate;                 \textcolor{comment}{/* state transition */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00108}00108         \textcolor{keywordflow}{if} (nstate == \mbox{\hyperlink{ieee80211__proto_8h_a6c8e7861891c9e21e6a02ccdba514944a59e567dc5761d3a082d77011fc6c1a39}{IEEE80211\_S\_RUN}}) \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00109}00109                 \textcolor{keywordflow}{switch} (ostate) \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00110}00110                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ieee80211__proto_8h_a6c8e7861891c9e21e6a02ccdba514944a5ddfd615e2f7a05d83ae61a24fa84692}{IEEE80211\_S\_INIT}}:}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00111}00111                         \mbox{\hyperlink{ieee80211__node_8c_adf7b2e9ad27f624c7b12fec746bd24c5}{ieee80211\_create\_ibss}}(vap, ic-\/>\mbox{\hyperlink{structieee80211com_af4f9f1d4120d065aec7ac8eae28a613a}{ic\_curchan}});}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00112}00112                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00113}00113                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00114}00114                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00115}00115                 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00116}00116                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00117}00117 \textcolor{comment}{                 * NB: this shouldn't be here but many people use}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00118}00118 \textcolor{comment}{                 * monitor mode for raw packets; once we switch}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00119}00119 \textcolor{comment}{                 * them over to adhoc demo mode remove this.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00120}00120 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00121}00121                 \mbox{\hyperlink{ieee80211__node_8c_a7744a49edcaebd18271f87d24dd62a2e}{ieee80211\_node\_authorize}}(vap-\/>\mbox{\hyperlink{structieee80211vap_a116ec25ffa4d694abe01c6b58d18384a}{iv\_bss}});}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00122}00122         \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00123}00123         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00124}00124 \}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00126}00126 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00127}00127 \textcolor{comment}{ * Process a received frame in monitor mode.}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00128}00128 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00130}\mbox{\hyperlink{ieee80211__monitor_8c_a1132ff6c533ee81faf61ba3dad56d88a}{00130}} \mbox{\hyperlink{ieee80211__monitor_8c_a1132ff6c533ee81faf61ba3dad56d88a}{monitor\_input}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211__node}{ieee80211\_node}} *ni, \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00131}00131     \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structieee80211__rx__stats}{ieee80211\_rx\_stats}} *rxs, \textcolor{keywordtype}{int} rssi, \textcolor{keywordtype}{int} nf)}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00132}00132 \{}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00133}00133         \textcolor{keyword}{struct }\mbox{\hyperlink{structieee80211vap}{ieee80211vap}} *vap = ni-\/>\mbox{\hyperlink{structieee80211__node_a6adce9156cd9d0e45eaa499acdef5092}{ni\_vap}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00134}00134         \textcolor{keyword}{struct }ifnet *ifp = vap-\/>\mbox{\hyperlink{structieee80211vap_aca4f7d70404f3fafac925ee534bf5c5f}{iv\_ifp}};}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00136}00136         if\_inc\_counter(ifp, IFCOUNTER\_IPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00138}00138         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ieee80211__var_8h_a052b21b650fae37b3d8e0e4e3616a3b4}{ieee80211\_radiotap\_active\_vap}}(vap))}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00139}00139                 \mbox{\hyperlink{ieee80211__radiotap_8c_ab5d57e466b7edf51a6b46d8eda9f0da1}{ieee80211\_radiotap\_rx}}(vap, m);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00140}00140         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00141}00141         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{ieee80211__monitor_8c_source_l00142}00142 \}}

\end{DoxyCode}
