~n-muench/ubuntu/maverick/open-vm-tools/open-vm-tools.fix-632101

« back to all changes in this revision

Viewing changes to lib/hgfsServer/hgfsServerInt.h

  • Committer: Evan Broder
  • Date: 2010-05-29 17:35:25 UTC
  • mfrom: (2.4.16 sid)
  • Revision ID: evan@mingo-20100529173525-u1clyo2h18k7l0kx
Tags: 2010.04.25-253928-2+ubuntu1
* Merge from debian testing, remaining changes:
    - Recommend open-vm-toolbox in open-vm-tools.
* Dropping la files.
* Updating rules for pvscsi removal (Closes: #581160).
* Merging upstream version 2010.04.25-253928.
* Updating packaging for upstreams pvscsi module removal.
* Removing remote_fs from initscript again (Closes: #577163).
* Updating lintian overrides for open-vm-tools.
* Updating date and version in manpage headers.
* Adding manpage for vmxnet3.
* Adding manpage for vmci.
* Fixing spelling typo in vmsync manpage.
* Adding manpage for vmsock.
* Update formating of newly added manpages.
* Adding vmware-toolbox-cmd manpage.
* Adding guestlib manpage.
* Adding libvmtools manpage.
* Renaming guestlib manpage to libguestlib.
* Including vmware-toolbox-cmd manpage in open-vm-tools package.
* Updating initscript start/stop declarations (Closes: #576843,
  #577163).
* Adding misc depends.
* Running open-vm-dkms postinst script with set -e.
* Adding remote_fs to init depends.
* Avoid including license files in open-vm-dkms.
* Marking makefiles in open-vm-dkms executable to please lintian.
* Adding make to open-vm-dkms depends.
* Also stopping in runlevel 1.
* Addding dkms support based on the work of Evan Broder
  <broder@mit.edu> on the ubuntu package (Closes: #516251).
* Simplyfing initramfs triggers (Closes: #516355).
* Merging upstream version 2010.03.20-243334.
* Moving local Makefile to subdirectory.
* Adding build-depends to libfuse-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
#  define HGFS_LOCK_DESTROY(lock)   MXUser_DestroyExclLock(lock)
99
99
#endif
100
100
 
 
101
#ifdef _WIN32
 
102
# define HGFS_REPLYPKT_STATUS  RPC_S_PROTOCOL_ERROR
 
103
#else
 
104
# define HGFS_REPLYPKT_STATUS  EPROTO
 
105
#endif
 
106
 
 
107
#define HGFS_REPLYPKT_CHECK(replyPacket, replySize, replyPacketSize, status, label)  \
 
108
   do {                                                         \
 
109
      LOG(4, ("%s: \n", __FUNCTION__));                         \
 
110
      ASSERT_DEVEL(replyPacket);                                \
 
111
      if (!replyPacket || ((replySize) > (replyPacketSize))) {  \
 
112
         status = HGFS_REPLYPKT_STATUS;                         \
 
113
         goto label;                                            \
 
114
      }                                                         \
 
115
   } while(0)
 
116
 
101
117
 
102
118
/*
103
119
 * Does this platform have oplock support? We define it here to avoid long
305
321
   /* Session is dynamic or internal. */
306
322
   HgfsSessionInfoType type;
307
323
 
308
 
   /* Function to send reply for a packet after processing. */
309
 
   HgfsSessionSendFunc *send;
 
324
   /* Function callbacks into Hgfs Channels. */
 
325
   HgfsServerChannelCallbacks *channelCbTable;
310
326
 
311
327
   /* Lock to ensure some fileIO requests are atomic for a handle. */
312
328
   HgfsLock *fileIOLock;
438
454
   HgfsServerLock serverLock;
439
455
} ServerLockData;
440
456
 
 
457
typedef
 
458
struct HgfsInputParam {
 
459
   const char *metaPacket;
 
460
   size_t metaPacketSize;
 
461
   HgfsSessionInfo *session;
 
462
   HgfsPacket *packet;
 
463
}
 
464
HgfsInputParam;
441
465
 
442
466
Bool
443
467
HgfsCreateAndCacheFileNode(HgfsFileOpenInfo *openInfo, // IN: Open info struct
524
548
 */
525
549
 
526
550
HgfsInternalStatus
527
 
HgfsServerOpen(char const *packetIn,       // IN: incoming packet
528
 
               size_t packetSize,          // IN: size of packet
529
 
               HgfsSessionInfo *session);  // IN: opaque transport data
530
 
 
531
 
HgfsInternalStatus
532
 
HgfsServerRead(char const *packetIn,       // IN: incoming packet
533
 
               size_t packetSize,          // IN: size of packet
534
 
               HgfsSessionInfo *session);  // IN: opaque transport data
535
 
 
536
 
HgfsInternalStatus
537
 
HgfsServerWrite(char const *packetIn,       // IN: incoming packet
538
 
                size_t packetSize,          // IN: size of packet
539
 
                HgfsSessionInfo *session);  // IN: opaque transport data
540
 
 
541
 
HgfsInternalStatus
542
 
HgfsServerSearchOpen(char const *packetIn,       // IN: incoming packet
543
 
                     size_t packetSize,          // IN: size of packet
544
 
                     HgfsSessionInfo *session);  // IN: opaque transport data
545
 
 
546
 
HgfsInternalStatus
547
 
HgfsServerSearchRead(char const *packetIn,       // IN: incoming packet
548
 
                     size_t packetSize,          // IN: size of packet
549
 
                     HgfsSessionInfo *session);  // IN: opaque transport data
550
 
 
551
 
HgfsInternalStatus
552
 
HgfsServerGetattr(char const *packetIn,       // IN: incoming packet
553
 
                  size_t packetSize,          // IN: size of packet
554
 
                  HgfsSessionInfo *session);  // IN: opaque transport data
555
 
 
556
 
HgfsInternalStatus
557
 
HgfsServerSetattr(char const *packetIn,       // IN: incoming packet
558
 
                  size_t packetSize,          // IN: size of packet
559
 
                  HgfsSessionInfo *session);  // IN: opaque transport data
560
 
 
561
 
HgfsInternalStatus
562
 
HgfsServerCreateDir(char const *packetIn,       // IN: incoming packet
563
 
                    size_t packetSize,          // IN: size of packet
564
 
                    HgfsSessionInfo *session);  // IN: opaque transport data
565
 
 
566
 
HgfsInternalStatus
567
 
HgfsServerDeleteFile(char const *packetIn,       // IN: incoming packet
568
 
                     size_t packetSize,          // IN: size of packet
569
 
                     HgfsSessionInfo *session);  // IN: opaque transport data
570
 
 
571
 
HgfsInternalStatus
572
 
HgfsServerDeleteDir(char const *packetIn,       // IN: incoming packet
573
 
                    size_t packetSize,          // IN: size of packet
574
 
                    HgfsSessionInfo *session);  // IN: opaque transport data
575
 
 
576
 
HgfsInternalStatus
577
 
HgfsServerRename(char const *packetIn,       // IN: incoming packet
578
 
                 size_t packetSize,          // IN: size of packet
579
 
                 HgfsSessionInfo *session);  // IN: opaque transport data
580
 
 
581
 
HgfsInternalStatus
582
 
HgfsServerQueryVolume(char const *packetIn,       // IN: incoming packet
583
 
                      size_t packetSize,          // IN: size of packet
584
 
                      HgfsSessionInfo *session);  // IN: opaque transport data
585
 
 
586
 
HgfsInternalStatus
587
 
HgfsServerSymlinkCreate(char const *packetIn,       // IN: incoming packet
588
 
                        size_t packetSize,          // IN: size of packet
589
 
                        HgfsSessionInfo *session);  // IN: opaque transport data
590
 
 
591
 
HgfsInternalStatus
592
 
HgfsServerServerLockChange(char const *packetIn,       // IN: incoming packet
593
 
                           size_t packetSize,          // IN: size of packet
594
 
                           HgfsSessionInfo *session);  // IN: opaque transport data
595
 
 
596
 
HgfsInternalStatus
597
 
HgfsServerWriteWin32Stream(char const *packetIn,       // IN: incoming packet
598
 
                           size_t packetSize,          // IN: size of packet
599
 
                           HgfsSessionInfo *session);  // IN: opaque transport data
 
551
HgfsServerOpen(HgfsInputParam *input);  // IN: Input params
 
552
 
 
553
HgfsInternalStatus
 
554
HgfsServerRead(HgfsInputParam *input);  // IN: Input params
 
555
 
 
556
HgfsInternalStatus
 
557
HgfsServerWrite(HgfsInputParam *input);  // IN: Input params
 
558
 
 
559
HgfsInternalStatus
 
560
HgfsServerSearchOpen(HgfsInputParam *input);  // IN: Input params
 
561
 
 
562
HgfsInternalStatus
 
563
HgfsServerSearchRead(HgfsInputParam *input);  // IN: Input params
 
564
 
 
565
HgfsInternalStatus
 
566
HgfsServerGetattr(HgfsInputParam *input);  // IN: Input params
 
567
 
 
568
HgfsInternalStatus
 
569
HgfsServerSetattr(HgfsInputParam *input);  // IN: Input params
 
570
 
 
571
HgfsInternalStatus
 
572
HgfsServerCreateDir(HgfsInputParam *input);  // IN: Input params
 
573
 
 
574
HgfsInternalStatus
 
575
HgfsServerDeleteFile(HgfsInputParam *input);  // IN: Input params
 
576
 
 
577
HgfsInternalStatus
 
578
HgfsServerDeleteDir(HgfsInputParam *input);  // IN: Input params
 
579
 
 
580
HgfsInternalStatus
 
581
HgfsServerRename(HgfsInputParam *input);  // IN: Input params
 
582
 
 
583
HgfsInternalStatus
 
584
HgfsServerQueryVolume(HgfsInputParam *input);  // IN: Input params
 
585
 
 
586
HgfsInternalStatus
 
587
HgfsServerSymlinkCreate(HgfsInputParam *input);  // IN: Input params
 
588
 
 
589
HgfsInternalStatus
 
590
HgfsServerServerLockChange(HgfsInputParam *input);  // IN: Input params
 
591
 
 
592
HgfsInternalStatus
 
593
HgfsServerWriteWin32Stream(HgfsInputParam *input);  // IN: Input params
600
594
 
601
595
/* Unpack/pack requests/reply helper functions. */
602
596
 
606
600
                     HgfsFileOpenInfo *openInfo);  // IN/OUT: open info struct
607
601
 
608
602
Bool
609
 
HgfsPackOpenReply(char const *packetIn,         // IN: incoming packet
610
 
                  HgfsInternalStatus status,    // IN: reply status
611
 
                  HgfsFileOpenInfo *openInfo,   // IN: open info struct
612
 
                  char **packetOut,             // OUT: outgoing packet
613
 
                  size_t *packetSize);          // OUT: outgoing packet size
614
 
 
 
603
HgfsPackOpenReply(HgfsPacket *packet,            // IN/OUT: Hgfs Packet
 
604
                  char const *packetIn,          // IN: incoming packet
 
605
                  HgfsInternalStatus status,     // IN: reply status
 
606
                  HgfsFileOpenInfo *openInfo,    // IN: open info struct
 
607
                  char **packetOut,              // OUT: outgoing packet
 
608
                  size_t *packetSize,            // OUT: size of packet
 
609
                  HgfsSessionInfo *session);     // IN: Session info
615
610
Bool
616
611
HgfsUnpackGetattrRequest(char const *packetIn,       // IN: request packet
617
612
                         size_t packetSize,          // IN: request packet size
633
628
                        uint32 *caseFlags);         // OUT: case-sensitivity flags
634
629
 
635
630
Bool
636
 
HgfsPackDeleteReply(char const *packetIn,          // IN: incoming packet
637
 
                    HgfsInternalStatus status,     // IN: reply status
638
 
                    HgfsOp op,                     // IN: requested operation
639
 
                    char **packetOut,              // OUT: outgoing packet
640
 
                    size_t *packetSize);           // OUT: size of packet
 
631
HgfsPackDeleteReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
632
                    char const *packetIn,       // IN: incoming packet
 
633
                    HgfsInternalStatus status,  // IN: reply status
 
634
                    HgfsOp op,                  // IN: requested operation
 
635
                    char **packetOut,           // OUT: outgoing packet
 
636
                    size_t *packetSize,         // OUT: size of packet
 
637
                    HgfsSessionInfo *session);  // IN: Session Info
641
638
 
642
639
Bool
643
640
HgfsUnpackRenameRequest(char const *packetIn,       // IN: request packet
654
651
                        uint32 *newCaseFlags);      // OUT: new case-sensitivity flags
655
652
 
656
653
Bool
657
 
HgfsPackRenameReply(char const *packetIn,      // IN: incoming packet
658
 
                    HgfsInternalStatus status, // IN: reply status
659
 
                    HgfsOp op,                 // IN: requested operation
660
 
                    char **packetOut,          // OUT: outgoing packet
661
 
                    size_t *packetSize);       // OUT: size of packet
 
654
HgfsPackRenameReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
655
                    char const *packetIn,       // IN: incoming packet
 
656
                    HgfsInternalStatus status,  // IN: reply status
 
657
                    HgfsOp op,                  // IN: requested operation
 
658
                    char **packetOut,           // OUT: outgoing packet
 
659
                    size_t *packetSize,         // OUT: size of packet
 
660
                    HgfsSessionInfo *session);  // IN: Session Info
662
661
 
663
662
Bool
664
 
HgfsPackGetattrReply(char const *packetIn,       // IN: incoming packet
665
 
                     HgfsInternalStatus status,  // IN: reply status
666
 
                     HgfsFileAttrInfo *attr,     // IN: attr stucture
667
 
                     const char *utf8TargetName, // IN: optional target name
668
 
                     uint32 utf8TargetNameLen,   // IN: file name length
669
 
                     char **packetOut,           // OUT: outgoing packet
670
 
                     size_t *packetSize);        // OUT: size of packet
671
 
 
 
663
HgfsPackGetattrReply(HgfsPacket *packet,          // IN/OUT: Hgfs packet
 
664
                     char const *packetIn,        // IN: incoming packet
 
665
                     HgfsInternalStatus status,   // IN: reply status
 
666
                     HgfsFileAttrInfo *attr,      // IN: attr stucture
 
667
                     const char *utf8TargetName,  // IN: optional target name
 
668
                     uint32 utf8TargetNameLen,    // IN: file name length
 
669
                     char **packetOut,            // OUT: outgoing packet
 
670
                     size_t *packetSize,          // OUT: size of packet
 
671
                     HgfsSessionInfo *session);   // IN: Session Info
672
672
Bool
673
673
HgfsUnpackSearchReadRequest(const char *packetIn,         // IN: request packet
674
674
                            size_t packetSize,            // IN: packet size
677
677
                            uint32 *offset);              // OUT: entry offset
678
678
 
679
679
Bool
680
 
HgfsPackSearchReadReply(char const *packetIn,      // IN: incoming packet
681
 
                        HgfsInternalStatus status, // IN: reply status
682
 
                        const char *utf8Name,      // IN: file name
683
 
                        size_t utf8NameLen,        // IN: file name length
684
 
                        HgfsFileAttrInfo *attr,    // IN: file attr struct
685
 
                        char **packetOut,          // OUT: outgoing packet
686
 
                        size_t *packetSize);       // OUT: size of packet
 
680
HgfsPackSearchReadReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
681
                        char const *packetIn,       // IN: incoming packet
 
682
                        HgfsInternalStatus status,  // IN: reply status
 
683
                        const char *utf8Name,       // IN: file name
 
684
                        size_t utf8NameLen,         // IN: file name length
 
685
                        HgfsFileAttrInfo *attr,     // IN: file attr struct
 
686
                        char **packetOut,           // OUT: outgoing packet
 
687
                        size_t *packetSize,         // OUT: size of packet
 
688
                        HgfsSessionInfo *session);  // IN: Session Info
687
689
 
688
690
Bool
689
691
HgfsUnpackSetattrRequest(char const *packetIn,            // IN: request packet
696
698
                         uint32 *caseFlags);              // OUT: case-sensitivity flags
697
699
 
698
700
Bool
699
 
HgfsPackSetattrReply(char const *packetIn,       // IN: setattrOp operation version
 
701
HgfsPackSetattrReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
702
                     char const *packetIn,       // IN: incoming packet
700
703
                     HgfsInternalStatus status,  // IN: reply status
701
704
                     HgfsOp op,                  // IN: request type
702
705
                     char **packetOut,           // OUT: outgoing packet
703
 
                     size_t *packetSize);        // OUT: size of packet
704
 
 
 
706
                     size_t *packetSize,         // OUT: size of packet
 
707
                     HgfsSessionInfo *session);  // IN: Session Info
