(x)
| 290 | |
| 291 | |
| 292 | def lhex(x): |
| 293 | # type: (Any) -> str |
| 294 | from scapy.volatile import VolatileValue |
| 295 | if isinstance(x, VolatileValue): |
| 296 | return repr(x) |
| 297 | if isinstance(x, int): |
| 298 | return hex(x) |
| 299 | if isinstance(x, tuple): |
| 300 | return "(%s)" % ", ".join(lhex(v) for v in x) |
| 301 | if isinstance(x, list): |
| 302 | return "[%s]" % ", ".join(lhex(v) for v in x) |
| 303 | return str(x) |
| 304 | |
| 305 | |
| 306 | @conf.commands.register |