summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2003-09-08 05:46:09 +0000
committerBob Beck <beck@cvs.openbsd.org>2003-09-08 05:46:09 +0000
commit85f28c45646aac9db9b6ff3e262238e75842090e (patch)
tree29eb9c25140d60d3e544087c8e3a64cdca1d5927 /usr.sbin
parent6a3121ea891c667013db672435ac68454b44320e (diff)
fix pr 3442 - make all AFS ioctl's for XFS come from the xfs/xfs_pioctl.h
file from the kernel - this makes the kerberosV/kafs.h file include that, as well as the kafs.h used in afs (hiding in the afs sources). this needs more drastic gutting post release, but at least this now all uses the same ioctl's.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/afs/src/include/kafs.h178
1 files changed, 68 insertions, 110 deletions
diff --git a/usr.sbin/afs/src/include/kafs.h b/usr.sbin/afs/src/include/kafs.h
index 615a875503a..fa858101203 100644
--- a/usr.sbin/afs/src/include/kafs.h
+++ b/usr.sbin/afs/src/include/kafs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
+ * Copyright (c) 1995 - 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $KTH: kafs.h,v 1.32.2.2 2001/10/02 16:13:12 jimmy Exp $ */
+/* $arla: kafs.h,v 1.49 2003/01/09 16:46:56 lha Exp $ */
#ifndef __KAFS_H
#define __KAFS_H
@@ -53,6 +53,10 @@
#define _ARLAIOCTL(id) ((unsigned int ) _IOW('A', id, struct ViceIoctl))
#endif /* _ARLAIOCTL */
+#ifndef _AFSCOMMONIOCTL
+#define _AFSCOMMONIOCTL(id) ((unsigned int ) _IOW('C', id, struct ViceIoctl))
+#endif /* _AFSCOMMONIOCTL */
+
/*
* this is for operating systems that support a 32-bit API while being
* 64-bit (such as solaris 7 in 64 bit mode). The ioctls will get
@@ -70,6 +74,10 @@
#define _ARLAIOCTL32(id) ((unsigned int ) _IOW('A', id, struct ViceIoctl32))
#endif /* _ARLAIOCTL32 */
+#ifndef _AFSCOMMONIOCTL32
+#define _AFSCOMMONIOCTL32(id) ((unsigned int ) _IOW('C', id, struct ViceIoctl32))
+#endif /* _AFSCOMMONIOCTL32 */
+
#ifndef _VICEIOCTL64
#define _VICEIOCTL64(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl64))
#endif /* _VICEIOCTL64 */
@@ -78,18 +86,18 @@
#define _ARLAIOCTL64(id) ((unsigned int ) _IOW('A', id, struct ViceIoctl64))
#endif /* _ARLAIOCTL64 */
+#ifndef _AFSCOMMONIOCTL64
+#define _AFSCOMMONIOCTL64(id) ((unsigned int ) _IOW('C', id, struct ViceIoctl64))
+#endif /* _AFSCOMMONIOCTL64 */
#endif /* NEED_VICEIOCTL32 */
+#include <xfs/xfs_pioctl.h>
/*
* ioctls
*/
-#define VIOCCLOSEWAIT _VICEIOCTL(1)
-#define VIOCABORT _VICEIOCTL(2)
-#define VIOIGETCELL _VICEIOCTL(3)
-
#define VIOCCLOSEWAIT_32 _VICEIOCTL32(1)
#define VIOCABORT_32 _VICEIOCTL32(2)
#define VIOIGETCELL_32 _VICEIOCTL32(3)
@@ -98,78 +106,15 @@
* pioctls
*/
-#define VIOCSETAL _VICEIOCTL(1)
-#define VIOCGETAL _VICEIOCTL(2)
-#define VIOCSETTOK _VICEIOCTL(3)
-#define VIOCGETVOLSTAT _VICEIOCTL(4)
-#define VIOCSETVOLSTAT _VICEIOCTL(5)
-#define VIOCFLUSH _VICEIOCTL(6)
-#define VIOCSTAT _VICEIOCTL(7)
-#define VIOCGETTOK _VICEIOCTL(8)
-#define VIOCUNLOG _VICEIOCTL(9)
-#define VIOCCKSERV _VICEIOCTL(10)
-#define VIOCCKBACK _VICEIOCTL(11)
-#define VIOCCKCONN _VICEIOCTL(12)
-#define VIOCGETTIME _VICEIOCTL(13)
-#define VIOCWHEREIS _VICEIOCTL(14)
-#define VIOCPREFETCH _VICEIOCTL(15)
-#define VIOCNOP _VICEIOCTL(16)
-#define VIOCENGROUP _VICEIOCTL(17)
-#define VIOCDISGROUP _VICEIOCTL(18)
-#define VIOCLISTGROUPS _VICEIOCTL(19)
-#define VIOCACCESS _VICEIOCTL(20)
-#define VIOCUNPAG _VICEIOCTL(21)
-#define VIOCGETFID _VICEIOCTL(22)
-#define VIOCWAITFOREVER _VICEIOCTL(23)
-#define VIOCSETCACHESIZE _VICEIOCTL(24)
-#define VIOCFLUSHCB _VICEIOCTL(25)
-#define VIOCNEWCELL _VICEIOCTL(26)
-#define VIOCGETCELL _VICEIOCTL(27)
-#define VIOC_AFS_DELETE_MT_PT _VICEIOCTL(28)
-#define VIOC_AFS_STAT_MT_PT _VICEIOCTL(29)
-#define VIOC_FILE_CELL_NAME _VICEIOCTL(30)
-#define VIOC_GET_WS_CELL _VICEIOCTL(31)
-#define VIOC_AFS_MARINER_HOST _VICEIOCTL(32)
-#define VIOC_GET_PRIMARY_CELL _VICEIOCTL(33)
-#define VIOC_VENUSLOG _VICEIOCTL(34)
-#define VIOC_GETCELLSTATUS _VICEIOCTL(35)
-#define VIOC_SETCELLSTATUS _VICEIOCTL(36)
-#define VIOC_FLUSHVOLUME _VICEIOCTL(37)
-#define VIOC_AFS_SYSNAME _VICEIOCTL(38)
-#define VIOC_EXPORTAFS _VICEIOCTL(39)
-#define VIOCGETCACHEPARAMS _VICEIOCTL(40)
-#define VIOCCONNECTMODE _VICEIOCTL(41)
-#define VIOCGETVCXSTATUS _VICEIOCTL(41)
-#define VIOC_SETSPREFS33 _VICEIOCTL(42)
-#define VIOC_GETSPREFS _VICEIOCTL(43)
-#define VIOC_GAG _VICEIOCTL(44)
-#define VIOC_TWIDDLE _VICEIOCTL(45)
-#define VIOC_SETSPREFS _VICEIOCTL(46)
-#define VIOC_STORBEHIND _VICEIOCTL(47)
-#define VIOC_GCPAGS _VICEIOCTL(48)
-
-
-#define VIOC_GETRXKCRYPT _VICEIOCTL(55) /* 48 in some implementations */
-#define VIOC_SETRXKCRYPT _VICEIOCTL(56) /* with cryptosupport in afs */
-
-/* arla specific */
-
-#define VIOC_FPRIOSTATUS _VICEIOCTL(57) /* arla: set file prio */
-#define VIOC_FHGET _VICEIOCTL(58) /* arla: fallback getfh */
-#define VIOC_FHOPEN _VICEIOCTL(59) /* arla: fallback fhopen */
-
-#define VIOC_XFSDEBUG _VICEIOCTL(60) /* arla: controls xfsdebug */
-#define VIOC_ARLADEBUG _VICEIOCTL(61) /* arla: controls arla debug */
-
-#define VIOC_AVIATOR _VICEIOCTL(62) /* arla: debug interface */
-
-#define VIOC_XFSDEBUG_PRINT _VICEIOCTL(63) /* arla: print xfs status */
-
-#define VIOC_CALCULATE_CACHE _VICEIOCTL(64) /* arla: force cache check */
-
-#define VIOC_BREAKCALLBACK _VICEIOCTL(65) /* arla: break callback */
-
#define AIOC_STATISTICS _ARLAIOCTL(1) /* arla: fetch statistics */
+#define AIOC_PTSNAMETOID _ARLAIOCTL(2) /* arla: pts name to id */
+#define AIOC_GETCACHEPARAMS _ARLAIOCTL(3) /* arla: get cache params */
+#define AIOC_GETPREFETCH _ARLAIOCTL(4) /* arla: get prefetch value */
+#define AIOC_SETPREFETCH _ARLAIOCTL(5) /* arla: set prefetch value */
+#define AFSCOMMONIOC_GKK5SETTOK _ARLAIOCTL(6) /* gk k5 set token */
+
+#define AFSCOMMONIOC_NEWALIAS _AFSCOMMONIOCTL(1) /* common: ... */
+#define AFSCOMMONIOC_LISTALIAS _AFSCOMMONIOCTL(2) /* common: ... */
#ifdef NEED_VICEIOCTL32
@@ -224,6 +169,12 @@
#define VIOC_SETSPREFS_32 _VICEIOCTL32(46)
#define VIOC_STORBEHIND_32 _VICEIOCTL32(47)
#define VIOC_GCPAGS_32 _VICEIOCTL32(48)
+#define VIOC_GETINITPARAMS_32 _VICEIOCTL32(49)
+#define VIOC_GETCPREFS_32 _VICEIOCTL32(50)
+#define VIOC_SETCPREFS_32 _VICEIOCTL32(51)
+#define VIOC_FLUSHMOUNT_32 _VICEIOCTL32(52)
+#define VIOC_RXSTATPROC_32 _VICEIOCTL32(53)
+#define VIOC_RXSTATPEER_32 _VICEIOCTL32(54)
#define VIOC_GETRXKCRYPT_32 _VICEIOCTL32(55) /* 48 in some implementations */
#define VIOC_SETRXKCRYPT_32 _VICEIOCTL32(56) /* with cryptosupport in afs */
@@ -232,16 +183,18 @@
#define VIOC_FHGET_32 _VICEIOCTL32(58)
#define VIOC_FHOPEN_32 _VICEIOCTL32(59)
-#define VIOC_XFSDEBUG_32 _VICEIOCTL32(60)
+#define VIOC_NNPFSDEBUG_32 _VICEIOCTL32(60)
#define VIOC_ARLADEBUG_32 _VICEIOCTL32(61)
#define VIOC_AVIATOR_32 _VICEIOCTL32(62)
-#define VIOC_XFSDEBUG_PRINT_32 _VICEIOCTL32(63)
+#define VIOC_NNPFSDEBUG_PRINT_32 _VICEIOCTL32(63)
#define VIOC_CALCULATE_CACHE_32 _VICEIOCTL32(64)
#define VIOC_BREAKCALLBACK_32 _VICEIOCTL32(65)
+#define VIOC_PREFETCHTAPE_32 _VICEIOCTL32(66)
+#define VIOC_RESIDENCY_CMD_32 _VICEIOCTL32(67)
/* and now for the 64-bit versions */
@@ -294,7 +247,12 @@
#define VIOC_SETSPREFS_64 _VICEIOCTL64(46)
#define VIOC_STORBEHIND_64 _VICEIOCTL64(47)
#define VIOC_GCPAGS_64 _VICEIOCTL64(48)
-
+#define VIOC_GETINITPARAMS_64 _VICEIOCTL64(49)
+#define VIOC_GETCPREFS_64 _VICEIOCTL64(50)
+#define VIOC_SETCPREFS_64 _VICEIOCTL64(51)
+#define VIOC_FLUSHMOUNT_64 _VICEIOCTL64(52)
+#define VIOC_RXSTATPROC_64 _VICEIOCTL64(53)
+#define VIOC_RXSTATPEER_64 _VICEIOCTL64(54)
#define VIOC_GETRXKCRYPT_64 _VICEIOCTL64(55) /* 48 in some implementations */
#define VIOC_SETRXKCRYPT_64 _VICEIOCTL64(56) /* with cryptosupport in afs */
@@ -303,23 +261,35 @@
#define VIOC_FHGET_64 _VICEIOCTL64(58)
#define VIOC_FHOPEN_64 _VICEIOCTL64(59)
-#define VIOC_XFSDEBUG_64 _VICEIOCTL64(60)
+#define VIOC_NNPFSDEBUG_64 _VICEIOCTL64(60)
#define VIOC_ARLADEBUG_64 _VICEIOCTL64(61)
#define VIOC_AVIATOR_64 _VICEIOCTL64(62)
-#define VIOC_XFSDEBUG_PRINT_64 _VICEIOCTL64(63)
+#define VIOC_NNPFSDEBUG_PRINT_64 _VICEIOCTL64(63)
#define VIOC_CALCULATE_CACHE_64 _VICEIOCTL64(64)
#define VIOC_BREAKCALLBACK_64 _VICEIOCTL64(65)
+#define VIOC_PREFETCHTAPE_64 _VICEIOCTL64(66)
+#define VIOC_RESIDENCY_CMD_64 _VICEIOCTL64(67)
+
/*
* Arla implementationspecific IOCTL'S
*/
#define AIOC_STATISTICS_32 _ARLAIOCTL32(1) /* arla: fetch statistics */
#define AIOC_STATISTICS_64 _ARLAIOCTL64(1) /* arla: fetch statistics */
+#define AIOC_PTSNAMETOID_32 _ARLAIOCTL32(2) /* arla: pts name to id */
+#define AIOC_PTSNAMETOID_64 _ARLAIOCTL64(2) /* arla: pts name to id */
+#define AIOC_GETCACHEPARAMS_32 _ARLAIOCTL32(3) /* arla: get cache param */
+#define AIOC_GETCACHEPARAMS_64 _ARLAIOCTL64(3) /* arla: get cache param */
+
+#define AFSCOMMONIOC_NEWALIAS_32 _AFSCOMMONIOCTL32(1) /* common: ... */
+#define AFSCOMMONIOC_NEWALIAS_64 _AFSCOMMONIOCTL64(1) /* common: ... */
+#define AFSCOMMONIOC_LISTALIAS_32 _AFSCOMMONIOCTL32(2) /* common: ... */
+#define AFSCOMMONIOC_LISTALIAS_64 _AFSCOMMONIOCTL64(2) /* common: ... */
#endif /* NEED_VICEIOCTL32 */
@@ -340,6 +310,7 @@
#define CONNMODE_FETCH 2
#define CONNMODE_DISCONN 3
#define CONNMODE_PARCONNECTED 4
+#define CONNMODE_CONN_WITHCALLBACKS 5
/*
* The struct for VIOC_FPRIOSTATUS
@@ -354,16 +325,6 @@
#define FPRIO_GETMAX 2
#define FPRIO_SETMAX 3
-struct vioc_fprio {
- int16_t cmd;
- int16_t prio;
- int32_t Cell;
- int32_t Volume;
- int32_t Vnode;
- int32_t Unique;
-};
-
-
/*
* Flags for VIOCCKSERV
*/
@@ -384,26 +345,31 @@ struct vioc_fprio {
#define STATISTICS_REQTYPE_FETCHSTATUS 1
#define STATISTICS_REQTYPE_FETCHDATA 2
#define STATISTICS_REQTYPE_BULKSTATUS 3
+#define STATISTICS_REQTYPE_STOREDATA 4
+#define STATISTICS_REQTYPE_STORESTATUS 5
+/*
+ * for AIOC_GETCACHEPARAMS
+ */
+
+#define GETCACHEPARAMS_OPCODE_HIGHBYTES 1
+#define GETCACHEPARAMS_OPCODE_USEDBYTES 2
+#define GETCACHEPARAMS_OPCODE_LOWBYTES 3
+#define GETCACHEPARAMS_OPCODE_HIGHVNODES 4
+#define GETCACHEPARAMS_OPCODE_USEDVNODES 5
+#define GETCACHEPARAMS_OPCODE_LOWVNODES 6
-#if !defined(HAVE_STRUCT_VICEIOCTL_IN) || !defined(__KERNEL__)
-struct ViceIoctl {
- caddr_t in, out;
- short in_size;
- short out_size;
-};
-#endif
struct ViceIoctl32 {
- u_int32_t in, out; /* really caddr_t in 32 bits */
+ uint32_t in, out; /* really caddr_t in 32 bits */
short in_size;
short out_size;
};
#if NEED_VICEIOCTL32
struct ViceIoctl64 {
-#ifdef HAVE_U_INT64_T
- u_int64_t in, out; /* really caddr_t in 64 bits */
+#ifdef HAVE_UINT64_T
+ uint64_t in, out; /* really caddr_t in 64 bits */
#else
caddr_t in, out;
#endif
@@ -412,14 +378,6 @@ struct ViceIoctl64 {
};
#endif /* NEED_VICEIOCTL32 */
-struct ClearToken {
- int32_t AuthHandle;
- char HandShakeKey[8];
- int32_t ViceId;
- int32_t BeginTimestamp;
- int32_t EndTimestamp;
-};
-
#ifndef __P
#define __P(x) x
#endif