Lines Matching refs:smbc

380   struct smb_conn *smbc = &data->conn->proto.smbc;
392 if(smbc->state != newstate)
394 (void *)smbc, names[smbc->state], names[newstate]);
397 smbc->state = newstate;
445 struct smb_conn *smbc = &conn->proto.smbc;
455 smbc->state = SMB_CONNECTING;
456 smbc->recv_buf = malloc(MAX_MESSAGE_SIZE);
457 if(!smbc->recv_buf)
469 smbc->user = slash + 1;
470 smbc->domain = strdup(conn->user);
471 if(!smbc->domain)
473 smbc->domain[slash - conn->user] = 0;
476 smbc->user = conn->user;
477 smbc->domain = strdup(conn->host.name);
478 if(!smbc->domain)
489 struct smb_conn *smbc = &conn->proto.smbc;
490 char *buf = smbc->recv_buf;
494 size_t len = MAX_MESSAGE_SIZE - smbc->got;
497 result = Curl_read(data, sockfd, buf + smbc->got, len, &bytes_read);
504 smbc->got += bytes_read;
507 if(smbc->got < sizeof(unsigned int))
513 if(smbc->got < nbt_size)
536 struct smb_conn *smbc = &conn->proto.smbc;
538 smbc->got = 0;
545 struct smb_conn *smbc = &conn->proto.smbc;
556 h->uid = smb_swap16(smbc->uid);
567 struct smb_conn *smbc = &conn->proto.smbc;
577 smbc->send_size = len;
578 smbc->sent = bytes_written;
581 smbc->upload_size = upload_size;
589 struct smb_conn *smbc = &conn->proto.smbc;
591 ssize_t len = smbc->send_size - smbc->sent;
594 if(!smbc->send_size)
598 data->state.ulbuf + smbc->sent,
604 smbc->sent += bytes_written;
606 smbc->send_size = 0;
635 struct smb_conn *smbc = &conn->proto.smbc;
644 byte_count += strlen(smbc->user) + strlen(smbc->domain);
650 Curl_ntlm_core_lm_resp(lm_hash, smbc->challenge, lm);
652 Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt);
660 msg.session_key = smb_swap32(smbc->session_key);
668 MSGCATNULL(smbc->user);
669 MSGCATNULL(smbc->domain);
683 struct smb_conn *smbc = &conn->proto.smbc;
686 size_t byte_count = strlen(conn->host.name) + strlen(smbc->share);
698 MSGCATNULL(smbc->share);
809 struct smb_conn *smbc = &conn->proto.smbc;
814 if(!smbc->send_size && smbc->upload_size) {
815 size_t nread = smbc->upload_size > (size_t)data->set.upload_buffer_size ?
816 (size_t)data->set.upload_buffer_size : smbc->upload_size;
824 smbc->upload_size -= nread;
825 smbc->send_size = nread;
826 smbc->sent = 0;
830 if(smbc->send_size) {
837 if(smbc->send_size || smbc->upload_size)
846 struct smb_conn *smbc = &conn->proto.smbc;
852 if(smbc->state == SMB_CONNECTING) {
885 switch(smbc->state) {
887 if((smbc->got < sizeof(*nrsp) + sizeof(smbc->challenge) - 1) ||
893 memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge));
894 smbc->session_key = smb_swap32(nrsp->session_key);
908 smbc->uid = smb_swap16(h->uid);
946 struct smb_conn *smbc = &conn->proto.smbc;
995 if(h->status || smbc->got < sizeof(struct smb_nt_create_response)) {
1026 if(h->status || smbc->got < sizeof(struct smb_header) + 14) {
1036 if(off + sizeof(unsigned int) + len > smbc->got) {
1055 if(h->status || smbc->got < sizeof(struct smb_header) + 6) {
1130 struct smb_conn *smbc = &conn->proto.smbc;
1133 Curl_safefree(smbc->share);
1134 Curl_safefree(smbc->domain);
1135 Curl_safefree(smbc->recv_buf);
1150 struct smb_conn *smbc = &conn->proto.smbc;
1153 if(smbc->share) {
1163 struct smb_conn *smbc = &conn->proto.smbc;
1174 smbc->share = strdup((*path == '/' || *path == '\\') ? path + 1 : path);
1176 if(!smbc->share)
1179 slash = strchr(smbc->share, '/');
1181 slash = strchr(smbc->share, '\\');
1185 Curl_safefree(smbc->share);