mobile_insight.monitor.dm_collector.dm_endec.ws_dissector module

ws_dissector.py A wrapper class of the ws_dissector program.

Author: Jiayao Li

class mobile_insight.monitor.dm_collector.dm_endec.ws_dissector.WSDissector

Bases: object

A wrapper class of the ws_dissector program, which calls libwireshark to dissect many types of messages, e.g. 3GPP standardized messages.

This wrapper communicates with the ws_dissector program using a trivial TLV-formatted protocol named AWW (Automator Wireshark Wrapper), through the standard input/output interfaces.

SUPPORTED_TYPES = {'LTE-NAS_EPS_PLAIN': 250, 'LTE-PDCP_DL_SRB': 300, 'LTE-PDCP_UL_SRB': 301, 'LTE-RRC_BCCH_DL_SCH': 203, 'LTE-RRC_BCCH_DL_SCH_NB': 208, 'LTE-RRC_DL_CCCH': 204, 'LTE-RRC_DL_CCCH_NB': 209, 'LTE-RRC_DL_DCCH': 201, 'LTE-RRC_DL_DCCH_NB': 206, 'LTE-RRC_PCCH': 200, 'LTE-RRC_UL_CCCH': 205, 'LTE-RRC_UL_CCCH_NB': 210, 'LTE-RRC_UL_DCCH': 202, 'LTE-RRC_UL_DCCH_NB': 207, 'NAS': 190, 'RRC_DL_BCCH_BCH': 104, 'RRC_DL_CCCH': 102, 'RRC_DL_DCCH': 103, 'RRC_DL_PCCH': 106, 'RRC_MIB': 150, 'RRC_SB1': 181, 'RRC_SIB1': 151, 'RRC_SIB11': 161, 'RRC_SIB12': 162, 'RRC_SIB19': 169, 'RRC_SIB2': 152, 'RRC_SIB3': 153, 'RRC_SIB5': 155, 'RRC_SIB7': 157, 'RRC_UL_CCCH': 100, 'RRC_UL_DCCH': 101, 'nas-5gs': 416, 'nr-rrc.bcch.bch': 402, 'nr-rrc.bcch.dl.sch': 403, 'nr-rrc.dl.ccch': 404, 'nr-rrc.dl.dcch': 405, 'nr-rrc.pcch': 406, 'nr-rrc.radio_bearer_conf': 415, 'nr-rrc.rrc_reconf': 410, 'nr-rrc.sbcch.sl.bch': 413, 'nr-rrc.scch': 414, 'nr-rrc.ue_mrdc_cap': 411, 'nr-rrc.ue_nr_cap': 412, 'nr-rrc.ue_radio_access_cap_info': 401, 'nr-rrc.ue_radio_paging_info': 400, 'nr-rrc.ul.ccch': 407, 'nr-rrc.ul.ccch1': 408, 'nr-rrc.ul.dcch': 409}
_init_proc_called = False
_proc = None
classmethod decode_msg(msg_type, b)

Decode a binary message of type msg_type.

Parameters
  • msg_type (string) – the type of the message to be decoded

  • b (string) – binary data to be decoded

Returns

an XML string

classmethod init_proc(executable_path, ws_library_path)

Launch the ws_dissector program. Must be called before any actual decoding, and should be called only once.

Parameters
  • executable_path (string or None) – path to ws_dissector. If set to None, uses the default path.

  • ws_library_path (string or None) – a directory that contains libwireshark. If set to None, uses the default path.