Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 178) sorted by relevance

12345678

/curl/tests/unit/
H A Dunit1661.c51 char *buffer = NULL; variable
70 buffer = malloc(13);
71 abort_unless(buffer, "Out of memory");
72 Curl_bufref_set(&bufref, buffer, 13, test_free);
74 fail_unless((char *) bufref.ptr == buffer, "Referenced data badly set");
82 fail_unless((char *) Curl_bufref_ptr(&bufref) == buffer,
98 fail_unless((char *) bufref.ptr != buffer, "Returned pointer not set");
99 buffer = (char *) Curl_bufref_ptr(&bufref);
100 fail_unless(buffer, "Allocated pointer is NULL");
102 fail_unless(!buffer[3], "Duplicated data should have been truncated");
[all …]
H A Dunit1650.c159 unsigned char buffer[256]; variable
165 buffer, sizeof(buffer), &size);
174 fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size));
177 if(req[i].packet && memcmp(req[i].packet, buffer, size)) {
181 abort_if(req[i].packet && memcmp(req[i].packet, buffer, size),
200 len = sizeof(buffer);
201 ptr = (char *)buffer;
236 if(resp[i].out && strcmp((char *)buffer, resp[i].out)) {
238 resp[i].out, buffer);
280 msnprintf((char *)buffer, sizeof(buffer),
[all …]
H A Dunit1655.c143 unsigned char buffer[128]; variable
144 const size_t buflen = sizeof(buffer);
154 DOHcode ret = doh_encode(sunshine1, dnstype, buffer, buflen, &olen1);
161 ret2 = doh_encode(dotshine1, dnstype, buffer, buflen, &olen2);
168 ret2 = doh_encode(sunshine2, dnstype, buffer, buflen, &olen2);
174 ret = doh_encode(sunshine1, dnstype, buffer, olen1 - 1, &olen);
178 ret = doh_encode(sunshine1, dnstype, buffer, olen1, &olen);
/curl/src/
H A Dtool_getpass.c62 char *getpass_r(const char *prompt, char *buffer, size_t buflen) in getpass_r() argument
79 buffer[0] = '\0'; in getpass_r()
84 &iosb, 0, 0, buffer, buflen, 0, 0, in getpass_r()
88 buffer[iosb.iosb$w_bcnt] = '\0'; in getpass_r()
92 return buffer; /* we always return success */ in getpass_r()
105 buffer[i] = (char)getch(); in getpass_r()
106 if(buffer[i] == '\r' || buffer[i] == '\n') { in getpass_r()
107 buffer[i] = '\0'; in getpass_r()
111 if(buffer[i] == '\b') in getpass_r()
120 buffer[buflen-1] = '\0'; in getpass_r()
[all …]
/curl/tests/server/
H A Dgetpart.c113 buffer++; in line_length()
115 if(*buffer != '\n') { in line_length()
151 if(!*buffer) { in readline()
152 *buffer = calloc(1, 128); in readline()
153 if(!*buffer) in readline()
175 *buffer = newptr; in readline()
317 char *buffer = NULL; in getpart() local
350 ptr = buffer; in getpart()
355 show(("=> %s", buffer)); in getpart()
502 show(("=> %s", buffer)); in getpart()
[all …]
H A Dmqttd.c150 char buffer[512]; in getconfig() local
152 while(fgets(buffer, sizeof(buffer), fp)) { in getconfig()
527 if(!buffer) { in mqttit()
547 buffer = realloc(buffer, buff_size); in mqttit()
548 if(!buffer) { in mqttit()
572 payload_len = (size_t)(buffer[10] << 8) | buffer[11]; in mqttit()
633 packet_id = (unsigned short)((buffer[0] << 8) | buffer[1]); in mqttit()
636 topic_len = (size_t)(buffer[2] << 8) | buffer[3]; in mqttit()
681 topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes]; in mqttit()
705 if(buffer) in mqttit()
[all …]
H A Dsocksd.c192 char buffer[512]; in getconfig() local
194 while(fgets(buffer, sizeof(buffer), fp)) { in getconfig()
381 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
388 loghex(buffer, rc); in sockit()
428 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
435 loghex(buffer, rc); in sockit()
487 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
494 loghex(buffer, rc); in sockit()
653 char buffer[512]; in tunnel() local
656 nread = recv(cp->clientfd, buffer, sizeof(buffer), 0); in tunnel()
[all …]
H A Dsockfilt.c354 unsigned char *ptr = buffer; in lograw()
401 if(!read_stdin(buffer, 5)) in read_data_block()
404 buffer[5] = '\0'; in read_data_block()
417 lograw(buffer, *buffer_len); in read_data_block()
911 buffer[0], buffer[1], buffer[2], buffer[3]); in disc_handshake()
925 if(!read_data_block(buffer, sizeof(buffer), &buffer_len)) in disc_handshake()
1086 if(!read_stdin(buffer, 5)) in juggle()
1090 buffer[0], buffer[1], buffer[2], buffer[3]); in juggle()
1101 msnprintf((char *)buffer, sizeof(buffer), "%s/%hu\n", ipv_inuse, port); in juggle()
1116 if(!read_data_block(buffer, sizeof(buffer), &buffer_len)) in juggle()
[all …]
/curl/tests/libtest/
H A Dlib651.c29 static char buffer[17000]; /* more than 16K */ variable
41 int size = (int)sizeof(buffer)/1000; in test()
44 memset(&buffer[i * 1000], 65 + i, 1000); in test()
46 buffer[ sizeof(buffer)-1] = 0; /* null-terminate */ in test()
56 CURLFORM_COPYCONTENTS, buffer, in test()
H A Dlib1911.c34 static char buffer[MAX_INPUT_LENGTH + 2]; variable
51 memset(buffer, 'A', MAX_INPUT_LENGTH + 1); in test()
52 buffer[MAX_INPUT_LENGTH + 1] = 0; in test()
54 printf("string length: %d\n", (int)strlen(buffer)); in test()
79 result = curl_easy_setopt(easy, o->id, buffer); in test()
H A Dlib666.c28 static char buffer[17000]; /* more than 16K */ variable
41 for(i = 0; i < sizeof(buffer); i++) in test()
43 buffer[i] = '\n'; in test()
45 buffer[i] = (char) (0x41 + i % 26); /* A...Z */ in test()
82 res = curl_mime_data(part, buffer, sizeof(buffer)); in test()
H A Dlib2304.c45 char buffer[256]; in recv_pong() local
46 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_pong()
52 if(!memcmp(expected_payload, buffer, rlen)) { in recv_pong()
74 char buffer[256]; in recv_any() local
75 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_any()
H A Dlib2301.c45 char buffer[256];
47 curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &rflags);
52 if(!memcmp(expected_payload, buffer, rlen)) {
97 unsigned char *buffer = (unsigned char *)b; in writecb() local
107 fprintf(stderr, "%02x ", (unsigned char)buffer[i]); in writecb()
110 if(buffer[0] == 0x89) { in writecb()
H A Dlib652.c28 static char buffer[17000]; /* more than 16K */ variable
40 int size = (int)sizeof(buffer) / 10; in test()
43 memset(&buffer[i * 10], 65 + (i % 26), 10); in test()
80 res = curl_mime_data(part, buffer, sizeof(buffer)); in test()
/curl/lib/vtls/
H A Dschannel_verify.c165 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_data_to_store()
237 char buffer[STRERROR_LEN]; in add_certs_file_to_store() local
241 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
263 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
273 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
303 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
486 Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); in Curl_verify_host()
615 Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); in Curl_verify_certificate()
650 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in Curl_verify_certificate()
698 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in Curl_verify_certificate()
[all …]
/curl/docs/examples/
H A Dwebsocket.c52 char buffer[256]; in recv_pong() local
53 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_pong()
59 if(!memcmp(expected_payload, buffer, rlen)) { in recv_pong()
81 char buffer[256]; in recv_any() local
83 return curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_any()
/curl/docs/libcurl/opts/
H A DCURLOPT_BUFFERSIZE.md18 CURLOPT_BUFFERSIZE - receive buffer size
30 Pass a long specifying your preferred *size* (in bytes) for the receive buffer
33 is a benefit of having a larger buffer for performance.
38 This buffer size is by default *CURL_MAX_WRITE_SIZE* (16kB). The maximum
39 buffer size allowed to be set is *CURL_MAX_READ_SIZE* (10MB). The minimum
40 buffer size allowed to be set is 1024.
47 Starting in libcurl 8.7.0, there is just a single transfer buffer allocated
48 per multi handle. This buffer is used by all easy handles added to a multi
49 handle no matter how many parallel transfers there are. The buffer remains
66 /* ask libcurl to allocate a larger receive buffer */
[all …]
H A DCURLOPT_UPLOAD_BUFFERSIZE.md17 CURLOPT_UPLOAD_BUFFERSIZE - upload buffer size
30 buffer in libcurl. It makes libcurl uses a larger buffer that gets passed to
33 buffer.
38 The upload buffer size is by default 64 kilobytes. The maximum buffer size
39 allowed to be set is 2 megabytes. The minimum buffer size allowed to be set is
42 The upload buffer is allocated on-demand - so if the handle is not used for
43 upload, this buffer is not allocated at all.
62 /* ask libcurl to allocate a larger upload buffer */
H A DCURLOPT_ERRORBUFFER.md20 CURLOPT_ERRORBUFFER - error buffer for error messages
32 Pass a char pointer to a buffer that libcurl may use to store human readable
34 return code from curl_easy_perform(3) and related functions. The buffer must
37 You must keep the associated buffer available until libcurl no longer needs
42 Do not rely on the contents of the buffer unless an error code was returned.
43 Since 7.60.0 libcurl initializes the contents of the error buffer to an empty
45 was returned but there was no error detail then the buffer was untouched.
67 /* provide a buffer to store errors in */
70 /* set the error buffer as empty before performing a request */
/curl/CMake/
H A DCurlTests.c85 char buffer[8192]; in main() local
95 rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop); in main()
99 rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop); in main()
329 char buffer[1024]; in main() local
331 check(strerror_r(EACCES, buffer, sizeof(buffer))[0]); in main()
345 char buffer[1024]; in main() local
347 check(strerror_r(EACCES, buffer, sizeof(buffer))); in main()
/curl/lib/
H A Dcurl_trc.c121 char buffer[MAXINFO + 2]; in trc_infof() local
123 len = msnprintf(buffer, MAXINFO, "[%s] ", feat->name); in trc_infof()
124 len += mvsnprintf(buffer + len, MAXINFO - len, fmt, ap); in trc_infof()
125 buffer[len++] = '\n'; in trc_infof()
126 buffer[len] = '\0'; in trc_infof()
127 Curl_debug(data, CURLINFO_TEXT, buffer, len); in trc_infof()
148 char buffer[MAXINFO + 2]; in Curl_trc_cf_infof() local
150 len += msnprintf(buffer + len, MAXINFO - len, "[%s] ", in Curl_trc_cf_infof()
160 buffer[len++] = '\n'; in Curl_trc_cf_infof()
161 buffer[len] = '\0'; in Curl_trc_cf_infof()
[all …]
H A Dcurl_get_line.c42 char buffer[128]; in Curl_get_line() local
45 char *b = fgets(buffer, sizeof(buffer), input); in Curl_get_line()
H A Dstrdup.c93 void *buffer = malloc(length); in Curl_memdup() local
94 if(!buffer) in Curl_memdup()
97 memcpy(buffer, src, length); in Curl_memdup()
99 return buffer; in Curl_memdup()
/curl/docs/libcurl/
H A Dcurl_ws_recv.md26 CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
35 **buffer**, but not more than **buflen** bytes. *recv* is set to the
39 *buffer*, libcurl returns a full buffer and the application needs to call
40 this function again to continue draining the buffer.
53 char buffer[256];
56 CURLcode res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
/curl/include/curl/
H A Dmprintf.h54 CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...)
56 CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
63 CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args)
65 CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,

Completed in 128 milliseconds

12345678