Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfs/nfs.h
Show All 30 Lines | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _NFS_NFS_H_ | #ifndef _NFS_NFS_H_ | ||||
#define _NFS_NFS_H_ | #define _NFS_NFS_H_ | ||||
#include <bsm/audit_kevents.h> | |||||
/* | /* | ||||
* Tunable constants for nfs | * Tunable constants for nfs | ||||
*/ | */ | ||||
#define NFS_MAXIOVEC 34 | #define NFS_MAXIOVEC 34 | ||||
#define NFS_TICKINTVL 500 /* Desired time for a tick (msec) */ | #define NFS_TICKINTVL 500 /* Desired time for a tick (msec) */ | ||||
#define NFS_HZ (hz / nfscl_ticks) /* Ticks/sec */ | #define NFS_HZ (hz / nfscl_ticks) /* Ticks/sec */ | ||||
#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */ | #define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */ | ||||
▲ Show 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/* | /* | ||||
* Structure for referral information. | * Structure for referral information. | ||||
*/ | */ | ||||
struct nfsreferral { | struct nfsreferral { | ||||
u_char *nfr_srvlist; /* List of servers */ | u_char *nfr_srvlist; /* List of servers */ | ||||
int nfr_srvcnt; /* number of servers */ | int nfr_srvcnt; /* number of servers */ | ||||
vnode_t nfr_vp; /* vnode for referral */ | struct vnode * nfr_vp; /* vnode for referral */ | ||||
uint64_t nfr_dfileno; /* assigned dir inode# */ | uint64_t nfr_dfileno; /* assigned dir inode# */ | ||||
}; | }; | ||||
/* | /* | ||||
* Flags for lc_flags and opsflags for nfsrv_getclient(). | * Flags for lc_flags and opsflags for nfsrv_getclient(). | ||||
*/ | */ | ||||
#define LCL_NEEDSCONFIRM 0x00000001 | #define LCL_NEEDSCONFIRM 0x00000001 | ||||
#define LCL_DONTCLEAN 0x00000002 | #define LCL_DONTCLEAN 0x00000002 | ||||
▲ Show 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define NFSV4ROOT_FSID0 ((int32_t) -1) | #define NFSV4ROOT_FSID0 ((int32_t) -1) | ||||
#define NFSV4ROOT_FSID1 ((int32_t) -1) | #define NFSV4ROOT_FSID1 ((int32_t) -1) | ||||
#define NFSV4ROOT_REFERRAL ((int32_t) -2) | #define NFSV4ROOT_REFERRAL ((int32_t) -2) | ||||
#define NFSV4ROOT_INO 2 /* It's traditional */ | #define NFSV4ROOT_INO 2 /* It's traditional */ | ||||
#define NFSV4ROOT_GEN 1 | #define NFSV4ROOT_GEN 1 | ||||
/* | /* | ||||
* This array indicates the audit event number corresponding to NFSv3 and | |||||
* NFSv2 RPCs. This table doesn't support NFSv4. | |||||
*/ | |||||
extern u_int16_t nfsrv_auevent[NFS_V3NPROCS]; | |||||
/* | |||||
* The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts. | * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts. | ||||
* What should be in this set is open to debate, but I believe that since | * What should be in this set is open to debate, but I believe that since | ||||
* I/O system calls on ufs are never interrupted by signals the set should | * I/O system calls on ufs are never interrupted by signals the set should | ||||
* be minimal. My reasoning is that many current programs that use signals | * be minimal. My reasoning is that many current programs that use signals | ||||
* such as SIGALRM will not expect file I/O system calls to be interrupted | * such as SIGALRM will not expect file I/O system calls to be interrupted | ||||
* by them and break. | * by them and break. | ||||
*/ | */ | ||||
#if defined(_KERNEL) || defined(KERNEL) | #if defined(_KERNEL) || defined(KERNEL) | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | struct nfsrv_descript { | ||||
uint8_t nd_sessionid[NFSX_V4SESSIONID]; /* Session id */ | uint8_t nd_sessionid[NFSX_V4SESSIONID]; /* Session id */ | ||||
uint32_t nd_slotid; /* Slotid for this RPC */ | uint32_t nd_slotid; /* Slotid for this RPC */ | ||||
SVCXPRT *nd_xprt; /* Server RPC handle */ | SVCXPRT *nd_xprt; /* Server RPC handle */ | ||||
uint32_t *nd_sequence; /* Sequence Op. ptr */ | uint32_t *nd_sequence; /* Sequence Op. ptr */ | ||||
nfsv4stateid_t nd_curstateid; /* Current StateID */ | nfsv4stateid_t nd_curstateid; /* Current StateID */ | ||||
nfsv4stateid_t nd_savedcurstateid; /* Saved Current StateID */ | nfsv4stateid_t nd_savedcurstateid; /* Saved Current StateID */ | ||||
uint32_t nd_maxreq; /* Max. request (session). */ | uint32_t nd_maxreq; /* Max. request (session). */ | ||||
uint32_t nd_maxresp; /* Max. reply (session). */ | uint32_t nd_maxresp; /* Max. reply (session). */ | ||||
struct kaudit_record *nd_ar; /* Audit record for NFS server */ | |||||
int nd_bextpg; /* Current ext_pgs page */ | int nd_bextpg; /* Current ext_pgs page */ | ||||
int nd_bextpgsiz; /* Bytes left in page */ | int nd_bextpgsiz; /* Bytes left in page */ | ||||
int nd_maxextsiz; /* Max ext_pgs mbuf size */ | int nd_maxextsiz; /* Max ext_pgs mbuf size */ | ||||
}; | }; | ||||
#define nd_princlen nd_gssnamelen | #define nd_princlen nd_gssnamelen | ||||
#define nd_principal nd_gssname | #define nd_principal nd_gssname | ||||
Show All 35 Lines | |||||
#define ND_NFSV42 0x400000000 | #define ND_NFSV42 0x400000000 | ||||
#define ND_EXTPG 0x800000000 | #define ND_EXTPG 0x800000000 | ||||
#define ND_TLS 0x1000000000 | #define ND_TLS 0x1000000000 | ||||
#define ND_TLSCERT 0x2000000000 | #define ND_TLSCERT 0x2000000000 | ||||
#define ND_TLSCERTUSER 0x4000000000 | #define ND_TLSCERTUSER 0x4000000000 | ||||
#define ND_EXTLS 0x8000000000 | #define ND_EXTLS 0x8000000000 | ||||
#define ND_EXTLSCERT 0x10000000000 | #define ND_EXTLSCERT 0x10000000000 | ||||
#define ND_EXTLSCERTUSER 0x20000000000 | #define ND_EXTLSCERTUSER 0x20000000000 | ||||
#define ND_AUDITREC 0x40000000000 | |||||
/* | /* | ||||
* ND_GSS should be the "or" of all GSS type authentications. | * ND_GSS should be the "or" of all GSS type authentications. | ||||
*/ | */ | ||||
#define ND_GSS (ND_KERBV) | #define ND_GSS (ND_KERBV) | ||||
struct nfsv4_opflag { | struct nfsv4_opflag { | ||||
int retfh; | int retfh; | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |