mirror of
https://gitlab.com/prpl-foundation/prplmesh/stationsniffer.git
synced 2025-12-20 02:20:31 +08:00
treewide: remove unused message types
Removes MSG_CHANGE_KEEPALIVE_TIMEOUT_MS and MSG_CHANGE_PACKET_PERIODICITY_MS, two messages which were originally provisioned for dynamic tuning and debugging, but have gone totally unused. Signed-off-by: Tucker Polomik <t.polomik@cablelabs.com>
This commit is contained in:
@@ -89,10 +89,6 @@ bool message_handler::handle_message(const message_request_header &header, int r
|
||||
}
|
||||
return send_message_response<sta_disassoc_response>(sta_dc_response, request_fd);
|
||||
} break;
|
||||
case message_type_t::MSG_CHANGE_PACKET_PERIODICITY_MS:
|
||||
// fall thru
|
||||
case message_type_t::MSG_CHANGE_KEEPALIVE_TIMEOUT_MS:
|
||||
// fall thru
|
||||
default: {
|
||||
response_error_code = error_code_t::ERROR_BAD_MESSAGE;
|
||||
break;
|
||||
|
||||
@@ -26,10 +26,6 @@ std::string message_type_to_string(const message_type_t &mt)
|
||||
return "MSG_GET_STA_STATS";
|
||||
case message_type_t::MSG_GET_STA_WMI_STATS:
|
||||
return "MSG_GET_STA_WMI_STATS";
|
||||
case message_type_t::MSG_CHANGE_KEEPALIVE_TIMEOUT_MS:
|
||||
return "MSG_CHANGE_KEEPALIVE_TIMEOUT_MS";
|
||||
case message_type_t::MSG_CHANGE_PACKET_PERIODICITY_MS:
|
||||
return "MSG_CHANGE_PACKET_PERIODICITY_MS";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
18
messages.h
18
messages.h
@@ -25,18 +25,6 @@ enum class message_type_t : uint32_t {
|
||||
*
|
||||
*/
|
||||
MSG_GET_STA_WMI_STATS = 0x08,
|
||||
/**
|
||||
* @brief Change the global keepalive timeout parameter.
|
||||
*
|
||||
* The keepalive timeout is the threshold in milliseconds past which we consider a station 'dead' -- not heard from.
|
||||
*
|
||||
*/
|
||||
MSG_CHANGE_KEEPALIVE_TIMEOUT_MS = 0x10,
|
||||
/**
|
||||
* @brief Change how long we buffer packets before processing for. Mostly a tuning parameter for CPU load.
|
||||
*
|
||||
*/
|
||||
MSG_CHANGE_PACKET_PERIODICITY_MS = 0x20,
|
||||
|
||||
MSG_GET_DISASSOCIATED_STATIONS = 0x40,
|
||||
};
|
||||
@@ -148,16 +136,10 @@ struct sta_disassoc_response : public response {
|
||||
uint8_t bssid[6];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct periodicity_message : public request {
|
||||
uint32_t periodicity_ms;
|
||||
} __attribute__((packed));
|
||||
|
||||
static_assert(sizeof(sta_lm) == 16, "sta_lm struct should be 15 bytes (one byte for RSSI, 1 for "
|
||||
"bandwidth, 2 for channel number, 8 for timestamp)");
|
||||
static_assert(
|
||||
sizeof(message_request_header) == 14,
|
||||
"message_header should be 14 bytes (uint32_t message_type, int8_t mac[6], uint32_t checksum");
|
||||
static_assert(sizeof(periodicity_message) == 18,
|
||||
"struct periodicity_message should be 18 bytes long.");
|
||||
static_assert(sizeof(sta_wma_lm) == 17, "struct sta_wma_lm should be 17 bytes long");
|
||||
#endif // __MESSAGES_H
|
||||
|
||||
@@ -12,9 +12,7 @@ class MessageType(IntEnum):
|
||||
MSG_UNREGISTER_STA = 0x02
|
||||
MSG_GET_STA_STATS = 0x04
|
||||
MSG_GET_STA_WMI_STATS = 0x08
|
||||
MSG_CHANGE_KEEPALIVE_TIMEOUT_MS = 0x10
|
||||
MSG_CHANGE_PACKET_PERIODICITY_MS = 0x20
|
||||
|
||||
|
||||
def connect_and_poll_rssi(socket_path: str, mac: str) -> None:
|
||||
trimmed_mac = mac.replace(':', '')
|
||||
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client:
|
||||
|
||||
@@ -28,10 +28,6 @@ enum message_type {
|
||||
MSG_GET_STA_STATS = 0x04,
|
||||
|
||||
MSG_GET_STA_WMI_STATS = 0x08,
|
||||
|
||||
MSG_CHANGE_KEEPALIVE_TIMEOUT_MS = 0x10,
|
||||
|
||||
MSG_CHANGE_PACKET_PERIODICITY_MS = 0x20,
|
||||
};
|
||||
|
||||
enum error_type {
|
||||
|
||||
Reference in New Issue
Block a user