tcon
smbioc_tcon_t *tcon = NULL;
tcon = malloc(sizeof (*tcon));
if (tcon == NULL)
bzero(tcon, sizeof (*tcon));
tcon->tc_flags = SMBLK_CREATE;
tcon->tc_opt = 0;
strlcpy(tcon->tc_sh.sh_name, ctx->ct_origshare,
sizeof (tcon->tc_sh.sh_name));
tcon->tc_sh.sh_use = ctx->ct_shtype_req;
if (nsmb_ioctl(ctx->ct_dev_fd, cmd, tcon) == -1) {
DPRINT("ret. sh_type: \"%d\"", tcon->tc_sh.sh_type);
ctx->ct_shtype_req != tcon->tc_sh.sh_type) {
if (tcon != NULL)
free(tcon);
smb_share_create(smbioc_tcon_t *tcon, struct smb_vc *vcp,
bcopy(&tcon->tc_sh, &ssp->ss_ioc,
smb_share_findcreate(smbioc_tcon_t *tcon, struct smb_vc *vcp,
if (u8_strcmp(ssp->ss_name, tcon->tc_sh.sh_name, 0,
tcon->tc_opt &= ~SMBSOPT_CREATE;
if (tcon->tc_opt & SMBSOPT_CREATE) {
error = smb_share_create(tcon, vcp, &ssp, scred);
smbioc_tcon_t *tcon = NULL;
tcon = kmem_alloc(sizeof (*tcon), KM_SLEEP);
if (ddi_copyin((void *)arg, tcon, sizeof (*tcon), flags)) {
tcon->tc_sh.sh_name[SMBIOC_MAX_NAME-1] = '\0';
tcon->tc_sh.sh_pass[SMBIOC_MAX_NAME-1] = '\0';
tcon->tc_opt |= SMBSOPT_CREATE;
tcon->tc_opt &= ~SMBSOPT_CREATE;
error = smb_share_findcreate(tcon, vcp, &ssp, &scred);
tcon->tc_sh.sh_type = ssp->ss_type;
(void) ddi_copyout(tcon, (void *)arg, sizeof (*tcon), flags);
bzero(tcon, sizeof (*tcon));
kmem_free(tcon, sizeof (*tcon));
sr->arg.tcon.si = shr; /* hold from above */
smb_kshare_t *shr = sr->arg.tcon.si;
smb_arg_tcon_t *tcon = &sr->sr_tcon;
sr, (uint_t)PathLength, &tcon->path);
smb_arg_tcon_t *tcon = &sr->sr_tcon;
(void) smb_strlwr(tcon->path);
if ((name = smb_tree_get_sharename(tcon->path)) == NULL) {
smb_tree_log(sr, tcon->path, "invalid UNC path");
tcon->name = name;
smb_tree_connect_disk(smb_request_t *sr, smb_arg_tcon_t *tcon)
char *sharename = tcon->path;
smb_kshare_t *si = tcon->si;
char *service = tcon->service;
tcon->optional_support = SMB_SUPPORT_SEARCH_BITS;
tcon->optional_support |= SMB_CSC_CACHE_NONE;
tcon->optional_support |= SMB_CSC_CACHE_AUTO_REINT;
tcon->optional_support |= SMB_CSC_CACHE_VDO;
tcon->optional_support |=
tcon->optional_support |= SMB_SHARE_IS_IN_DFS;
tcon->optional_support |= SMB_UNIQUE_FILE_NAME;
smb_tree_connect_printq(smb_request_t *sr, smb_arg_tcon_t *tcon)
char *sharename = tcon->path;
smb_kshare_t *si = tcon->si;
char *service = tcon->service;
tcon->optional_support = SMB_SUPPORT_SEARCH_BITS;
smb_tree_connect_ipc(smb_request_t *sr, smb_arg_tcon_t *tcon)
char *name = tcon->path;
smb_kshare_t *si = tcon->si;
char *service = tcon->service;
tcon->optional_support = SMB_SUPPORT_SEARCH_BITS;
tcon->flags = 0;
tcon->optional_support = 0;
smb_arg_tcon_t *tcon = &sr->sr_tcon;
&tcon->flags, &pwlen);
&tcon->path, &tcon->service);
tcon->pwdlen = pwlen;
tcon->password = (char *)pwbuf;
tcon->optional_support = 0;
smb_arg_tcon_t *tcon = &sr->sr_tcon;
if (tcon->flags & SMB_TCONX_DISCONECT_TID) {
} else if ((tcon->flags & SMB_TCONX_EXTENDED_RESPONSE) == 0) {
tcon->optional_support,
tcon->optional_support, /* (w) */
smb_arg_tcon_t *tcon = &sr->sr_tcon;
rc = smbsr_decode_data(sr, "%AAA", sr, &tcon->path,
&tcon->password, &tcon->service);
smb_arg_tcon_t tcon;
#define sr_tcon arg.tcon