| 552 | |
| 553 | |
| 554 | class FILE_BOTH_DIR_INFORMATION(Packet): |
| 555 | fields_desc = ( |
| 556 | [ |
| 557 | LEIntField("Next", None), # 0 = no next entry |
| 558 | LEIntField("FileIndex", 0), |
| 559 | ] |
| 560 | + ( |
| 561 | FileNetworkOpenInformation.fields_desc[:4] |
| 562 | + FileNetworkOpenInformation.fields_desc[4:6][::-1] |
| 563 | + [FileNetworkOpenInformation.fields_desc[6]] |
| 564 | ) |
| 565 | + [ |
| 566 | FieldLenField("FileNameLength", None, fmt="<I", length_of="FileName"), |
| 567 | MultipleTypeField( |
| 568 | # "If FILE_ATTRIBUTE_REPARSE_POINT is set in the FileAttributes field, |
| 569 | # this field MUST contain a reparse tag as specified in section |
| 570 | # 2.1.2.1." |
| 571 | [ |
| 572 | ( |
| 573 | LEIntEnumField("EaSize", 0, REPARSE_TAGS), |
| 574 | lambda pkt: pkt.FileAttributes.FILE_ATTRIBUTE_REPARSE_POINT, |
| 575 | ) |
| 576 | ], |
| 577 | LEIntField("EaSize", 0), |
| 578 | ), |
| 579 | ByteField("ShortNameLength", 0), |
| 580 | ByteField("Reserved1", 0), |
| 581 | StrFixedLenField("ShortName", b"", length=24), |
| 582 | PadField( |
| 583 | StrLenFieldUtf16( |
| 584 | "FileName", b".", length_from=lambda pkt: pkt.FileNameLength |
| 585 | ), |
| 586 | align=8, |
| 587 | ), |
| 588 | ] |
| 589 | ) |
| 590 | |
| 591 | def default_payload_class(self, s): |
| 592 | return conf.padding_layer |
| 593 | |
| 594 | |
| 595 | class _NextPacketListField(PacketListField): |
nothing calls this directly
no test coverage detected