MCPcopy Create free account
hub / github.com/secdev/scapy / OUIField

Class OUIField

scapy/fields.py:3750–3763  ·  view source on GitHub ↗

A field designed to carry a OUI (3 bytes)

Source from the content-addressed store, hash-verified

3748
3749
3750class OUIField(X3BytesField):
3751 """
3752 A field designed to carry a OUI (3 bytes)
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 9

OAMClass · 0.90
CDPMsgProtoHelloClass · 0.90
VendorMMEClass · 0.90
SNAPClass · 0.90
PPP_ECP_Option_OUIClass · 0.90
RadioTapTLVClass · 0.90
RSNCipherSuiteClass · 0.90
AKMSuiteClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…