705
708
 
706
709
Bool
707
710
HgfsUnpackCreateDirRequest(char const *packetIn,     // IN: incoming packet
709
712
                           HgfsCreateDirInfo *info); // IN/OUT: info struct
710
713
 
711
714
Bool
712
 
HgfsPackCreateDirReply(char const *packetIn,      // IN: incoming packet
713
 
                       HgfsInternalStatus status, // IN: reply status
714
 
                       HgfsOp op,                 // IN: request type
715
 
                       char **packetOut,          // OUT: outgoing packet
716
 
                       size_t *packetSize);       // OUT: size of packet
 
715
HgfsPackCreateDirReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
716
                       char const *packetIn,       // IN: create dir operation version
 
717
                       HgfsInternalStatus status , // IN: reply status
 
718
                       HgfsOp op,                  // IN: request type
 
719
                       char **packetOut,           // OUT: outgoing packet
 
720
                       size_t *packetSize,         // OUT: size of packet
 
721
                       HgfsSessionInfo *session);  // IN: Session Info
717
722
 
718
723
Bool
719
724
HgfsUnpackWriteWin32StreamRequest(char const *packetIn, // IN: incoming packet
725
730
                                  Bool *doSecurity);    // OUT: restore sec.str.
726
731
 
727
732
Bool
728
 
