Lines Matching full:raw

100     def __init__(self, raw, offset):  argument
101 self._len, self._type = struct.unpack("HH", raw[offset : offset + 4])
106 self.raw = raw[offset + 4 : offset + self.payload_len]
117 def formatted_string(cls, raw, display_hint): argument
119 formatted = ':'.join('%02x' % b for b in raw)
121 formatted = bytes.hex(raw, ' ')
123 formatted = format(ipaddress.ip_address(raw))
125 formatted = str(uuid.UUID(bytes=raw))
127 formatted = raw
132 return format.unpack(self.raw)[0]
135 if len(self.raw) != 4 and len(self.raw) != 8:
136 raise Exception(f"Auto-scalar len payload be 4 or 8 bytes, got {len(self.raw)}")
137 real_type = attr_type[0] + str(len(self.raw) * 8)
139 return format.unpack(self.raw)[0]
142 return self.raw.decode('ascii')[:-1]
145 return self.raw
149 return [ x[0] for x in format.iter_unpack(self.raw) ]
157 decoded = self.raw[offset : offset + m['len']]
161 [ decoded ] = format.unpack_from(self.raw, offset)
169 return f"[type:{self.type} len:{self._len}] {self.raw}"
200 self.raw = msg[offset + 16 : offset + self.nl_len]
207 self.error = struct.unpack("i", self.raw[0:4])[0]
217 extack_attrs = NlAttrs(self.raw[extack_off:])
247 …msg = f"nl_len = {self.nl_len} ({len(self.raw)}) nl_flags = 0x{self.nl_flags:x} nl_type = {self.nl…
311 for attr in NlAttrs(gm.raw):
320 for entry in NlAttrs(attr.raw):
323 for entry_attr in NlAttrs(entry.raw):
337 self.genl_cmd, self.genl_version, _ = struct.unpack_from("BBH", nl_msg.raw, 0)
338 self.raw = nl_msg.raw[4:]
374 msg.raw_attrs = NlAttrs(msg.raw, fixed_header_size)
421 if self.proto == "netlink-raw":
490 def _decode_enum(self, raw, attr_spec): argument
495 while raw:
496 if raw & 1:
498 raw >>= 1
501 value = enum.entries_by_val[raw].name
522 while offset < len(attr.raw):
523 item = NlAttr(attr.raw, offset)
526 subattrs = self._decode(NlAttrs(item.raw), attr_spec['nested-attributes'])
532 return self._decode(NlAttrs(attr.raw), None)
576 subdict = self._decode(NlAttrs(attr.raw, offset), msg_format.attr_set)
597 subdict = self._decode(NlAttrs(attr.raw), attr_spec['nested-attributes'])
614 value, selector = struct.unpack("II", attr.raw)
647 subpath = self._decode_extack_path(NlAttrs(attr.raw),
691 value = msg.raw[offset : offset + m.len]
695 [ value ] = format.unpack_from(msg.raw, offset)
706 msg['raw'] = decoded