afsd-allow-maxmtu-override-20090530
[openafs.git] / src / config / afs_args.h
index 43c2d89..e599bda 100644 (file)
 #define        AFSOP_GETIFADDRS         21     /* get machine's ethernet interfaces */
 
 #define        AFSOP_ADDCELL2           29     /* 2nd add cell protocol interface */
+#define        AFSOP_AFSDB_HANDLER      30     /* userspace AFSDB lookup handler */
+#define        AFSOP_SET_DYNROOT        31     /* enable/disable dynroot support */
+#define        AFSOP_ADDCELLALIAS       32     /* create alias for existing cell */
+#define        AFSOP_SET_FAKESTAT       33     /* enable/disable fakestat support */
+#define        AFSOP_CELLINFO           34     /* set the cellinfo file name */
+#define        AFSOP_SET_THISCELL       35     /* set the primary cell */
+#define AFSOP_BASIC_INIT        36     /* used to be part of START_AFS */
+#define AFSOP_SET_BACKUPTREE    37     /* enable backup tree support */
+#define AFSOP_SET_RXPCK                 38     /* set rx_extraPackets*/
+#define AFSOP_BUCKETPCT          39     /* bucket percentage */
+#define AFSOP_SET_RXMAXMTU       40     /* set rx_MyMaxSendSize,rx_maxReceiveSizeUser,rx_maxReceiveSize */  
 
 /* The range 20-30 is reserved for AFS system offsets in the afs_syscall */
 #define        AFSCALL_PIOCTL          20
@@ -69,7 +80,7 @@
 #ifdef AFS_SGI53_ENV
 #define AFSOP_NFSSTATICADDR     32     /* to contents addr of nfs kernel addr */
 #define AFSOP_NFSSTATICADDRPTR  33     /* pass addr of variable containing 
-                                          address into kernel. */
+                                        * address into kernel. */
 #define AFSOP_NFSSTATICADDR2    34     /* pass address in as hyper. */
 #define AFSOP_SBLOCKSTATICADDR2  35    /* for sblock and sbunlock */
 #endif
 /* For SGI, this can't interfere with any of the 64 bit inode calls. */
 #define AFSOP_RXLISTENER_DAEMON  48    /* starts kernel RX listener */
 
+/* skip 64 bit calls */
+#define AFSOP_CACHEBASEDIR       50     /* cache base dir */
+#define AFSOP_CACHEDIRS          51     /* number of files per dir */
+#define AFSOP_CACHEFILES         52     /* number of files */
+
+#define AFSOP_SETINT             60     /* we should just set key/value pairs 
+                                          for things which are just ints */
+
 /* these are for initialization flags */
 
 #define AFSCALL_INIT_MEMCACHE 0x1
 
 /* flags for rxstats pioctl */
 
-#define AFSCALL_RXSTATS_MASK   0x7 /* Valid flag bits */
-#define AFSCALL_RXSTATS_ENABLE 0x1 /* Enable RX stats */
-#define AFSCALL_RXSTATS_DISABLE        0x2 /* Disable RX stats */
-#define AFSCALL_RXSTATS_CLEAR  0x4 /* Clear RX stats */
+#define AFSCALL_RXSTATS_MASK   0x7     /* Valid flag bits */
+#define AFSCALL_RXSTATS_ENABLE 0x1     /* Enable RX stats */
+#define AFSCALL_RXSTATS_DISABLE        0x2     /* Disable RX stats */
+#define AFSCALL_RXSTATS_CLEAR  0x4     /* Clear RX stats */
 
 #define        AFSOP_GO                100     /* whether settime is being done */
 /* not for initialization: debugging assist */
 /* #define AFSOP_STOP_RXEVENT   214     defined in osi.h             */
 /* #define AFSOP_STOP_COMPLETE     215  defined in osi.h             */
 /* #define AFSOP_STOP_RXK_LISTENER   217     defined in osi.h        */
+#define AFSOP_STOP_AFSDB       218     /* Stop AFSDB handler */
+#define AFSOP_STOP_NETIF        219     /* Stop Netif poller */
 
 /* Main afs syscall entry; this number may vary per system (i.e. defined in afs/param.h) */
 #ifndef        AFS_SYSCALL
