Пример #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
Пример #2
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__, ['type_code', 'dropcount'])
Пример #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'])
Пример #4
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__, ['type_code', 'addr_bytes'])
Пример #5
0
 def to_map(self):
     "Converts to a map representation"
     return util.select_keys(self.__dict__,
                             ['type_code', 'pen_val', 'content'])
Пример #6
0
 def to_map(self):
     return util.select_keys(self.__dict__, ['type_code'])
Пример #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'])
Пример #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'
     ])
Пример #9
0
 def to_map(self):
     "Converts an SPB object to a map representation"
     return util.select_keys(self.__dict__, ['pkt_data'])
Пример #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'])