Exemplo n.º 1
0
 def to_map(self):
     "Converts an SHB object to a map representation"
     base_map = {
         'SPEC_CODE': self.SPEC_CODE,
         'SHB_MAJOR_VERSION': self.MAJOR_VERSION,
         'SHB_MINOR_VERSION': self.MINOR_VERSION,
     }
     result = util.dict_merge(
         base_map, util.select_keys(self.__dict__, ['options_lst']))
     return result
Exemplo n.º 2
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__, ['type_code', 'dropcount'])
Exemplo n.º 3
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__,
                             ['type_code', 'ts_resol_power', 'is_power_2'])
Exemplo n.º 4
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__, ['type_code', 'addr_bytes'])
Exemplo n.º 5
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__,
                             ['type_code', 'pen_val', 'content'])
Exemplo n.º 6
0
 def to_map(self):
     return util.select_keys(self.__dict__, ['type_code'])
Exemplo n.º 7
0
 def to_map(self):
     "Converts a CB object to a map representation"
     return util.select_keys(
         self.__dict__, ['block_type', 'pen_val', 'content', 'options_lst'])
Exemplo n.º 8
0
 def to_map(self):
     "Converts an EPB object to a map representation"
     return util.select_keys(self.__dict__, [
         'interface_id', 'pkt_data_captured', 'pkt_data_orig_len',
         'options_lst', 'time_utc_micros'
     ])
Exemplo n.º 9
0
 def to_map(self):
     "Converts an SPB object to a map representation"
     return util.select_keys(self.__dict__, ['pkt_data'])
Exemplo n.º 10
0
 def to_map(self):
     "Converts an IDB object to a map representation"
     return util.select_keys(self.__dict__,
                             ['link_type', 'options_lst', 'snaplen'])