diff options
Diffstat (limited to 'sys/nfsserver/nfs.h')
-rw-r--r-- | sys/nfsserver/nfs.h | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index 25fe8ae..b907a06 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -176,102 +176,6 @@ extern int32_t (*nfsrv3_procs[NFS_NPROCS])(struct nfsrv_descript *nd, #define NWDELAYHASH(sock, f) \ (&(sock)->ns_wdelayhashtbl[(*((u_int32_t *)(f))) % NFS_WDELAYHASHSIZ]) -#ifdef NFS_LEGACYRPC -/* - * Network address hash list element - */ -union nethostaddr { - u_int32_t had_inetaddr; - struct sockaddr *had_nam; -}; - -struct nfsrv_rec { - STAILQ_ENTRY(nfsrv_rec) nr_link; - struct sockaddr *nr_address; - struct mbuf *nr_packet; -}; - -struct nfssvc_sock { - TAILQ_ENTRY(nfssvc_sock) ns_chain; /* List of all nfssvc_sock's */ - struct file *ns_fp; - struct socket *ns_so; - struct sockaddr *ns_nam; - struct mbuf *ns_raw; - struct mbuf *ns_rawend; - STAILQ_HEAD(, nfsrv_rec) ns_rec; - struct mbuf *ns_frag; - int ns_flag; - int ns_solock; - int ns_cc; - int ns_reclen; - u_int32_t ns_sref; - LIST_HEAD(, nfsrv_descript) ns_tq; /* Write gather lists */ - LIST_HEAD(nfsrvw_delayhash, nfsrv_descript) ns_wdelayhashtbl[NFS_WDELAYHASHSIZ]; -}; - -/* Bits for "ns_flag" */ -#define SLP_VALID 0x01 /* Socket valid for use (XXX) */ -#define SLP_DOREC 0x02 /* Socket ready for processing */ -#define SLP_NEEDQ 0x04 /* Socket has request queued */ -#define SLP_DISCONN 0x08 /* Error received from stream socket */ -#define SLP_GETSTREAM 0x10 /* nfsrv_getstream in prog on sock */ -#define SLP_LASTFRAG 0x20 /* Socket received end-of-record */ -#define SLP_ALLFLAGS 0xff - -extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead; -extern int nfssvc_sockhead_flag; -#define SLP_INIT 0x01 -#define SLP_WANTINIT 0x02 - -/* - * One of these structures is allocated for each nfsd. - */ -struct nfsd { - TAILQ_ENTRY(nfsd) nfsd_chain; /* List of all nfsd's */ - int nfsd_flag; /* NFSD_ flags */ - struct nfssvc_sock *nfsd_slp; /* Current socket */ - int nfsd_authlen; /* Authenticator len */ - u_char nfsd_authstr[RPCAUTH_MAXSIZ]; /* Authenticator data */ - int nfsd_verflen; /* and the Verifier */ - u_char nfsd_verfstr[RPCVERF_MAXSIZ]; - struct nfsrv_descript *nfsd_nd; /* Associated nfsrv_descript */ -}; - -/* Bits for "nfsd_flag" */ -#define NFSD_WAITING 0x01 -#define NFSD_REQINPROG 0x02 - -/* - * This structure is used by the server for describing each request. - * Some fields are used only when write request gathering is performed. - */ -struct nfsrv_descript { - u_quad_t nd_time; /* Write deadline (usec) */ - off_t nd_off; /* Start byte offset */ - off_t nd_eoff; /* and end byte offset */ - LIST_ENTRY(nfsrv_descript) nd_hash; /* Hash list */ - LIST_ENTRY(nfsrv_descript) nd_tq; /* and timer list */ - LIST_HEAD(, nfsrv_descript) nd_coalesce;/* coalesced writes */ - struct mbuf *nd_mrep; /* Request mbuf list */ - struct mbuf *nd_md; /* Current dissect mbuf */ - struct mbuf *nd_mreq; /* Reply mbuf list */ - struct sockaddr *nd_nam; /* and socket addr */ - struct sockaddr *nd_nam2; /* return socket addr */ - caddr_t nd_dpos; /* Current dissect pos */ - u_int32_t nd_procnum; /* RPC # */ - int nd_stable; /* storage type */ - int nd_flag; /* nd_flag */ - int nd_len; /* Length of this write */ - int nd_repstat; /* Reply status */ - u_int32_t nd_retxid; /* Reply xid */ - struct timeval nd_starttime; /* Time RPC initiated */ - fhandle_t nd_fh; /* File handle */ - struct ucred *nd_cr; /* Credentials */ - int nd_credflavor; /* Security flavor */ -}; - -#else - /* * This structure is used by the server for describing each request. */ @@ -291,26 +195,9 @@ struct nfsrv_descript { int nd_credflavor; /* Security flavor */ }; -#endif - /* Bits for "nd_flag" */ #define ND_NFSV3 0x08 -#ifdef NFS_LEGACYRPC - -extern TAILQ_HEAD(nfsd_head, nfsd) nfsd_head; -extern int nfsd_head_flag; -#define NFSD_CHECKSLP 0x01 - -/* - * These macros compare nfsrv_descript structures. - */ -#define NFSW_CONTIG(o, n) \ - ((o)->nd_eoff >= (n)->nd_off && \ - !bcmp((caddr_t)&(o)->nd_fh, (caddr_t)&(n)->nd_fh, NFSX_V3FH)) - -#endif - /* * Defines for WebNFS */ @@ -353,26 +240,6 @@ extern int nfs_debug; #endif -#ifdef NFS_LEGACYRPC -int netaddr_match(int, union nethostaddr *, struct sockaddr *); -int nfs_getreq(struct nfsrv_descript *, struct nfsd *, int); -int nfsrv_send(struct socket *, struct sockaddr *, struct mbuf *); -int nfsrv_dorec(struct nfssvc_sock *, struct nfsd *, - struct nfsrv_descript **); -int nfs_slplock(struct nfssvc_sock *, int); -void nfs_slpunlock(struct nfssvc_sock *); -void nfsrv_initcache(void); -void nfsrv_destroycache(void); -void nfsrv_timer(void *); -int nfsrv_getcache(struct nfsrv_descript *, struct mbuf **); -void nfsrv_updatecache(struct nfsrv_descript *, int, struct mbuf *); -void nfsrv_cleancache(void); -int nfsrv_rcv(struct socket *so, void *arg, int waitflag); -void nfsrv_slpderef(struct nfssvc_sock *slp); -void nfsrv_wakenfsd(struct nfssvc_sock *slp); -int nfsrv_writegather(struct nfsrv_descript **, struct nfssvc_sock *, - struct mbuf **); -#endif struct mbuf *nfs_rephead(int, struct nfsrv_descript *, int, struct mbuf **, caddr_t *); void nfsm_srvfattr(struct nfsrv_descript *, struct vattr *, |