| /src/sys/fs/nfsserver/ |
| H A D | nfs_nfsdserv.c | 116 static void nfsrvd_symlinksub(struct nfsrv_descript *nd, struct nameidata *ndp, 122 static void nfsrvd_mkdirsub(struct nfsrv_descript *nd, struct nameidata *ndp, 132 nfsrvd_access(struct nfsrv_descript *nd, __unused int isdgram, in nfsrvd_access() argument 142 if (nd->nd_repstat) { in nfsrvd_access() 143 nfsrv_postopattr(nd, 1, &nva); in nfsrvd_access() 148 if ((nd->nd_flag & ND_NFSV4) && in nfsrvd_access() 153 nd->nd_repstat = NFSERR_INVAL; in nfsrvd_access() 159 if (nfsvno_accchk(vp, VREAD, nd->nd_cred, exp, p, in nfsrvd_access() 165 if (nfsvno_accchk(vp, VWRITE, nd->nd_cred, exp, p, in nfsrvd_access() 171 if (nfsvno_accchk(vp, VWRITE | VAPPEND, nd->nd_cred, exp, p, in nfsrvd_access() [all …]
|
| H A D | nfs_nfsdkrpc.c | 126 struct nfsrv_descript nd; in nfssvc_program() local 136 memset(&nd, 0, sizeof(nd)); in nfssvc_program() 144 nd.nd_procnum = newnfs_nfsv3_procid[rqst->rq_proc]; in nfssvc_program() 145 nd.nd_flag = ND_NFSV2; in nfssvc_program() 152 nd.nd_procnum = rqst->rq_proc; in nfssvc_program() 153 nd.nd_flag = ND_NFSV3; in nfssvc_program() 161 nd.nd_procnum = rqst->rq_proc; in nfssvc_program() 162 nd.nd_flag = ND_NFSV4; in nfssvc_program() 170 nd.nd_mrep = rqst->rq_args; in nfssvc_program() 172 newnfs_realign(&nd.nd_mrep, M_WAITOK); in nfssvc_program() [all …]
|
| H A D | nfs_nfsdsocket.c | 429 static void nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, 539 nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen, in nfsrvd_dorpc() argument 555 md = nd->nd_md; in nfsrvd_dorpc() 556 dpos = nd->nd_dpos; in nfsrvd_dorpc() 563 if (!(nd->nd_flag & ND_NFSV4)) { in nfsrvd_dorpc() 564 KASSERT(nd->nd_repstat == 0, ("nfsrvd_dorpc")); in nfsrvd_dorpc() 569 if ((nd->nd_flag & ND_NFSV3) && nfsrv_mallocmget_limit()) { in nfsrvd_dorpc() 570 nd->nd_repstat = NFSERR_DELAY; in nfsrvd_dorpc() 573 error = nfsrv_mtofh(nd, &fh); in nfsrvd_dorpc() 577 nd->nd_repstat = NFSERR_GARBAGE; in nfsrvd_dorpc() [all …]
|
| H A D | nfs_nfsdsubs.c | 1374 nfsrv_wcc(struct nfsrv_descript *nd, int before_ret, in nfsrv_wcc() argument 1391 nfsrv_postopattr(nd, after_ret, after_nvap); in nfsrv_wcc() 1395 nfsrv_postopattr(struct nfsrv_descript *nd, int after_ret, in nfsrv_postopattr() argument 1405 nfsrv_fillattr(nd, after_nvap); in nfsrv_postopattr() 1414 nfsrv_fillattr(struct nfsrv_descript *nd, struct nfsvattr *nvap) in nfsrv_fillattr() argument 1422 if (nd->nd_flag & ND_NFSV3) in nfsrv_fillattr() 1434 if (nd->nd_flag & ND_NFSV3) { in nfsrv_fillattr() 1473 nfsrv_mtofh(struct nfsrv_descript *nd, struct nfsrvfh *fhp) in nfsrv_mtofh() argument 1479 if (nd->nd_flag & (ND_NFSV3 | ND_NFSV4)) { in nfsrv_mtofh() 1482 if (len == 0 && nfs_pubfhset && (nd->nd_flag & ND_NFSV3) && in nfsrv_mtofh() [all …]
|
| H A D | nfs_nfsdport.c | 407 struct nfsrv_descript *nd, struct thread *p, int vpislocked, in nfsvno_getattr() argument 438 (nd->nd_flag & ND_NFSV4) == 0 || in nfsvno_getattr() 444 error = nfsrv_proxyds(vp, 0, 0, nd->nd_cred, p, in nfsvno_getattr() 453 error = VOP_GETATTR(vp, &nvap->na_vattr, nd->nd_cred); in nfsvno_getattr() 649 nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, in nfsvno_namei() argument 684 if (nd->nd_flag & ND_PUBLOOKUP) { in nfsvno_namei() 703 (nd->nd_flag & ND_NFSV4) == 0) { in nfsvno_namei() 751 if (!(nd->nd_flag & ND_PUBLOOKUP)) { in nfsvno_namei() 836 NFSEXITCODE2(error, nd); in nfsvno_namei() 1215 nfsvno_createsub(struct nfsrv_descript *nd, struct nameidata *ndp, in nfsvno_createsub() argument [all …]
|
| H A D | nfs_nfsdcache.c | 281 static int nfsrc_getudp(struct nfsrv_descript *nd, struct nfsrvcache *newrp); 282 static int nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp); 337 nfsrvd_getcache(struct nfsrv_descript *nd) in nfsrvd_getcache() argument 342 if (nd->nd_procnum == NFSPROC_NULL) in nfsrvd_getcache() 347 if (nd->nd_flag & ND_NFSV4) in nfsrvd_getcache() 349 else if (nd->nd_flag & ND_NFSV3) in nfsrvd_getcache() 353 newrp->rc_xid = nd->nd_retxid; in nfsrvd_getcache() 354 newrp->rc_proc = nd->nd_procnum; in nfsrvd_getcache() 355 newrp->rc_sockref = nd->nd_sockref; in nfsrvd_getcache() 356 newrp->rc_cachetime = nd->nd_tcpconntime; in nfsrvd_getcache() [all …]
|
| H A D | nfs_nfsdstate.c | 171 static int nfsrv_checkgrace(struct nfsrv_descript *nd, struct nfsclient *clp, 176 static int nfsrv_cbcallargs(struct nfsrv_descript *nd, struct nfsclient *clp, 190 static int nfsrv_notsamecredname(int op, struct nfsrv_descript *nd, 194 static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, 211 static int nfsrv_freesession(struct nfsrv_descript *nd, struct nfsdsession *sep, 213 static int nfsv4_setcbsequence(struct nfsrv_descript *nd, struct nfsclient *clp, 216 static int nfsrv_addlayout(struct nfsrv_descript *nd, struct nfslayout **lypp, 229 static void nfsrv_flexlayouterr(struct nfsrv_descript *nd, uint32_t *layp, 237 static struct nfslayout *nfsrv_filelayout(struct nfsrv_descript *nd, int iomode, 239 static struct nfslayout *nfsrv_flexlayout(struct nfsrv_descript *nd, int iomode, [all …]
|
| /src/sys/fs/nfs/ |
| H A D | nfsm_subs.h | 58 nfsm_build(struct nfsrv_descript *nd, int siz) in nfsm_build() argument 63 if ((nd->nd_flag & ND_EXTPG) == 0 && in nfsm_build() 64 siz > M_TRAILINGSPACE(nd->nd_mb)) { in nfsm_build() 69 nd->nd_bpos = mtod(mb2, char *); in nfsm_build() 70 nd->nd_mb->m_next = mb2; in nfsm_build() 71 nd->nd_mb = mb2; in nfsm_build() 72 } else if ((nd->nd_flag & ND_EXTPG) != 0) { in nfsm_build() 73 if (siz > nd->nd_bextpgsiz) { in nfsm_build() 75 nd->nd_bpos = (char *)(void *) in nfsm_build() 77 nd->nd_bextpg = 0; in nfsm_build() [all …]
|
| H A D | nfs_commonkrpc.c | 669 newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, in newnfs_request() argument 702 m_freem(nd->nd_mreq); in newnfs_request() 737 (nd->nd_procnum == NFSPROC_READ || in newnfs_request() 738 nd->nd_procnum == NFSPROC_READDIR || in newnfs_request() 739 nd->nd_procnum == NFSPROC_READDIRPLUS || in newnfs_request() 740 nd->nd_procnum == NFSPROC_WRITE)) { in newnfs_request() 757 if (nd->nd_procnum != NFSPROC_NULL) { in newnfs_request() 766 nd->nd_procnum != NFSPROC_NULL && (!NFSHASSYSKRB5(nmp) || in newnfs_request() 767 nfscl_use_gss[nd->nd_procnum])) { in newnfs_request() 769 nd->nd_flag |= ND_USEGSSNAME; in newnfs_request() [all …]
|
| H A D | nfs_commonsubs.c | 231 static int nfsrv_skipace(struct nfsrv_descript *nd, acl_type_t, int *acesizep); 340 nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, in nfscl_reqstart() argument 352 nd->nd_slotseq = NULL; in nfscl_reqstart() 354 nd->nd_flag = ND_NFSV4 | ND_NFSCL; in nfscl_reqstart() 356 nd->nd_flag |= ND_NFSV41; in nfscl_reqstart() 358 nd->nd_flag |= (ND_NFSV41 | ND_NFSV42); in nfscl_reqstart() 360 nd->nd_flag = ND_NFSV3 | ND_NFSCL; in nfscl_reqstart() 363 nd->nd_flag = ND_NFSV4 | ND_NFSCL; in nfscl_reqstart() 365 nd->nd_flag |= ND_NFSV41; in nfscl_reqstart() 367 nd->nd_flag |= (ND_NFSV41 | ND_NFSV42); in nfscl_reqstart() [all …]
|
| /src/sys/fs/nfsclient/ |
| H A D | nfs_clkrpc.c | 67 struct nfsrv_descript nd; in nfscb_program() local 73 memset(&nd, 0, sizeof(nd)); in nfscb_program() 80 nd.nd_procnum = rqst->rq_proc; in nfscb_program() 81 nd.nd_flag = (ND_NFSCB | ND_NFSV4); in nfscb_program() 88 nd.nd_mrep = rqst->rq_args; in nfscb_program() 90 newnfs_realign(&nd.nd_mrep, M_WAITOK); in nfscb_program() 91 nd.nd_md = nd.nd_mrep; in nfscb_program() 92 nd.nd_dpos = mtod(nd.nd_md, caddr_t); in nfscb_program() 93 nd.nd_nam = svc_getrpccaller(rqst); in nfscb_program() 94 nd.nd_nam2 = rqst->rq_addr; in nfscb_program() [all …]
|
| H A D | nfs_clrpcops.c | 245 struct nfsrv_descript nfsd, *nd = &nfsd; in nfsrpc_null() local 247 NFSCL_REQSTART(nd, NFSPROC_NULL, vp, NULL); in nfsrpc_null() 248 error = nfscl_request(nd, vp, p, cred); in nfsrpc_null() 249 if (nd->nd_repstat && !error) in nfsrpc_null() 250 error = nd->nd_repstat; in nfsrpc_null() 251 m_freem(nd->nd_mrep); in nfsrpc_null() 309 struct nfsrv_descript nfsd, *nd = &nfsd; in nfsrpc_accessrpc() local 327 NFSCL_REQSTART(nd, NFSPROC_ACCESS, vp, cred); in nfsrpc_accessrpc() 330 if (nd->nd_flag & ND_NFSV4) { in nfsrpc_accessrpc() 337 (void) nfsrv_putattrbit(nd, &attrbits); in nfsrpc_accessrpc() [all …]
|
| H A D | nfs_clcomsubs.c | 55 nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz) in nfsm_uiombuf() argument 70 mp = mp2 = nd->nd_mb; in nfsm_uiombuf() 71 mcp = nd->nd_bpos; in nfsm_uiombuf() 73 KASSERT((nd->nd_flag & ND_EXTPG) != 0 || mcp == in nfsm_uiombuf() 81 if ((nd->nd_flag & ND_EXTPG) != 0) in nfsm_uiombuf() 82 mlen = nd->nd_bextpgsiz; in nfsm_uiombuf() 86 if ((nd->nd_flag & ND_EXTPG) != 0) { in nfsm_uiombuf() 88 nd->nd_maxextsiz, &nd->nd_bextpg); in nfsm_uiombuf() 90 mp->m_epg_pa[nd->nd_bextpg]); in nfsm_uiombuf() 91 nd->nd_bextpgsiz = mlen = PAGE_SIZE; in nfsm_uiombuf() [all …]
|
| /src/sys/nfs/ |
| H A D | nfs_diskless.c | 97 nfs_parse_options(const char *envopts, struct nfs_args *nd) in nfs_parse_options() argument 108 nd->flags |= NFSMNT_SOFT; in nfs_parse_options() 110 nd->flags |= NFSMNT_INT; in nfs_parse_options() 112 nd->flags |= NFSMNT_NOCONN; in nfs_parse_options() 114 nd->flags |= NFSMNT_NOLOCKD; in nfs_parse_options() 116 nd->flags |= NFSMNT_NOCTO; in nfs_parse_options() 118 nd->flags &= ~(NFSMNT_NFSV3 | NFSMNT_NFSV4); in nfs_parse_options() 120 nd->flags &= ~NFSMNT_NFSV4; in nfs_parse_options() 121 nd->flags |= NFSMNT_NFSV3; in nfs_parse_options() 123 nd->sotype = SOCK_STREAM; in nfs_parse_options() [all …]
|
| /src/lib/libcalendar/ |
| H A D | calendar.c | 199 int nd; /* Number of days--return value */ in ndaysgi() local 218 if ((nd = ndaysji(idt)) == -1) in ndaysgi() 221 nd = (nd - 10 - (idt->y - 1600) / 100 + (idt->y - 1600) / 400); in ndaysgi() 222 else if (nd > nswitch) in ndaysgi() 223 nd -= 10; in ndaysgi() 224 return (nd); in ndaysgi() 236 week(int nd, int *y) in week() argument 241 gdate(nd, &dt); in week() 242 for (*y = dt.y + 1; nd < (fw = firstweek(*y)); (*y)--) in week() 244 return ((nd - fw) / 7 + 1); in week() [all …]
|
| /src/sys/kern/ |
| H A D | vfs_syscalls.c | 192 struct nameidata nd; in sys_quotactl() local 200 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, in sys_quotactl() 202 if ((error = namei(&nd)) != 0) in sys_quotactl() 204 NDFREE_PNBUF(&nd); in sys_quotactl() 205 mp = nd.ni_vp->v_mount; in sys_quotactl() 207 vput(nd.ni_vp); in sys_quotactl() 328 struct nameidata nd; in kern_statfs() local 331 NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path); in kern_statfs() 332 error = namei(&nd); in kern_statfs() 335 NDFREE_PNBUF(&nd); in kern_statfs() [all …]
|
| H A D | vfs_extattr.c | 81 struct nameidata nd; in sys_extattrctl() local 103 NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE2, UIO_USERSPACE, in sys_extattrctl() 105 error = namei(&nd); in sys_extattrctl() 108 filename_vp = nd.ni_vp; in sys_extattrctl() 109 NDFREE_PNBUF(&nd); in sys_extattrctl() 113 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, in sys_extattrctl() 115 error = namei(&nd); in sys_extattrctl() 118 mp = nd.ni_vp->v_mount; in sys_extattrctl() 121 vput(nd.ni_vp); in sys_extattrctl() 122 NDFREE_PNBUF(&nd); in sys_extattrctl() [all …]
|
| H A D | vfs_acl.c | 373 struct nameidata nd; in kern___acl_get_path() local 376 NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); in kern___acl_get_path() 377 error = namei(&nd); in kern___acl_get_path() 379 error = vacl_get_acl(td, nd.ni_vp, type, aclp); in kern___acl_get_path() 380 vrele(nd.ni_vp); in kern___acl_get_path() 381 NDFREE_PNBUF(&nd); in kern___acl_get_path() 412 struct nameidata nd; in kern___acl_set_path() local 415 NDINIT(&nd, LOOKUP, follow | AUDITVNODE1, UIO_USERSPACE, path); in kern___acl_set_path() 416 error = namei(&nd); in kern___acl_set_path() 418 error = vacl_set_acl(td, nd.ni_vp, type, aclp); in kern___acl_set_path() [all …]
|
| /src/sbin/ifconfig/ |
| H A D | af_nd6.c | 81 struct in6_ndireq nd = {}; in setnd6flags() local 84 strlcpy(nd.ifname, ctx->ifname, sizeof(nd.ifname)); in setnd6flags() 85 error = ioctl_ctx(ctx, SIOCGIFINFO_IN6, &nd); in setnd6flags() 91 nd.ndi.flags &= ~(-d); in setnd6flags() 93 nd.ndi.flags |= d; in setnd6flags() 94 error = ioctl_ctx(ctx, SIOCSIFINFO_IN6, (caddr_t)&nd); in setnd6flags() 146 struct in6_ndireq nd = {}; in nd6_status() local 152 strlcpy(nd.ifname, ctx->ifname, sizeof(nd.ifname)); in nd6_status() 158 error = ioctl(s6, SIOCGIFINFO_IN6, &nd); in nd6_status() 167 if (nd.ndi.flags == 0 && !isdefif) in nd6_status() [all …]
|
| /src/bin/ed/ |
| H A D | re.c | 84 char *nd; in extract_pattern() local 87 for (nd = ibufp; *nd != delimiter && *nd != '\n'; nd++) in extract_pattern() 88 switch (*nd) { in extract_pattern() 92 if ((nd = parse_char_class(nd + 1)) == NULL) { in extract_pattern() 98 if (*++nd == '\n') { in extract_pattern() 104 len = nd - ibufp; in extract_pattern() 108 ibufp = nd; in extract_pattern()
|
| /src/usr.bin/netstat/ |
| H A D | nhgrp.c | 193 dump_nhgrp_sysctl(int fibnum, int af, struct nhops_dump *nd) in dump_nhgrp_sysctl() argument 244 nd->nh_buf = buf; in dump_nhgrp_sysctl() 245 nd->nh_count = nhg_count; in dump_nhgrp_sysctl() 246 nd->nh_map = nhg_map; in dump_nhgrp_sysctl() 252 struct nhops_dump nd; in print_nhgrp_sysctl() local 256 dump_nhgrp_sysctl(fibnum, af, &nd); in print_nhgrp_sysctl() 260 if (nd.nh_count > 0) { in print_nhgrp_sysctl() 268 for (size_t i = 0; i < nd.nh_count; i++) { in print_nhgrp_sysctl() 269 rtm = nd.nh_map[i].rtm; in print_nhgrp_sysctl() 276 free(nd.nh_buf); in print_nhgrp_sysctl() [all …]
|
| /src/contrib/netbsd-tests/lib/libppath/ |
| H A D | t_ppath.c | 433 prop_object_t nd = NULL, ond; in ATF_TC_BODY() local 482 rc = ppath_copyset_bool(d, &nd, p, false); in ATF_TC_BODY() 485 rc = ppath_get_object(nd, p3, &r); in ATF_TC_BODY() 488 ond = nd; in ATF_TC_BODY() 490 rc = ppath_copyset_string(d, &nd, p2, "Martha Doe"); in ATF_TC_BODY() 493 ATF_CHECK_EQ(nd, ond); in ATF_TC_BODY() 495 rc = ppath_get_object(nd, p3, &or); in ATF_TC_BODY() 501 rc = ppath_get_bool(nd, p, &v); in ATF_TC_BODY() 506 rc = ppath_get_string(nd, p2, &s); in ATF_TC_BODY() 519 if (dictionary_equals(od, nd)) { in ATF_TC_BODY() [all …]
|
| /src/usr.sbin/rtsold/ |
| H A D | if.c | 94 struct in6_ndireq nd; in interface_up() local 100 memset(&nd, 0, sizeof(nd)); in interface_up() 101 strlcpy(nd.ifname, name, sizeof(nd.ifname)); in interface_up() 120 if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) < 0) { in interface_up() 129 if (nd.ndi.flags & ND6_IFF_IFDISABLED) { in interface_up() 131 nd.ndi.flags &= ~ND6_IFF_IFDISABLED; in interface_up() 132 if (ioctl(s, SIOCSIFINFO_IN6, (caddr_t)&nd)) { in interface_up() 146 if (!(nd.ndi.flags & ND6_IFF_ACCEPT_RTADV)) { in interface_up() 148 nd.ndi.flags |= ND6_IFF_ACCEPT_RTADV; in interface_up() 149 if (ioctl(s, SIOCSIFINFO_IN6, (caddr_t)&nd)) { in interface_up()
|
| /src/sys/amd64/amd64/ |
| H A D | mem.c | 198 int nd, error = 0; in memioctl_md() local 217 nd = imin(mo->mo_arg[0], mem_range_softc.mr_ndesc); in memioctl_md() 218 if (nd > 0) { in memioctl_md() 220 malloc(nd * sizeof(struct mem_range_desc), in memioctl_md() 222 error = mem_range_attr_get(md, &nd); in memioctl_md() 225 nd * sizeof(struct mem_range_desc)); in memioctl_md() 229 nd = mem_range_softc.mr_ndesc; in memioctl_md() 230 mo->mo_arg[0] = nd; in memioctl_md()
|
| /src/sys/i386/i386/ |
| H A D | mem.c | 180 int nd, error = 0; in memioctl_md() local 199 nd = imin(mo->mo_arg[0], mem_range_softc.mr_ndesc); in memioctl_md() 200 if (nd > 0) { in memioctl_md() 202 malloc(nd * sizeof(struct mem_range_desc), in memioctl_md() 204 error = mem_range_attr_get(md, &nd); in memioctl_md() 207 nd * sizeof(struct mem_range_desc)); in memioctl_md() 211 nd = mem_range_softc.mr_ndesc; in memioctl_md() 212 mo->mo_arg[0] = nd; in memioctl_md()
|