diff --git a/scapy/packet.py b/scapy/packet.py index 8ae52acc7..e761d0d78 100644 --- a/scapy/packet.py +++ b/scapy/packet.py @@ -923,6 +923,12 @@ A side effect is that, to obtain "{" and "}" characters, you must use found = 1 if not ret: ret = self.__class__.__name__ + if self.__class__ in conf.emph: + impf = [] + for f in self.fields_desc: + if f in conf.emph: + impf.append("%s=%s" % (f.name, f.i2repr(self, self.getfieldval(f.name)))) + ret = "%s [%s]" % (ret," ".join(impf)) ret = "%s%s" % (ret,s) return found,ret,needed