mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-15 20:38:10 -07:00
rm is_gsmtap_type
Instead of tracking which types are gsmtap-friendly, just rely on the parser result.
This commit is contained in:
@@ -156,21 +156,6 @@ impl Message {
|
||||
Err(err) => Err(DiagParsingError::HdlcDecapsulationError(err, data.to_vec())),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns whether this message should be parsed into a GSMTAP packet for
|
||||
/// display in pcap files
|
||||
pub fn is_gsmtap_message(&self) -> bool {
|
||||
let Message::Log { body, .. } = self else {
|
||||
return false;
|
||||
};
|
||||
matches!(
|
||||
body,
|
||||
LogBody::LteRrcOtaMessage { .. }
|
||||
| LogBody::LteMacRachResponse { .. }
|
||||
| LogBody::LteMl1NeighborCellsMeasurements { .. }
|
||||
| LogBody::Nas4GMessage { .. }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, DekuRead, DekuWrite)]
|
||||
|
||||
@@ -17,9 +17,6 @@ pub enum GsmtapParserError {
|
||||
}
|
||||
|
||||
pub fn parse(msg: Message) -> Result<Option<(Timestamp, GsmtapMessage)>, GsmtapParserError> {
|
||||
if !msg.is_gsmtap_message() {
|
||||
return Ok(None);
|
||||
}
|
||||
if let Message::Log {
|
||||
timestamp, body, ..
|
||||
} = msg
|
||||
|
||||
Reference in New Issue
Block a user