mirror of
https://gitlab.com/prpl-foundation/prplmesh/stationsniffer.git
synced 2025-12-20 02:20:31 +08:00
station.{h|cpp}: remove is_potentially_mobile
Unused, never used, never going to be used. Prefer to check for the locally administered bit being 1 and the unicast bit being 0 in a MAC to determine if it's randomized. Signed-off-by: Tucker Polomik <t.polomik@cablelabs.com>
This commit is contained in:
@@ -27,13 +27,6 @@ station::station(const std::array<uint8_t, ETH_ALEN> &mac) : m_mac(mac)
|
||||
std::array<uint8_t, ETH_ALEN> station::get_mac() const { return m_mac; }
|
||||
|
||||
int8_t station::get_rssi() const { return m_rt_fields.rssi; }
|
||||
// second nibble of MSB of MAC being 2, E, A or 6 seems to indicate mac randomization (which is canonically only implemented by mobile stations)
|
||||
|
||||
bool station::is_potentially_mobile() const
|
||||
{
|
||||
return ((get_mac()[0] & 0x0f) == 0x0A) || ((get_mac()[0] & 0x0f) == 0x0E) ||
|
||||
((get_mac()[0] & 0x0f) == 0x06) || ((get_mac()[0] & 0x0f) == 0x02);
|
||||
}
|
||||
|
||||
void station::update_rt_fields(const radiotap_fields &rt_f)
|
||||
{
|
||||
|
||||
11
station.h
11
station.h
@@ -39,17 +39,6 @@ public:
|
||||
*/
|
||||
int8_t get_rssi() const;
|
||||
|
||||
/**
|
||||
* @brief Returns whether or not this station is _likely_ a mobile station (i.e. a cell phone, a laptop, tablet, etc)
|
||||
*
|
||||
* The second nibble of the MSB of a station's MAC address being one of [0x2, 0xE, 0xA, 0x6] seems to indicate MAC randomization on the station.
|
||||
* Canonically, MAC randomization is only implemented for mobile stations, mostly phones.
|
||||
*
|
||||
* @return true if this station is likely a mobile station.
|
||||
* @return false otherwise.
|
||||
*/
|
||||
bool is_potentially_mobile() const;
|
||||
|
||||
/**
|
||||
* @brief Update this station's parsed radiotap fields
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user