References: =========== - [MS-SMB2]: 2.2.15
| 628 | |
| 629 | |
| 630 | class SMB2CloseRequest(Structure): |
| 631 | """ |
| 632 | References: |
| 633 | =========== |
| 634 | - [MS-SMB2]: 2.2.15 |
| 635 | """ |
| 636 | |
| 637 | STRUCTURE_FORMAT = "<HHI16s" |
| 638 | STRUCTURE_SIZE = struct.calcsize(STRUCTURE_FORMAT) |
| 639 | |
| 640 | def __init__(self, fid, flags = 0): |
| 641 | self.fid = fid |
| 642 | self.flags = flags |
| 643 | |
| 644 | def initMessage(self, message): |
| 645 | Structure.initMessage(self, message) |
| 646 | message.command = SMB2_COM_CLOSE |
| 647 | |
| 648 | def prepare(self, message): |
| 649 | message.data = struct.pack(self.STRUCTURE_FORMAT, |
| 650 | 24, # Structure size. Must be 24 as mandated by [MS-SMB2]: 2.2.15 |
| 651 | self.flags, |
| 652 | 0, # Reserved. Must be 0 |
| 653 | self.fid) |
| 654 | |
| 655 | |
| 656 | class SMB2CloseResponse(Structure): |