Lines Matching full:tcon
32 struct cifs_tcon *tcon; member
35 static int cifs_swn_auth_info_krb(struct cifs_tcon *tcon, struct sk_buff *skb) in cifs_swn_auth_info_krb() argument
46 static int cifs_swn_auth_info_ntlm(struct cifs_tcon *tcon, struct sk_buff *skb) in cifs_swn_auth_info_ntlm() argument
50 if (tcon->ses->user_name != NULL) { in cifs_swn_auth_info_ntlm()
51 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_USER_NAME, tcon->ses->user_name); in cifs_swn_auth_info_ntlm()
56 if (tcon->ses->password != NULL) { in cifs_swn_auth_info_ntlm()
57 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_PASSWORD, tcon->ses->password); in cifs_swn_auth_info_ntlm()
62 if (tcon->ses->domainName != NULL) { in cifs_swn_auth_info_ntlm()
63 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_DOMAIN_NAME, tcon->ses->domainName); in cifs_swn_auth_info_ntlm()
114 if (swnreg->tcon->ses->server->use_swn_dstaddr) in cifs_swn_send_register_message()
115 addr = &swnreg->tcon->ses->server->swn_dstaddr; in cifs_swn_send_register_message()
117 addr = &swnreg->tcon->ses->server->dstaddr; in cifs_swn_send_register_message()
141 authtype = cifs_select_sectype(swnreg->tcon->ses->server, swnreg->tcon->ses->sectype); in cifs_swn_send_register_message()
144 ret = cifs_swn_auth_info_krb(swnreg->tcon, skb); in cifs_swn_send_register_message()
152 ret = cifs_swn_auth_info_ntlm(swnreg->tcon, skb); in cifs_swn_send_register_message()
211 &swnreg->tcon->ses->server->dstaddr); in cifs_swn_send_unregister_message()
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) in cifs_find_swn_reg() argument
259 net_name = extract_hostname(tcon->tree_name); in cifs_find_swn_reg()
265 __func__, tcon->tree_name, ret); in cifs_find_swn_reg()
269 share_name = extract_sharename(tcon->tree_name); in cifs_find_swn_reg()
275 __func__, tcon->tree_name, ret); in cifs_find_swn_reg()
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) in cifs_get_swn_reg() argument
313 reg = cifs_find_swn_reg(tcon); in cifs_get_swn_reg()
338 reg->net_name = extract_hostname(tcon->tree_name); in cifs_get_swn_reg()
345 reg->share_name = extract_sharename(tcon->tree_name); in cifs_get_swn_reg()
354 reg->ip_notify = (tcon->capabilities & SMB2_SHARE_CAP_SCALEOUT); in cifs_get_swn_reg()
356 reg->tcon = tcon; in cifs_get_swn_reg()
399 cifs_signal_cifsd_for_reconnect(swnreg->tcon->ses->server, true); in cifs_swn_resource_state_changed()
403 cifs_signal_cifsd_for_reconnect(swnreg->tcon->ses->server, true); in cifs_swn_resource_state_changed()
463 static int cifs_swn_reconnect(struct cifs_tcon *tcon, struct sockaddr_storage *addr) in cifs_swn_reconnect() argument
468 cifs_server_lock(tcon->ses->server); in cifs_swn_reconnect()
469 if (cifs_sockaddr_equal(&tcon->ses->server->dstaddr, addr)) in cifs_swn_reconnect()
472 ret = cifs_swn_store_swn_addr(addr, &tcon->ses->server->dstaddr, in cifs_swn_reconnect()
473 &tcon->ses->server->swn_dstaddr); in cifs_swn_reconnect()
478 tcon->ses->server->use_swn_dstaddr = true; in cifs_swn_reconnect()
483 ret = cifs_swn_unregister(tcon); in cifs_swn_reconnect()
494 ret = cifs_swn_register(tcon); in cifs_swn_reconnect()
501 cifs_signal_cifsd_for_reconnect(tcon->ses->server, false); in cifs_swn_reconnect()
504 cifs_server_unlock(tcon->ses->server); in cifs_swn_reconnect()
519 return cifs_swn_reconnect(swnreg->tcon, addr); in cifs_swn_client_move()
589 int cifs_swn_register(struct cifs_tcon *tcon) in cifs_swn_register() argument
594 swnreg = cifs_get_swn_reg(tcon); in cifs_swn_register()
607 int cifs_swn_unregister(struct cifs_tcon *tcon) in cifs_swn_unregister() argument
613 swnreg = cifs_find_swn_reg(tcon); in cifs_swn_unregister()
641 switch (swnreg->tcon->ses->server->dstaddr.ss_family) { in cifs_swn_dump()
643 sa = (struct sockaddr_in *) &swnreg->tcon->ses->server->dstaddr; in cifs_swn_dump()
647 sa6 = (struct sockaddr_in6 *) &swnreg->tcon->ses->server->dstaddr; in cifs_swn_dump()