Lines Matching refs:smbc
186 struct smb_conn *smb = &conn->proto.smbc;
247 struct smb_conn *smbc = &conn->proto.smbc;
257 memset(smbc, 0, sizeof(*smbc));
258 smbc->state = SMB_CONNECTING;
259 smbc->recv_buf = malloc(MAX_MESSAGE_SIZE);
260 if(!smbc->recv_buf)
272 smbc->user = slash + 1;
273 smbc->domain = strdup(conn->user);
274 if(!smbc->domain)
276 smbc->domain[slash - conn->user] = 0;
279 smbc->user = conn->user;
280 smbc->domain = strdup(conn->host.name);
281 if(!smbc->domain)
290 struct smb_conn *smbc = &conn->proto.smbc;
291 char *buf = smbc->recv_buf;
295 size_t len = MAX_MESSAGE_SIZE - smbc->got;
298 result = Curl_read(conn, FIRSTSOCKET, buf + smbc->got, len, &bytes_read);
305 smbc->got += bytes_read;
308 if(smbc->got < sizeof(unsigned int))
313 if(smbc->got < nbt_size)
336 struct smb_conn *smbc = &conn->proto.smbc;
338 smbc->got = 0;
344 struct smb_conn *smbc = &conn->proto.smbc;
355 h->uid = smb_swap16(smbc->uid);
365 struct smb_conn *smbc = &conn->proto.smbc;
375 smbc->send_size = len;
376 smbc->sent = bytes_written;
379 smbc->upload_size = upload_size;
386 struct smb_conn *smbc = &conn->proto.smbc;
388 ssize_t len = smbc->send_size - smbc->sent;
391 if(!smbc->send_size)
395 conn->data->state.uploadbuffer + smbc->sent,
401 smbc->sent += bytes_written;
403 smbc->send_size = 0;
428 struct smb_conn *smbc = &conn->proto.smbc;
437 byte_count += strlen(smbc->user) + strlen(smbc->domain);
443 Curl_ntlm_core_lm_resp(lm_hash, smbc->challenge, lm);
446 Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt);
457 msg.session_key = smb_swap32(smbc->session_key);
465 MSGCATNULL(smbc->user);
466 MSGCATNULL(smbc->domain);
600 struct smb_conn *smbc = &conn->proto.smbc;
604 if(!smbc->send_size && smbc->upload_size) {
605 int nread = smbc->upload_size > BUFSIZE ? BUFSIZE :
606 (int) smbc->upload_size;
614 smbc->upload_size -= nread;
615 smbc->send_size = nread;
616 smbc->sent = 0;
620 if(smbc->send_size) {
627 if(smbc->send_size || smbc->upload_size)
635 struct smb_conn *smbc = &conn->proto.smbc;
641 if(smbc->state == SMB_CONNECTING) {
674 switch(smbc->state) {
681 memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge));
682 smbc->session_key = smb_swap32(nrsp->session_key);
696 smbc->uid = smb_swap16(h->uid);
788 struct smb_conn *smbc = &conn->proto.smbc;
789 if(off + sizeof(unsigned int) + len > smbc->got) {
897 struct smb_conn *smbc = &conn->proto.smbc;
902 Curl_safefree(smbc->domain);
903 Curl_safefree(smbc->recv_buf);
916 struct smb_conn *smbc = &conn->proto.smbc;
923 if(smbc->send_size || smbc->upload_size)