MCPcopy Index your code
hub / github.com/secdev/scapy / i2repr

Method i2repr

scapy/fields.py:3755–3763  ·  view source on GitHub ↗
(self, pkt, val)

Source from the content-addressed store, hash-verified

3753 """
3754
3755 def i2repr(self, pkt, val):
3756 # type: (Optional[Packet], int) -> str
3757 by_val = struct.pack("!I", val or 0)[1:]
3758 oui = str2mac(by_val + b"\0" * 3)[:8]
3759 if conf.manufdb:
3760 fancy = conf.manufdb._get_manuf(oui)
3761 if fancy != oui:
3762 return "%s (%s)" % (fancy, oui)
3763 return oui
3764
3765
3766class UUIDField(Field[UUID, bytes]):

Callers

nothing calls this directly

Calls 2

str2macFunction · 0.90
_get_manufMethod · 0.80

Tested by

no test coverage detected