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

Class XByteEnumField

scapy/fields.py:2777–2790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2775
2776
2777class XByteEnumField(ByteEnumField):
2778 def i2repr_one(self, pkt, x):
2779 # type: (Optional[Packet], int) -> str
2780 if self not in conf.noenum and not isinstance(x, VolatileValue):
2781 if self.i2s:
2782 try:
2783 return self.i2s[x]
2784 except KeyError:
2785 pass
2786 elif self.i2s_cb:
2787 ret = self.i2s_cb(x)
2788 if ret is not None:
2789 return ret
2790 return lhex(x)
2791
2792
2793class IntEnumField(EnumField[int]):

Callers 15

MQTTSNClass · 0.90
DoIPClass · 0.90
UDSClass · 0.90
UDS_RFTClass · 0.90
UDS_RFTPRClass · 0.90
UDS_NRClass · 0.90
KWPClass · 0.90
KWP_IOCBLIClass · 0.90
KWP_IOCBLIPRClass · 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…