HgfsPackWriteWin32StreamReply(char const *packetIn,      // IN: incoming packet
729
 
                              HgfsInternalStatus status, // IN: reply status
730
 
                              HgfsOp op,                 // IN: request type
731
 
                              uint32 actualSize,         // IN: amount written
732
 
                              char **packetOut,          // OUT: outgoing packet
733
 
                              size_t *packetSize);       // OUT: size of packet
 
733
HgfsPackWriteWin32StreamReply(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
734
                              char const *packetIn,       // IN: incoming packet
 
735
                              HgfsInternalStatus status,  // IN: reply status
 
736
                              HgfsOp op,                  // IN: request type
 
737
                              uint32 actualSize,          // IN: amount written
 
738
                              char **packetOut,           // OUT: outgoing packet
 
739
                              size_t *packetSize,         // OUT: size of packet
 
740
                              HgfsSessionInfo *session);  // IN:Session Info
 
741
 
734
742
Bool
735
743
HgfsUnpackCloseRequest(char const *packetIn,        // IN: request packet
736
744
                       size_t packetSize,           // IN: request packet size
737
745
                       HgfsOp *op,                  // OUT: request type
738
746
                       HgfsHandle *file);           // OUT: Handle to close
 
747
 
739
748
Bool
740
 
HgfsPackCloseReply(char const *packetIn,      // IN: incoming packet
741
 
                  HgfsInternalStatus status,  // IN: reply status
742
 
                  HgfsOp op,                  // IN: request type
743
 
                  char **packetOut,           // OUT: outgoing packet
744
 
                  size_t *packetSize);        // OUT: size of packet
 
