Home | History | Annotate | Download | only in server

Lines Matching refs:nd

122 	struct nfsrv_descript nd;
126 memset(&nd, 0, sizeof(nd));
134 nd.nd_procnum = newnfs_nfsv3_procid[rqst->rq_proc];
135 nd.nd_flag = ND_NFSV2;
142 nd.nd_procnum = rqst->rq_proc;
143 nd.nd_flag = ND_NFSV3;
151 nd.nd_procnum = rqst->rq_proc;
152 nd.nd_flag = ND_NFSV4;
160 nd.nd_mrep = rqst->rq_args;
162 newnfs_realign(&nd.nd_mrep, M_WAITOK);
163 nd.nd_md = nd.nd_mrep;
164 nd.nd_dpos = mtod(nd.nd_md, caddr_t);
165 nd.nd_nam = svc_getrpccaller(rqst);
166 nd.nd_nam2 = rqst->rq_addr;
167 nd.nd_mreq = NULL;
168 nd.nd_cred = NULL;
170 if (nfs_privport && (nd.nd_flag & ND_NFSV4) == 0) {
173 struct sockaddr *nam = nd.nd_nam;
183 nd.nd_procnum != NFSPROC_NULL) {
208 m_freem(nd.nd_mrep);
213 if (nd.nd_procnum != NFSPROC_NULL) {
214 if (!svc_getcred(rqst, &nd.nd_cred, &credflavor)) {
217 m_freem(nd.nd_mrep);
223 nd.nd_flag |= ND_GSS;
225 nd.nd_flag |= (ND_GSS | ND_GSSINTEGRITY);
227 nd.nd_flag |= (ND_GSS | ND_GSSPRIVACY);
231 m_freem(nd.nd_mrep);
236 mac_cred_associate_nfsd(nd.nd_cred);
256 if ((nd.nd_flag & ND_NFSV4) != 0) {
257 nd.nd_repstat = nfsvno_v4rootexport(&nd);
258 if (nd.nd_repstat != 0) {
264 m_freem(nd.nd_mrep);
269 cacherep = nfs_proc(&nd, rqst->rq_xid, xprt, &rp);
274 NFSMGET(nd.nd_mreq);
275 nd.nd_mreq->m_len = 0;
278 m_freem(nd.nd_mrep);
280 if (nd.nd_cred != NULL)
281 crfree(nd.nd_cred);
284 m_freem(nd.nd_mreq);
289 if (nd.nd_mreq == NULL) {
295 if (nd.nd_repstat & NFSERR_AUTHERR) {
296 svcerr_auth(rqst, nd.nd_repstat & ~NFSERR_AUTHERR);
297 m_freem(nd.nd_mreq);
298 } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) {
318 nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVCXPRT *xprt,
329 if (nd->nd_nam2 == NULL) {
330 nd->nd_flag |= ND_STREAMSOCK;
345 if ((nd->nd_flag & ND_NFSV2) && nd->nd_nam2 != NULL &&
353 if ((nd->nd_flag & (ND_NFSV4 | ND_STREAMSOCK)) ==
355 nd->nd_flag |= ND_SAMETCPCONN;
356 nd->nd_retxid = xid;
357 nd->nd_tcpconntime = NFSD_MONOSEC;
358 nd->nd_sockref = xprt->xp_sockref;
359 if ((nd->nd_flag & ND_NFSV4) != 0)
360 nfsd_getminorvers(nd, tag, &tagstr, &taglen,
362 if ((nd->nd_flag & ND_NFSV41) != 0)
366 cacherep = nfsrvd_getcache(nd);
380 if ((nd->nd_flag & ND_NFSV41) != 0)
381 nd->nd_xprt = xprt;
382 nfsrvd_dorpc(nd, isdgram, tagstr, taglen, minorvers, td);
383 if ((nd->nd_flag & ND_NFSV41) != 0) {
384 if (nd->nd_repstat != NFSERR_REPLYFROMCACHE &&
385 (nd->nd_flag & ND_SAVEREPLY) != 0) {
387 m = m_copym(nd->nd_mreq, 0, M_COPYALL,
391 if ((nd->nd_flag & ND_HASSEQUENCE) != 0)
392 nfsrv_cache_session(nd->nd_sessionid,
393 nd->nd_slotid, nd->nd_repstat, &m);
394 if (nd->nd_repstat == NFSERR_REPLYFROMCACHE)
395 nd->nd_repstat = 0;
398 if (nd->nd_repstat == NFSERR_DONTREPLY)
402 *rpp = nfsrvd_updatecache(nd);
408 NFSEXITCODE2(0, nd);