Lines Matching defs:vcp

294 smb_vc_hold(struct smb_vc *vcp)
296 smb_co_hold(VCTOCP(vcp));
300 smb_vc_rele(struct smb_vc *vcp)
302 smb_co_rele(VCTOCP(vcp));
306 smb_vc_kill(struct smb_vc *vcp)
308 smb_co_kill(VCTOCP(vcp));
323 struct smb_vc *vcp = CPTOVC(cp);
326 * Was smb_vc_disconnect(vcp);
328 smb_iod_disconnect(vcp);
338 struct smb_vc *vcp = CPTOVC(cp);
346 ASSERT(vcp->iod_rqlist.tqh_first == NULL);
348 if (vcp->vc_tdata)
349 SMB_TRAN_DONE(vcp);
356 if (vcp->vc_tolower)
357 iconv_close(vcp->vc_tolower);
358 if (vcp->vc_toupper)
359 iconv_close(vcp->vc_toupper);
360 if (vcp->vc_tolocal)
361 iconv_close(vcp->vc_tolocal);
362 if (vcp->vc_toserver)
363 iconv_close(vcp->vc_toserver);
366 if (vcp->vc_mackey != NULL)
367 kmem_free(vcp->vc_mackey, vcp->vc_mackeylen);
369 cv_destroy(&vcp->iod_idle);
370 rw_destroy(&vcp->iod_rqlock);
371 sema_destroy(&vcp->vc_sendlock);
372 cv_destroy(&vcp->vc_statechg);
373 smb_co_done(VCTOCP(vcp));
374 kmem_free(vcp, sizeof (*vcp));
383 struct smb_vc *vcp;
388 vcp = kmem_zalloc(sizeof (struct smb_vc), KM_SLEEP);
390 smb_co_init(VCTOCP(vcp), SMBL_VC, objtype);
391 vcp->vc_co.co_free = smb_vc_free;
392 vcp->vc_co.co_gone = smb_vc_gone;
394 cv_init(&vcp->vc_statechg, objtype, CV_DRIVER, NULL);
395 sema_init(&vcp->vc_sendlock, 1, objtype, SEMA_DRIVER, NULL);
396 rw_init(&vcp->iod_rqlock, objtype, RW_DRIVER, NULL);
397 cv_init(&vcp->iod_idle, objtype, CV_DRIVER, NULL);
400 vcp->iod_rqlist.tqh_last = &vcp->iod_rqlist.tqh_first;
402 vcp->vc_state = SMBIOD_ST_IDLE;
407 vcp->vc_zoneid = getzoneid();
408 bcopy(ossn, &vcp->vc_ssn, sizeof (*ossn));
410 /* This fills in vcp->vc_tdata */
411 vcp->vc_tdesc = &smb_tran_nbtcp_desc;
412 if ((error = SMB_TRAN_CREATE(vcp, cr)) != 0)
416 smb_co_addchild(&smb_vclist, VCTOCP(vcp));
417 *vcpp = vcp;
425 smb_vc_rele(vcp);
438 struct smb_vc *vcp;
443 *vcpp = vcp = NULL;
449 vcp = CPTOVC(co);
458 if (vcp->vc_zoneid != zoneid)
462 if (vcp->vc_owner != ossn->ssn_owner)
470 vc_id = &vcp->vc_ssn.ssn_id;
490 SMB_VC_LOCK(vcp);
491 if ((vcp->vc_flags & SMBV_GONE) == 0) {
498 SMB_VC_UNLOCK(vcp);
499 *vcpp = vcp;
503 SMB_VC_UNLOCK(vcp);
506 vcp = NULL;
515 error = smb_vc_create(ossn, scred, &vcp);
517 *vcpp = vcp;
537 smb_vc_getipaddr(struct smb_vc *vcp, int *ipvers)
539 smbioc_ssn_ident_t *id = &vcp->vc_ssn.ssn_id;
563 smb_vc_walkshares(struct smb_vc *vcp,
572 SMB_VC_LOCK(vcp);
573 SLIST_FOREACH(co, &(VCTOCP(vcp)->co_children), co_next) {
579 SMB_VC_UNLOCK(vcp);
643 smb_share_create(smbioc_tcon_t *tcon, struct smb_vc *vcp,
649 ASSERT(MUTEX_HELD(&vcp->vc_lock));
662 smb_co_addchild(VCTOCP(vcp), SSTOCP(ssp));
674 smb_share_findcreate(smbioc_tcon_t *tcon, struct smb_vc *vcp,
683 SMB_VC_LOCK(vcp);
686 SLIST_FOREACH(co, &(VCTOCP(vcp)->co_children), co_next) {
720 /* Note: vcp (list of shares) is still locked. */
727 error = smb_share_create(tcon, vcp, &ssp, scred);
734 SMB_VC_UNLOCK(vcp);
850 struct smb_vc *vcp;
854 vcp = CPTOVC(co);
856 if (vcp->vc_zoneid != zoneid)
863 smb_vc_kill(vcp);
876 struct smb_vc *vcp;
897 vcp = CPTOVC(co);
899 if (vcp->vc_zoneid != zoneid)
903 lingering_vc(vcp);