• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/lib/

Lines Matching defs:conn

119 static void sendsuboption(struct connectdata *conn, int option);
121 static CURLcode telnet_do(struct connectdata *conn, bool *done);
122 static CURLcode telnet_done(struct connectdata *conn,
124 static CURLcode send_telnet_data(struct connectdata *conn,
242 CURLcode init_telnet(struct connectdata *conn)
250 conn->data->req.protop = tn; /* make us known */
292 static void negotiate(struct connectdata *conn)
295 struct TELNET *tn = (struct TELNET *) conn->data->req.protop;
302 set_local_option(conn, i, CURL_YES);
305 set_remote_option(conn, i, CURL_YES);
346 static void send_negotiation(struct connectdata *conn, int cmd, int option)
351 struct SessionHandle *data = conn->data;
357 bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3);
363 printoption(conn->data, "SENT", cmd, option);
367 void set_remote_option(struct connectdata *conn, int option, int newstate)
369 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
374 send_negotiation(conn, CURL_DO, option);
413 send_negotiation(conn, CURL_DONT, option);
441 void rec_will(struct connectdata *conn, int option)
443 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
448 send_negotiation(conn, CURL_DO, option);
451 send_negotiation(conn, CURL_DONT, option);
481 send_negotiation(conn, CURL_DONT, option);
489 void rec_wont(struct connectdata *conn, int option)
491 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
499 send_negotiation(conn, CURL_DONT, option);
511 send_negotiation(conn, CURL_DO, option);
531 set_local_option(struct connectdata *conn, int option, int newstate)
533 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
538 send_negotiation(conn, CURL_WILL, option);
577 send_negotiation(conn, CURL_WONT, option);
605 void rec_do(struct connectdata *conn, int option)
607 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
612 send_negotiation(conn, CURL_WILL, option);
615 sendsuboption(conn, option);
620 send_negotiation(conn, CURL_WILL, option);
621 sendsuboption(conn, option);
624 send_negotiation(conn, CURL_WONT, option);
651 sendsuboption(conn, option);
657 send_negotiation(conn, CURL_WONT, option);
665 void rec_dont(struct connectdata *conn, int option)
667 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
675 send_negotiation(conn, CURL_WONT, option);
687 send_negotiation(conn, CURL_WILL, option);
821 static CURLcode check_telnet_options(struct connectdata *conn)
827 struct SessionHandle *data = conn->data;
828 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
834 if(conn->bits.user_passwd) {
835 snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user);
927 static void suboption(struct connectdata *conn)
937 struct SessionHandle *data = conn->data;
947 bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
959 bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
986 bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len);
1004 static void sendsuboption(struct connectdata *conn, int option)
1011 struct SessionHandle *data = conn->data;
1041 bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer, 3);
1048 send_telnet_data(conn, (char *)tn->subbuffer+3, 4);
1050 bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer+7, 2);
1061 CURLcode telrcv(struct connectdata *conn,
1069 struct SessionHandle *data = conn->data;
1074 result = Curl_client_write(conn, \
1150 rec_will(conn, c);
1157 rec_wont(conn, c);
1164 rec_do(conn, c);
1171 rec_dont(conn, c);
1200 suboption(conn); /* handle sub-option */
1213 suboption(conn); /* handle sub-option */
1226 static CURLcode send_telnet_data(struct connectdata *conn,
1244 pfd[0].fd = conn->sock[FIRSTSOCKET];
1253 rc = Curl_write(conn, conn->sock[FIRSTSOCKET], outbuf+total_written,
1264 static CURLcode telnet_done(struct connectdata *conn,
1267 struct TELNET *tn = (struct TELNET *)conn->data->req.protop;
1277 Curl_safefree(conn->data->req.protop);
1282 static CURLcode telnet_do(struct connectdata *conn, bool *done)
1285 struct SessionHandle *data = conn->data;
1286 curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
1317 code = init_telnet(conn);
1323 code = check_telnet_options(conn);
1431 code = (int)conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in);
1466 code = send_telnet_data(conn, buf, readfile_read);
1484 code = send_telnet_data(conn, buf, readfile_read);
1504 code = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
1520 code = telrcv(conn, (unsigned char *)buf, nread);
1530 negotiate(conn);
1543 if(Curl_tvdiff(now, conn->created) >= data->set.timeout) {
1569 if(conn->fread_func != (curl_read_callback)fread) {
1575 pfd[1].fd = fileno((FILE *)conn->fread_in);
1593 code = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread);
1611 code = telrcv(conn, (unsigned char *)buf, nread);
1621 negotiate(conn);
1634 nread = (int)conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in);
1644 code = send_telnet_data(conn, buf, nread);
1660 if(Curl_tvdiff(now, conn->created) >= data->set.timeout) {
1667 if(Curl_pgrsUpdate(conn)) {
1674 Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);