mountLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* mountLib.h - Mount protocol library header */
  2. /* Copyright 1994-2001 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01f,06nov01,vvv  made max. path length configurable (SPR #63551)
  7. 01e,10oct01,rae  update copyright
  8. 01d,21jun00,rsh  upgrade to dosFs 2.0
  9. 01d,21sep99,jkf  changed nameToInode for nfsHash approach.
  10. 01c,25apr94,jmm  added S_mountLib_ILLEGAL_MODE; changed mode to readOnly 
  11. 01b,21apr94,jmm  added MOUNTD_ARGUMENT; prototype cleanup
  12. 01a,31mar94,jmm  written.
  13. */
  14. #include "xdr_nfsserv.h"
  15. #ifndef __INCmountLibh
  16. #define __INCmountLibh
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /* mountLib status codes */
  21. #define S_mountLib_ILLEGAL_MODE             (M_mountLib | 1)
  22. /* mountLib defaults */
  23. #define MAX_EXPORTED_FILESYSTEMS 30
  24. #define MOUNTD_PRIORITY_DEFAULT  55
  25. #define MOUNTD_STACKSIZE_DEFAULT 10240
  26. /* Exported file systems */
  27. typedef struct
  28.     {
  29.     char * next; /* next and prev are used by lstLib */
  30.     char * prev;
  31.     int    dirFd; /* File descriptor for the exported directory */
  32.     ULONG  fsId;
  33.     int    volumeId;            /* Identifier for the file system */
  34.     BOOL   readOnly;
  35.     /*
  36.      * This is a character array - memory is allocated when the struct is
  37.      * allocated. This change was required for adding configurable path
  38.      * length support.
  39.      */
  40.     char   dirName [1];
  41.     } NFS_EXPORT_ENTRY;
  42. typedef union
  43.     {
  44.     dirpath mountproc_mnt_1_arg;
  45.     dirpath mountproc_umnt_1_arg;
  46.     } MOUNTD_ARGUMENT;
  47. #if defined(__STDC__) || defined(__cplusplus)
  48. extern STATUS mountdInit (int priority, int stackSize, FUNCPTR authHook,
  49.   int nExports, int options);
  50. extern void mountd (void);
  51. extern STATUS nfsExport (char * directory, int id, int mode, int options);
  52. extern STATUS nfsUnexport (char * dirName);
  53. extern NFS_EXPORT_ENTRY * nfsExportFindByName (char * dirName);
  54. extern NFS_EXPORT_ENTRY * nfsExportFindById (int volumeId);
  55. extern int fdToInode (int fd);
  56. extern int nameToInode (int, char * fileName);
  57. #else 
  58. extern STATUS mountdInit ();
  59. extern void mountd ();
  60. extern STATUS nfsExport ();
  61. extern STATUS nfsUnexport ();
  62. extern NFS_EXPORT_ENTRY * nfsExportFindByName ();
  63. extern NFS_EXPORT_ENTRY * nfsExportFindById ();
  64. extern int fdToInode ();
  65. extern int nameToInode ();
  66. #endif /* __STDC__ */
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif /* __INCmountLibh */