Lines Matching defs:tcon

32 	struct cifs_tcon *tcon;
35 static int cifs_swn_auth_info_krb(struct cifs_tcon *tcon, struct sk_buff *skb)
46 static int cifs_swn_auth_info_ntlm(struct cifs_tcon *tcon, struct sk_buff *skb)
50 if (tcon->ses->user_name != NULL) {
51 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_USER_NAME, tcon->ses->user_name);
56 if (tcon->ses->password != NULL) {
57 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_PASSWORD, tcon->ses->password);
62 if (tcon->ses->domainName != NULL) {
63 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_DOMAIN_NAME, tcon->ses->domainName);
114 if (swnreg->tcon->ses->server->use_swn_dstaddr)
115 addr = &swnreg->tcon->ses->server->swn_dstaddr;
117 addr = &swnreg->tcon->ses->server->dstaddr;
141 authtype = cifs_select_sectype(swnreg->tcon->ses->server, swnreg->tcon->ses->sectype);
144 ret = cifs_swn_auth_info_krb(swnreg->tcon, skb);
152 ret = cifs_swn_auth_info_ntlm(swnreg->tcon, skb);
211 &swnreg->tcon->ses->server->dstaddr);
248 * Try to find a matching registration for the tcon's server name and share name.
252 static struct cifs_swn_reg *cifs_find_swn_reg(struct cifs_tcon *tcon)
259 net_name = extract_hostname(tcon->tree_name);
265 __func__, tcon->tree_name, ret);
269 share_name = extract_sharename(tcon->tree_name);
275 __func__, tcon->tree_name, ret);
302 * Get a registration for the tcon's server and share name, allocating a new one if it does not
305 static struct cifs_swn_reg *cifs_get_swn_reg(struct cifs_tcon *tcon)
313 reg = cifs_find_swn_reg(tcon);
338 reg->net_name = extract_hostname(tcon->tree_name);
345 reg->share_name = extract_sharename(tcon->tree_name);
354 reg->ip_notify = (tcon->capabilities & SMB2_SHARE_CAP_SCALEOUT);
356 reg->tcon = tcon;
399 cifs_signal_cifsd_for_reconnect(swnreg->tcon->ses->server, true);
403 cifs_signal_cifsd_for_reconnect(swnreg->tcon->ses->server, true);
463 static int cifs_swn_reconnect(struct cifs_tcon *tcon, struct sockaddr_storage *addr)
468 cifs_server_lock(tcon->ses->server);
469 if (cifs_sockaddr_equal(&tcon->ses->server->dstaddr, addr))
472 ret = cifs_swn_store_swn_addr(addr, &tcon->ses->server->dstaddr,
473 &tcon->ses->server->swn_dstaddr);
478 tcon->ses->server->use_swn_dstaddr = true;
483 ret = cifs_swn_unregister(tcon);
494 ret = cifs_swn_register(tcon);
501 cifs_signal_cifsd_for_reconnect(tcon->ses->server, false);
504 cifs_server_unlock(tcon->ses->server);
519 return cifs_swn_reconnect(swnreg->tcon, addr);
589 int cifs_swn_register(struct cifs_tcon *tcon)
594 swnreg = cifs_get_swn_reg(tcon);
607 int cifs_swn_unregister(struct cifs_tcon *tcon)
613 swnreg = cifs_find_swn_reg(tcon);
641 switch (swnreg->tcon->ses->server->dstaddr.ss_family) {
643 sa = (struct sockaddr_in *) &swnreg->tcon->ses->server->dstaddr;
647 sa6 = (struct sockaddr_in6 *) &swnreg->tcon->ses->server->dstaddr;