749
HgfsPackCloseReply(HgfsPacket *packet,          // IN/OUT: Hgfs Packet
 
750
                   char const *packetIn,        // IN: incoming packet
 
751
                   HgfsInternalStatus status,   // IN: reply status
 
752
                   HgfsOp op,                   // IN: request type
 
753
                   char **packetOut,            // OUT: outgoing packet
 
754
                   size_t *packetSize,          // OUT: size of packet
 
755
                   HgfsSessionInfo *session);   // IN: Session Info
 
756
 
745
757
Bool
746
758
HgfsUnpackSearchCloseRequest(char const *packetIn,        // IN: request packet
747
759
                             size_t packetSize,           // IN: request packet size
748
760
                             HgfsOp *op,                  // OUT: request type
749
761
                             HgfsHandle *file);           // OUT: Handle to close
 
762
 
750
763
Bool
751
 
HgfsPackSearchCloseReply(char const *packetIn,      // IN: incoming packet
752
 
                         HgfsInternalStatus status,  // IN: reply status
753
 
                         HgfsOp op,                  // IN: request type
754
 
                         char **packetOut,           // OUT: outgoing packet
755
 
                         size_t *packetSize);        // OUT: size of packet
 
764
HgfsPackSearchCloseReply(HgfsPacket *packet,          // IN/OUT: Hgfs Packet
 
765
                         char const *packetIn,        // IN: incoming packet
 
766
                         HgfsInternalStatus status,   // IN: reply status
 
767
                         HgfsOp op,                   // IN: request type
 
768
                         char **packetOut,            // OUT: outgoing packet
 
769
                         size_t *packetSize,          // OUT: size of packet
 
770
                         HgfsSessionInfo *session);   // IN: Session Info
