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

Class ZEP2

scapy/layers/zigbee.py:1431–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1429
1430
1431class ZEP2(Packet):
1432 name = "Zigbee Encapsulation Protocol (V2)"
1433 fields_desc = [
1434 StrFixedLenField("preamble", "EX", length=2),
1435 ByteField("ver", 0),
1436 ByteField("type", 0),
1437 ByteField("channel", 0),
1438 ShortField("device", 0),
1439 ByteField("lqi_mode", 1),
1440 ByteField("lqi_val", 0),
1441 TimeStampField("timestamp", 0),
1442 IntField("seq", 0),
1443 BitField("res", 0, 80), # 10 bytes reserved field
1444 ByteField("length", 0),
1445 ]
1446
1447 @classmethod
1448 def dispatch_hook(cls, _pkt=b"", *args, **kargs):
1449 if _pkt and len(_pkt) >= 4:
1450 v = orb(_pkt[2])
1451 if v == 1:
1452 return ZEP1
1453 elif v == 2:
1454 return ZEP2
1455 return cls
1456
1457 def guess_payload_class(self, payload):
1458 if self.lqi_mode:
1459 return Dot15d4
1460 else:
1461 return Dot15d4FCS
1462
1463
1464class ZEP1(ZEP2):

Callers

nothing calls this directly

Calls 6

StrFixedLenFieldClass · 0.90
ByteFieldClass · 0.90
ShortFieldClass · 0.90
TimeStampFieldClass · 0.90
IntFieldClass · 0.90
BitFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…