| 415 | |
| 416 | |
| 417 | class 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 | |
| 436 | class DCPDeviceInitiativeBlock(Packet): |
nothing calls this directly
no test coverage detected
searching dependent graphs…