msg_file_flush.go 550 B

1234567891011121314151617181920212223242526272829303132
  1. package smb
  2. func init() {
  3. commandRequestMap[CommandFlush] = func() DataI {
  4. return &FlushRequest{}
  5. }
  6. }
  7. //CommandFlush
  8. type FlushRequest struct {
  9. Header
  10. StructureSize uint16
  11. Reserved1 uint16
  12. Reserved2 uint32
  13. FileId GUID
  14. }
  15. type FlushResponse struct {
  16. Header
  17. StructureSize uint16
  18. Reserved uint16
  19. }
  20. func (data *FlushRequest) ServerAction(ctx *DataCtx) (interface{}, error) {
  21. data.Header.Flags = SMB2_FLAGS_RESPONSE
  22. resp := FlushResponse{
  23. Header: data.Header,
  24. StructureSize: 0x001,
  25. }
  26. return &resp, nil
  27. }