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

Class DCPControlBlock

scapy/contrib/pnio_dcp.py:417–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415
416
417class DCPControlBlock(Packet):
418 fields_desc = [
419 ByteEnumField("option", 5, DCP_OPTIONS),
420 MultiEnumField("sub_option", 4, DCP_SUBOPTIONS, fmt='B',
421 depends_on=lambda p: p.option),
422 LenField("dcp_block_length", 3),
423 ByteEnumField("response", 2, DCP_OPTIONS),
424 MultiEnumField("response_sub_option", 2, DCP_SUBOPTIONS, fmt='B',
425 depends_on=lambda p: p.option),
426 ByteEnumField("block_error", 0, BLOCK_ERRORS),
427 PadField(StrLenField("padding", b"\x00",
428 length_from=lambda p: p.dcp_block_length % 2), 1,
429 padwith=b"\x00")
430 ]
431
432 def extract_padding(self, s):
433 return '', s
434
435
436class DCPDeviceInitiativeBlock(Packet):

Callers

nothing calls this directly

Calls 5

ByteEnumFieldClass · 0.90
MultiEnumFieldClass · 0.90
LenFieldClass · 0.90
PadFieldClass · 0.90
StrLenFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…