Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 80) sorted by last modified time

1234

/curl/tests/http/testenv/
H A Denv.py556 with open(fpath, 'w') as fd:
558 fd.write(f"{i:09d}-{s}\n")
563 fd.write(s[0:remain])
H A Dvsftpd.py210 with open(self._conf_file, 'w') as fd:
211 fd.write("\n".join(conf))
H A Dcerts.py249 with open(cert_file, "wb") as fd:
250 fd.write(creds.cert_pem)
253 fd.write(c.cert_pem)
255 fd.write(creds.pkey_pem)
258 fd.write(creds.pkey_pem)
260 fd.write(creds.cert_pem)
263 fd.write(c.cert_pem)
264 fd.write(creds.pkey_pem)
279 fd.write(c.cert_pem)
301 with open(fpath) as fd:
[all …]
/curl/tests/http/
H A Dtest_30_vsftpd.py54 with open(fpath, 'w') as fd:
56 fd.write(data1k)
H A Dtest_31_vsftpds.py64 with open(fpath, 'w') as fd:
66 fd.write(data1k)
/curl/src/
H A Dtool_main.c94 int fd[2]; in main_checkfds() local
98 if(pipe(fd)) in main_checkfds()
H A Dtool_getpass.c147 tcgetattr(fd, &withecho); in ttyecho()
150 tcsetattr(fd, TCSANOW, &noecho); in ttyecho()
152 ioctl(fd, TCGETA, &withecho); in ttyecho()
155 ioctl(fd, TCSETA, &noecho); in ttyecho()
158 (void)fd; in ttyecho()
166 tcsetattr(fd, TCSAFLUSH, &withecho); in ttyecho()
168 ioctl(fd, TCSETA, &withecho); in ttyecho()
182 if(-1 == fd) in getpass_r()
188 nread = read(fd, password, buflen); in getpass_r()
200 if(STDIN_FILENO != fd) in getpass_r()
[all …]
H A Dtool_cb_wrt.c75 int fd; in tool_create_output_file() local
77 fd = open(fname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file()
79 } while(fd == -1 && errno == EINTR); in tool_create_output_file()
80 if(config->file_clobber_mode == CLOBBER_NEVER && fd == -1) { in tool_create_output_file()
97 while(fd == -1 && /* haven't successfully opened a file */ in tool_create_output_file()
104 fd = open(newname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file()
106 } while(fd == -1 && errno == EINTR); in tool_create_output_file()
116 if(fd != -1) { in tool_create_output_file()
117 file = fdopen(fd, "wb"); in tool_create_output_file()
119 close(fd); in tool_create_output_file()
/curl/lib/
H A Dcf-socket.c1492 pfd[0].fd = ctx->sock; in cf_socket_conn_is_alive()
H A Dsocketpair.c140 pfd[0].fd = listener; in Curl_socketpair()
163 pfd[0].fd = socks[1]; in Curl_socketpair()
H A Dwarnless.h74 ssize_t curlx_read(int fd, void *buf, size_t count);
76 ssize_t curlx_write(int fd, const void *buf, size_t count);
87 #define read(fd, buf, count) curlx_read(fd, buf, count) argument
89 #define write(fd, buf, count) curlx_write(fd, buf, count) argument
H A Dmulti.c343 curl_socket_t fd = *((curl_socket_t *) key); in hash_fd() local
346 return (fd % slots_num); in hash_fd()
1244 curl_socket_t fd = ps.sockets[i]; in curl_multi_waitfds() local
1249 if(ufds[j].fd == fd) { in curl_multi_waitfds()
1257 ufd->fd = ps.sockets[i]; in curl_multi_waitfds()
1387 if(nfds && ps.sockets[i] == ufds[nfds-1].fd) {
1396 ufds[nfds].fd = ps.sockets[i];
1425 reset_socket_fdwrite(extra_fds[i].fd);
1438 ufds[nfds].fd = extra_fds[i].fd;
1457 ufds[nfds].fd = multi->wakeup_pair[0];
[all …]
H A Deasy.c472 if(m->socket.fd == s) { in events_socket()
511 m->socket.fd = s; in events_socket()
570 f->fd = m->socket.fd; in wait_or_timeout()
607 "%" CURL_FORMAT_SOCKET_T ")", fds[i].fd); in wait_or_timeout()
608 mcode = curl_multi_socket_action(multi, fds[i].fd, act, in wait_or_timeout()
H A Dkrb5.c615 curl_socket_t fd, const char *from, int length) in do_sec_send() argument
649 socket_write(data, fd, enc, 4); in do_sec_send()
651 socket_write(data, fd, mic, 4); in do_sec_send()
653 socket_write(data, fd, cmd_buffer, cmd_size); in do_sec_send()
654 socket_write(data, fd, "\r\n", 2); in do_sec_send()
662 socket_write(data, fd, &htonl_bytes, sizeof(htonl_bytes)); in do_sec_send()
663 socket_write(data, fd, buffer, curlx_sitouz(bytes)); in do_sec_send()
669 curl_socket_t fd, const char *buffer, size_t length) in sec_write() argument
679 do_sec_send(data, conn, fd, buffer, curlx_sztosi(len)); in sec_write()
692 curl_socket_t fd = conn->sock[sockindex]; in sec_send() local
[all …]
H A Dtelnet.c1269 pfd[0].fd = conn->sock[FIRSTSOCKET]; in send_telnet_data()
1525 pfd[0].fd = sockfd; in telnet_do()
1534 pfd[1].fd = fileno((FILE *)data->state.in); in telnet_do()
1538 if(pfd[1].fd < 0) { in telnet_do()
1602 nread = read(pfd[1].fd, buffer, sizeof(buffer)); in telnet_do()
H A Dopenldap.c93 extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url,
H A Dfile.c157 int fd; in file_connect() local
229 fd = -1; in file_connect()
252 file->fd = fd; in file_connect()
273 if(file->fd != -1) in file_done()
275 file->fd = -1; in file_done()
300 int fd; in file_upload() local
333 if(fd < 0) { in file_upload()
345 close(fd); in file_upload()
406 close(fd); in file_upload()
434 int fd; in file_do() local
[all …]
/curl/tests/server/
H A Dsocksd.c348 rc = (send)(fd, (char *)response, 8, 0); in socks4()
391 return socks4(fd, buffer, rc); in sockit()
419 rc = (send)(fd, (char *)response, 2, 0); in sockit()
727 curl_socket_t fd = c[i].clientfd; in incoming() local
728 FD_SET(fd, &fds_read); in incoming()
729 if((int)fd > maxfd) in incoming()
730 maxfd = (int)fd; in incoming()
731 fd = c[i].remotefd; in incoming()
732 FD_SET(fd, &fds_read); in incoming()
733 if((int)fd > maxfd) in incoming()
[all …]
H A Dsockfilt.c165 if(fd == fileno(stdin)) { in read_wincon()
169 return read(fd, buf, count); in read_wincon()
197 if(fd == fileno(stdout)) { in write_wincon()
636 int error, ret, fd; in select_ws() local
687 for(fd = 0; fd < nfds; fd++) { in select_ws()
713 data[nfd].fd = fd; in select_ws()
813 fd = data[i].fd; in select_ws()
826 else if(fd == fileno(stdout) || fd == fileno(stderr)) { in select_ws()
867 for(fd = 0; fd < nfds; fd++) { in select_ws()
868 if(FD_ISSET(fd, readfds)) in select_ws()
[all …]
H A Dmqttd.c440 rc = swrite(fd, (char *)packet, sendamount); in publish()
456 static int fixedheader(curl_socket_t fd, in fixedheader() argument
465 ssize_t rc = sread(fd, (char *)buffer, 2); in fixedheader()
479 rc = sread(fd, (char *)&buffer[i], 1); in fixedheader()
491 static curl_socket_t mqttit(curl_socket_t fd) in mqttit() argument
614 if(connack(dump, fd)) { in mqttit()
652 if(suback(dump, fd, packet_id)) { in mqttit()
662 if(suback(dump, fd, packet_id)) { in mqttit()
672 disconnect(dump, fd); in mqttit()
687 puback(dump, fd, 0); in mqttit()
[all …]
/curl/tests/libtest/
H A Dlib677.c76 waitfd.fd = sock; in test()
H A Dlib582.c49 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument
54 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd()
57 if(sockets->sockets[i] == fd) { in removeFd()
69 static void addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument
75 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd()
76 removeFd(sockets, fd, 0); in addFd()
94 sockets->sockets[sockets->count] = fd; in addFd()
H A Dlib518.c53 static int *fd = NULL; variable
73 free(fd); in close_file_descriptors()
74 fd = NULL; in close_file_descriptors()
294 fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max)); in rlimit()
295 if(!fd) { in rlimit()
317 if(fd[0] < 0) { in rlimit()
321 free(fd); in rlimit()
322 fd = NULL; in rlimit()
333 fd[num_open.rlim_cur] = dup(fd[0]); in rlimit()
361 free(fd); in rlimit()
[all …]
H A Dlib530.c56 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument
61 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd()
64 if(sockets->sockets[i] == fd) { in removeFd()
77 static int addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument
83 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd()
84 removeFd(sockets, fd, 0); in addFd()
106 sockets->sockets[sockets->count] = fd; in addFd()
H A Dlib537.c53 static int *fd = NULL; variable
73 free(fd); in close_file_descriptors()
74 fd = NULL; in close_file_descriptors()
283 fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max));
284 if(!fd) {
289 if(!fd) {
311 if(fd[0] < 0) {
315 free(fd);
316 fd = NULL;
327 fd[num_open.rlim_cur] = dup(fd[0]);
[all …]

Completed in 93 milliseconds

1234