756
771
 
757
772
/* Node cache functions. */
758
773
 
909
924
 
910
925
/* Transport related functions. */
911
926
Bool
912
 
HgfsPackAndSendPacket(char *packet,               // IN: packet to send
913
 
                      size_t packetSize,          // IN: packet size
914
 
                      HgfsInternalStatus status,  // IN: status
915
 
                      HgfsHandle id,              // IN: id of the request packet
916
 
                      HgfsSessionInfo *session,   // IN: session info
917
 
                      HgfsSendFlags flags);       // IN: flags how to send
 
927
HgfsPackAndSendPacket(HgfsPacket *packet,           // IN/OUT: Hgfs Packet
 
928
                      char *packetOut,              // IN: Output packet to send
 
929
                      size_t packetOutLen,          // IN: Output packet size
 
930
                      HgfsInternalStatus status,    // IN: status
 
931
                      HgfsHandle id,                // IN: id of the request packet
 
932
                      HgfsSessionInfo *session,     // IN: session info
 
933
                      HgfsSendFlags flags);         // IN: flags how to send
918
934
 
919
935
Bool
920
 
HgfsPacketSend(char *packet,                // IN: packet buffer
921
 
               size_t packetSize,           // IN: packet size
922
 
               HgfsSessionInfo *session,    // IN: session info
923
 
               HgfsSendFlags flags);        // IN: flags how to send
 