@@ -122,6 +143,7 @@ struct afs_cacheParams {
     afs_int32 memCacheFlag;
     afs_int32 inodes;
     afs_int32 users;
+    afs_int32 dynamic_vcaches;
 };
 
 /*
@@ -131,11 +153,11 @@ struct afs_cacheParams {
 /* Used in rx.c as well as afs directory. */
 #if    defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV)
 /* XXX Because of rxkad_cprivate... XXX */
-#define        AFS_MDALLOCSIZ  (127*sizeof(void *))        /* "Medium" allocated size */
-#define        AFS_MALLOC_LOW_WATER    50 /* Min free blocks before allocating more */
-#define        AFS_SMALLOCSIZ  (38*sizeof(void *))         /* "Small" allocated size */
+#define        AFS_MDALLOCSIZ  (127*sizeof(void *))    /* "Medium" allocated size */
+#define        AFS_MALLOC_LOW_WATER    50      /* Min free blocks before allocating more */
+#define        AFS_SMALLOCSIZ  (38*sizeof(void *))     /* "Small" allocated size */
 #else
-#define        AFS_SMALLOCSIZ  (64*sizeof(void *))         /*  "Small" allocated size */
+#define        AFS_SMALLOCSIZ  (64*sizeof(void *))     /*  "Small" allocated size */
 #endif
 
 /* Cache configuration available through the client callback interface */
@@ -163,4 +185,63 @@ typedef struct cm_initparams_v1 {
 #define AFS_CLIENT_RETRIEVAL_VERSION           1       /* latest version */
 #define AFS_CLIENT_RETRIEVAL_FIRST_EDITION     1       /* first version */
 
+/* Defines and structures for the AFS proc replacement layer for the original syscall (AFS_SYSCALL) strategy */
+
+#ifdef AFS_LINUX20_ENV
+#define PROC_FSDIRNAME "openafs"
+#define PROC_SYSCALL_NAME "afs_ioctl"
+#define PROC_SYSCALL_FNAME "/proc/fs/openafs/afs_ioctl"
+#define PROC_SYSCALL_ARLA_FNAME "/proc/fs/nnpfs/afs_ioctl"
+#define PROC_CELLSERVDB_NAME "CellServDB"
+#define PROC_PEER_NAME "rx_peer"
+#define PROC_CONN_NAME "rx_conn"
+#define PROC_CALL_NAME "rx_call"
+#define PROC_RX_NAME "rx"
+#define PROC_SERVICES_NAME "rx_services"
+#define PROC_RXSTATS_NAME "rx_stats"
+#define VIOC_SYSCALL_TYPE 'C' 
+#define VIOC_SYSCALL _IOW(VIOC_SYSCALL_TYPE,1,void *)
+#define VIOC_SYSCALL32 _IOW(VIOC_SYSCALL_TYPE,1,int)
+struct afsprocdata {
+  long param4;
+  long param3;
+  long param2;
+  long param1;
+  long syscall;
+};
+
+struct afsprocdata32 {
+  unsigned int param4;
+  unsigned int param3;
+  unsigned int param2;
+  unsigned int param1;
+  unsigned int syscall;
+};
+#endif
+
+#ifdef AFS_DARWIN80_ENV
+struct afssysargs {
+     unsigned long syscall;
+     unsigned long param1;
+     unsigned long param2;
+     unsigned long param3;
+     unsigned long param4;
+     unsigned long param5;
+     unsigned long param6;
+     unsigned long retval;
+};
+#define VIOC_SYSCALL_TYPE 'C' 
+#define VIOC_SYSCALL _IOWR(VIOC_SYSCALL_TYPE,1,struct afssysargs)
+#define SYSCALL_DEV_FNAME "/dev/openafs_ioctl"
+#endif
+
+#ifdef AFS_CACHE_VNODE_PATH
+#define AFS_CACHE_CELLS_INODE -2
+#define AFS_CACHE_ITEMS_INODE -3
+#define AFS_CACHE_VOLUME_INODE -4
+#endif
+
 #endif /* _AFS_ARGS_H_ */