Remove support for Solaris pre-8
[openafs.git] / src / afs / exporter.h
index 61371b4..c6ba0c6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
@@ -17,6 +17,7 @@
 #define NFS_NOBODY      -2     /* maps Nfs's "nobody" but since not declared by some systems (i.e. Ultrix) we use a constant  */
 #endif
 #define        RMTUSER_REQ             0xabc
+#define        RMTUSER_REQ_PRIV        0xabe
 
 /**
   * There is a limitation on the number of bytes that can be passed into
@@ -33,7 +34,7 @@
   * up 2 bytes
   */
 
-#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZPTR==64)) || defined(AFS_LINUX_64BIT_KERNEL)
+#if defined(AFS_SUN5_64BIT_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZPTR==64)) || defined(AFS_LINUX_64BIT_KERNEL)
 #define        AFS_XLATOR_MAGIC        0x8765  /* XXX */
 #else
 #define        AFS_XLATOR_MAGIC        0x87654321
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 #define AFS_NFSXLATORREQ(cred) 0
 #else
-#ifdef AFS_OSF_ENV
-#define        AFS_NFSXLATORREQ(cred)    ((cred)->cr_ruid == NFSXLATOR_CRED)
-#else
-#define        AFS_NFSXLATORREQ(cred)    ((cred)->cr_rgid == NFSXLATOR_CRED)
-#endif
+#define        AFS_NFSXLATORREQ(cred)    (afs_cr_rgid(cred) == NFSXLATOR_CRED)
 #endif
 
+struct afs_exporter;
+
 struct exporterops {
-    int (*export_reqhandler) ();
-    int (*export_hold) ();
-    int (*export_rele) ();
-    int (*export_sysname) ();
-    int (*export_garbagecollect) ();
-    int (*export_statistics) ();
+    int (*export_reqhandler) (struct afs_exporter *exp,
+                             afs_ucred_t **cred,
+                             afs_uint32 host,
+                             afs_int32 *pag,
+                             struct afs_exporter **expp);
+    void (*export_hold) (struct afs_exporter *exp);
+    void (*export_rele) (struct afs_exporter *exp);
+    int (*export_sysname) (struct afs_exporter *exp,
+                          char *inname,
+                          char ***outname,
+                          int *num,
+                          int allpags);
+    void (*export_garbagecollect) (struct afs_exporter *exp,
+                                  afs_int32 param);
+    int (*export_statistics) (struct afs_exporter *exp);
+    int (*export_checkhost) (struct afs_exporter *exp, afs_uint32 host);
+    afs_uint32 (*export_gethost) (struct afs_exporter *exp);
 };
 
 struct exporterstats {
@@ -83,6 +93,8 @@ struct afs_exporter {
 #define        EXP_UNIXMODE    2
 #define        EXP_PWSYNC      4
 #define        EXP_SUBMOUNTS   8
+#define EXP_CLIPAGS    16
+#define EXP_CALLBACK   32
 
 
 #define        AFS_NFSFULLFID  1
@@ -93,12 +105,16 @@ struct afs_exporter {
         (*(EXP)->exp_op->export_hold)(EXP)
 #define        EXP_RELE(EXP)   \
         (*(EXP)->exp_op->export_rele)(EXP)
-#define        EXP_SYSNAME(EXP, INNAME, OUTNAME, NUM)   \
-        (*(EXP)->exp_op->export_sysname)(EXP, INNAME, OUTNAME, NUM)
+#define        EXP_SYSNAME(EXP, INNAME, OUTNAME, NUM, ALLPAGS)   \
+        (*(EXP)->exp_op->export_sysname)(EXP, INNAME, OUTNAME, NUM, ALLPAGS)
 #define        EXP_GC(EXP, param)      \
         (*(EXP)->exp_op->export_garbagecollect)(EXP, param)
 #define        EXP_STATISTICS(EXP)     \
         (*(EXP)->exp_op->export_statistics)(EXP)
+#define        EXP_CHECKHOST(EXP, HOST)        \
+        (*(EXP)->exp_op->export_checkhost)(EXP, HOST)
+#define        EXP_GETHOST(EXP)        \
+        (*(EXP)->exp_op->export_gethost)(EXP)
 
 struct afs3_fid {
     u_short len;