936
HgfsPacketSend(HgfsPacket *packet,            // IN/OUT: Hgfs Packet
 
937
               char *packetOut,               // IN: Output packet buffer
 
938
               size_t packetOutLen,           // IN: Output packet size
 
939
               HgfsSessionInfo *session,      // IN: session info
 
940
               HgfsSendFlags flags);          // IN: flags how to send
924
941
 
925
942
Bool
926
943
HgfsServerCheckOpenFlagsForShare(HgfsFileOpenInfo *openInfo, // IN: Hgfs file handle
927
944
                                 HgfsOpenFlags *flags);      // IN/OUT: open mode
928
945
 
 
946
 
 
947
void *
 
948
HSPU_GetBuf(HgfsPacket *packet,           // IN/OUT: Hgfs Packet
 
949
            uint32 startIndex,            // IN: start index of iov
 
950
            void **buf,                   // OUT: Contigous buffer
 
951
            size_t bufSize,               // IN: Size of buffer
 
952
            Bool *isAllocated,            // OUT: Was buffer allocated ?
 
953
            uint32 mappingType,           // IN: Readable/ Writeable ?
 
954
            HgfsSessionInfo *session);    // IN: Session Info
 
955
 
 
956
void *
 
957
HSPU_GetMetaPacket(HgfsPacket *packet,          // IN/OUT: Hgfs Packet
 
958
                   size_t *metaPacketSize,      // OUT: Size of metaPacket
 
959
                   HgfsSessionInfo *session);   // IN: Session Info
 
