CLI --pcap: only write ATR/TPDU messages (skip PPS/CHANGE/FIDI)

The PCAP branch fell back to GSMTAP_SIM_APDU for every non-ATR message,
so PPS/CHANGE/FIDI were written as 'APDU'. Align with the UDP branch and
the server export: only atr→ATR and tpdu→APDU are written.
This commit is contained in:
catarrh committed 2026-08-12 21:37:06 +03:00
1 parent cb4c07f3c2
commit 7556401618
1 file changed
+1 -1
+1 -1
View File
@@ -162,7 +162,7 @@ def main():
else:
gsmtap.send_apdu(msg.data, msg.slot_nr)
if pcap is not None:
if pcap is not None and msg.type in ('atr', 'tpdu'):
sub_type = GSMTAP_SIM_ATR if msg.type == 'atr' else GSMTAP_SIM_APDU
gsmtap_hdr = build_gsmtap_packet(sub_type, b'')[:16]
pcap.write_packet(gsmtap_hdr, msg.data, msg.timestamp)