Lines Matching refs:option
100 int cmd, int option);
104 static void send_negotiation(struct Curl_easy *data, int cmd, int option);
106 int option, int newstate);
108 int option, int newstate);
114 static void sendsuboption(struct Curl_easy *data, int option);
143 CURL_TS_SB, /* sub-option collection */
144 CURL_TS_SE /* looking for sub-option end */
221 we enable this option by default. This behavior
222 can be changed thanks to the "BINARY" option in
246 using the TERMINAL TYPE Telnet option). */
270 const char *direction, int cmd, int option)
274 if(CURL_TELCMD_OK(option))
275 infof(data, "%s IAC %s", direction, CURL_TELCMD(option));
277 infof(data, "%s IAC %d", direction, option);
286 if(CURL_TELOPT_OK(option))
287 opt = CURL_TELOPT(option);
288 else if(option == CURL_TELOPT_EXOPL)
296 infof(data, "%s %s %d", direction, fmt, option);
299 infof(data, "%s %d %d", direction, cmd, option);
305 static void send_negotiation(struct Curl_easy *data, int cmd, int option)
313 buf[2] = (unsigned char)option;
321 printoption(data, "SENT", cmd, option);
325 void set_remote_option(struct Curl_easy *data, int option, int newstate)
329 switch(tn->him[option]) {
331 tn->him[option] = CURL_WANTYES;
332 send_negotiation(data, CURL_DO, option);
340 switch(tn->himq[option]) {
343 tn->himq[option] = CURL_OPPOSITE;
352 switch(tn->himq[option]) {
357 tn->himq[option] = CURL_EMPTY;
364 switch(tn->him[option]) {
370 tn->him[option] = CURL_WANTNO;
371 send_negotiation(data, CURL_DONT, option);
375 switch(tn->himq[option]) {
380 tn->himq[option] = CURL_EMPTY;
386 switch(tn->himq[option]) {
388 tn->himq[option] = CURL_OPPOSITE;
399 void rec_will(struct Curl_easy *data, int option)
402 switch(tn->him[option]) {
404 if(tn->him_preferred[option] == CURL_YES) {
405 tn->him[option] = CURL_YES;
406 send_negotiation(data, CURL_DO, option);
409 send_negotiation(data, CURL_DONT, option);
418 switch(tn->himq[option]) {
421 tn->him[option] = CURL_NO;
425 tn->him[option] = CURL_YES;
426 tn->himq[option] = CURL_EMPTY;
432 switch(tn->himq[option]) {
434 tn->him[option] = CURL_YES;
437 tn->him[option] = CURL_WANTNO;
438 tn->himq[option] = CURL_EMPTY;
439 send_negotiation(data, CURL_DONT, option);
447 void rec_wont(struct Curl_easy *data, int option)
450 switch(tn->him[option]) {
456 tn->him[option] = CURL_NO;
457 send_negotiation(data, CURL_DONT, option);
461 switch(tn->himq[option]) {
463 tn->him[option] = CURL_NO;
467 tn->him[option] = CURL_WANTYES;
468 tn->himq[option] = CURL_EMPTY;
469 send_negotiation(data, CURL_DO, option);
475 switch(tn->himq[option]) {
477 tn->him[option] = CURL_NO;
480 tn->him[option] = CURL_NO;
481 tn->himq[option] = CURL_EMPTY;
489 set_local_option(struct Curl_easy *data, int option, int newstate)
493 switch(tn->us[option]) {
495 tn->us[option] = CURL_WANTYES;
496 send_negotiation(data, CURL_WILL, option);
504 switch(tn->usq[option]) {
507 tn->usq[option] = CURL_OPPOSITE;
516 switch(tn->usq[option]) {
521 tn->usq[option] = CURL_EMPTY;
528 switch(tn->us[option]) {
534 tn->us[option] = CURL_WANTNO;
535 send_negotiation(data, CURL_WONT, option);
539 switch(tn->usq[option]) {
544 tn->usq[option] = CURL_EMPTY;
550 switch(tn->usq[option]) {
552 tn->usq[option] = CURL_OPPOSITE;
563 void rec_do(struct Curl_easy *data, int option)
566 switch(tn->us[option]) {
568 if(tn->us_preferred[option] == CURL_YES) {
569 tn->us[option] = CURL_YES;
570 send_negotiation(data, CURL_WILL, option);
571 if(tn->subnegotiation[option] == CURL_YES)
572 /* transmission of data option */
573 sendsuboption(data, option);
575 else if(tn->subnegotiation[option] == CURL_YES) {
576 /* send information to achieve this option */
577 tn->us[option] = CURL_YES;
578 send_negotiation(data, CURL_WILL, option);
579 sendsuboption(data, option);
582 send_negotiation(data, CURL_WONT, option);
590 switch(tn->usq[option]) {
593 tn->us[option] = CURL_NO;
597 tn->us[option] = CURL_YES;
598 tn->usq[option] = CURL_EMPTY;
604 switch(tn->usq[option]) {
606 tn->us[option] = CURL_YES;
607 if(tn->subnegotiation[option] == CURL_YES) {
608 /* transmission of data option */
609 sendsuboption(data, option);
613 tn->us[option] = CURL_WANTNO;
614 tn->himq[option] = CURL_EMPTY;
615 send_negotiation(data, CURL_WONT, option);
623 void rec_dont(struct Curl_easy *data, int option)
626 switch(tn->us[option]) {
632 tn->us[option] = CURL_NO;
633 send_negotiation(data, CURL_WONT, option);
637 switch(tn->usq[option]) {
639 tn->us[option] = CURL_NO;
643 tn->us[option] = CURL_WANTYES;
644 tn->usq[option] = CURL_EMPTY;
645 send_negotiation(data, CURL_WILL, option);
651 switch(tn->usq[option]) {
653 tn->us[option] = CURL_NO;
656 tn->us[option] = CURL_NO;
657 tn->usq[option] = CURL_EMPTY;
821 char *option = head->data;
823 char *sep = strchr(option, '=');
825 olen = sep - option;
832 if(strncasecompare(option, "TTYPE", 5)) {
845 if(strncasecompare(option, "XDISPLOC", 8)) {
858 if(strncasecompare(option, "NEW_ENV", 7)) {
873 if(strncasecompare(option, "WS", 2)) {
887 failf(data, "Syntax error in telnet option: %s", head->data);
897 if(strncasecompare(option, "BINARY", 6)) {
908 failf(data, "Unknown telnet option %s", head->data);
914 failf(data, "Syntax error in telnet option: %s", head->data);
930 * Look at the sub-option buffer, and try to be helpful to the other
1013 static void sendsuboption(struct Curl_easy *data, int option)
1022 switch(option) {
1195 * IAC SE was left off, or another option got inserted into the
1207 suboption(data); /* handle sub-option */
1219 suboption(data); /* handle sub-option */