960
 
 
961
void *
 
962
HSPU_GetDataPacketBuf(HgfsPacket *packet,        // IN/OUT: Hgfs Packet
 
963
                      uint32 mappingType,        // IN: Readable/ Writeable ?
 
964
                      HgfsSessionInfo *session); // IN: Session Info
 
965
 
 
966
void
 
967
HSPU_PutPacket(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
968
               HgfsSessionInfo *session);  // IN: Session Info
 
969
 
 
970
void
 
971
HSPU_PutBuf(HgfsPacket *packet,        // IN/OUT: Hgfs Packet
 
972
            uint32 startIndex,         // IN: Start of iov
 
973
            void **buf,                // IN/OUT: Buffer to be freed
 
974
            size_t *bufSize,           // IN: Size of the buffer
 
975
            Bool *isAllocated,         // IN: Was buffer allocated ?
 
976
            uint32 mappingType,        // IN: Readable/ Writeable ?
 
977
            HgfsSessionInfo *session); // IN: Session info
 
978
 
 
979
void
 
980
HSPU_PutDataPacketBuf(HgfsPacket *packet,         // IN/OUT: Hgfs Packet
 
981
                      HgfsSessionInfo *session);  // IN: Session Info
 
982
 
 
983
void
 
984
HSPU_PutMetaPacket(HgfsPacket *packet,        // IN/OUT: Hgfs Packet
 
985
                   HgfsSessionInfo *session); // IN: Session Info
 
986
 
 
987
void
 
988
HSPU_CopyBufToDataIovec(HgfsPacket *packet,       // IN/OUT: Hgfs packet
 
989
                        void *buf,                // IN: Buffer to copy from
 
990
                        uint32 bufSize,           // IN: Size of buffer
 
991
                        HgfsSessionInfo *session);// IN: Session Info
 
992
void
 
993
HSPU_CopyBufToIovec(HgfsPacket *packet,       // IN/OUT: Hgfs Packet
 
994
                    uint32 startIndex,        // IN: start index into iov
 
995
                    void *buf,                // IN: Buffer
 
996
                    size_t bufSize,           // IN: Size of buffer
 
997
                    HgfsSessionInfo *session); // IN: Session Info
 
998
void *
 
999
HSPU_GetReplyPacket(HgfsPacket *packet,        // IN/OUT: Hgfs Packet
 
1000
                    size_t *replyPacketSize,   //IN/OUT: Size of reply Packet
 
1001
                    HgfsSessionInfo *session); // IN: Session Info
 
1002
 
 
1003
void
 
1004
HSPU_PutReplyPacket(HgfsPacket *packet,        // IN/OUT: Hgfs Packet
 
1005
                    HgfsSessionInfo *session); // IN: Session Info
929
1006
#endif /* __HGFS_SERVER_INT_H__ */