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);
271 const char *direction, int cmd, int option) in printoption()
275 if(CURL_TELCMD_OK(option)) in printoption()
276 infof(data, "%s IAC %s", direction, CURL_TELCMD(option)); in printoption()
278 infof(data, "%s IAC %d", direction, option); in printoption()
287 if(CURL_TELOPT_OK(option)) in printoption()
288 opt = CURL_TELOPT(option); in printoption()
289 else if(option == CURL_TELOPT_EXOPL) in printoption()
297 infof(data, "%s %s %d", direction, fmt, option); in printoption()
300 infof(data, "%s %d %d", direction, cmd, option); in printoption()
306 static void send_negotiation(struct Curl_easy *data, int cmd, int option) in send_negotiation() argument
314 buf[2] = (unsigned char)option; in send_negotiation()
322 printoption(data, "SENT", cmd, option); in send_negotiation()
326 void set_remote_option(struct Curl_easy *data, int option, int newstate) in set_remote_option() argument
330 switch(tn->him[option]) { in set_remote_option()
332 tn->him[option] = CURL_WANTYES; in set_remote_option()
333 send_negotiation(data, CURL_DO, option); in set_remote_option()
341 switch(tn->himq[option]) { in set_remote_option()
344 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
353 switch(tn->himq[option]) { in set_remote_option()
358 tn->himq[option] = CURL_EMPTY; in set_remote_option()
365 switch(tn->him[option]) { in set_remote_option()
371 tn->him[option] = CURL_WANTNO; in set_remote_option()
372 send_negotiation(data, CURL_DONT, option); in set_remote_option()
376 switch(tn->himq[option]) { in set_remote_option()
381 tn->himq[option] = CURL_EMPTY; in set_remote_option()
387 switch(tn->himq[option]) { in set_remote_option()
389 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
400 void rec_will(struct Curl_easy *data, int option) in rec_will() argument
403 switch(tn->him[option]) { in rec_will()
405 if(tn->him_preferred[option] == CURL_YES) { in rec_will()
406 tn->him[option] = CURL_YES; in rec_will()
407 send_negotiation(data, CURL_DO, option); in rec_will()
410 send_negotiation(data, CURL_DONT, option); in rec_will()
419 switch(tn->himq[option]) { in rec_will()
422 tn->him[option] = CURL_NO; in rec_will()
426 tn->him[option] = CURL_YES; in rec_will()
427 tn->himq[option] = CURL_EMPTY; in rec_will()
433 switch(tn->himq[option]) { in rec_will()
435 tn->him[option] = CURL_YES; in rec_will()
438 tn->him[option] = CURL_WANTNO; in rec_will()
439 tn->himq[option] = CURL_EMPTY; in rec_will()
440 send_negotiation(data, CURL_DONT, option); in rec_will()
448 void rec_wont(struct Curl_easy *data, int option) in rec_wont() argument
451 switch(tn->him[option]) { in rec_wont()
457 tn->him[option] = CURL_NO; in rec_wont()
458 send_negotiation(data, CURL_DONT, option); in rec_wont()
462 switch(tn->himq[option]) { in rec_wont()
464 tn->him[option] = CURL_NO; in rec_wont()
468 tn->him[option] = CURL_WANTYES; in rec_wont()
469 tn->himq[option] = CURL_EMPTY; in rec_wont()
470 send_negotiation(data, CURL_DO, option); in rec_wont()
476 switch(tn->himq[option]) { in rec_wont()
478 tn->him[option] = CURL_NO; in rec_wont()
481 tn->him[option] = CURL_NO; in rec_wont()
482 tn->himq[option] = CURL_EMPTY; in rec_wont()
490 set_local_option(struct Curl_easy *data, int option, int newstate) in set_local_option() argument
494 switch(tn->us[option]) { in set_local_option()
496 tn->us[option] = CURL_WANTYES; in set_local_option()
497 send_negotiation(data, CURL_WILL, option); in set_local_option()
505 switch(tn->usq[option]) { in set_local_option()
508 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
517 switch(tn->usq[option]) { in set_local_option()
522 tn->usq[option] = CURL_EMPTY; in set_local_option()
529 switch(tn->us[option]) { in set_local_option()
535 tn->us[option] = CURL_WANTNO; in set_local_option()
536 send_negotiation(data, CURL_WONT, option); in set_local_option()
540 switch(tn->usq[option]) { in set_local_option()
545 tn->usq[option] = CURL_EMPTY; in set_local_option()
551 switch(tn->usq[option]) { in set_local_option()
553 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
564 void rec_do(struct Curl_easy *data, int option) in rec_do() argument
567 switch(tn->us[option]) { in rec_do()
569 if(tn->us_preferred[option] == CURL_YES) { in rec_do()
570 tn->us[option] = CURL_YES; in rec_do()
571 send_negotiation(data, CURL_WILL, option); in rec_do()
572 if(tn->subnegotiation[option] == CURL_YES) in rec_do()
574 sendsuboption(data, option); in rec_do()
576 else if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
578 tn->us[option] = CURL_YES; in rec_do()
579 send_negotiation(data, CURL_WILL, option); in rec_do()
580 sendsuboption(data, option); in rec_do()
583 send_negotiation(data, CURL_WONT, option); in rec_do()
591 switch(tn->usq[option]) { in rec_do()
594 tn->us[option] = CURL_NO; in rec_do()
598 tn->us[option] = CURL_YES; in rec_do()
599 tn->usq[option] = CURL_EMPTY; in rec_do()
605 switch(tn->usq[option]) { in rec_do()
607 tn->us[option] = CURL_YES; in rec_do()
608 if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
610 sendsuboption(data, option); in rec_do()
614 tn->us[option] = CURL_WANTNO; in rec_do()
615 tn->himq[option] = CURL_EMPTY; in rec_do()
616 send_negotiation(data, CURL_WONT, option); in rec_do()
624 void rec_dont(struct Curl_easy *data, int option) in rec_dont() argument
627 switch(tn->us[option]) { in rec_dont()
633 tn->us[option] = CURL_NO; in rec_dont()
634 send_negotiation(data, CURL_WONT, option); in rec_dont()
638 switch(tn->usq[option]) { in rec_dont()
640 tn->us[option] = CURL_NO; in rec_dont()
644 tn->us[option] = CURL_WANTYES; in rec_dont()
645 tn->usq[option] = CURL_EMPTY; in rec_dont()
646 send_negotiation(data, CURL_WILL, option); in rec_dont()
652 switch(tn->usq[option]) { in rec_dont()
654 tn->us[option] = CURL_NO; in rec_dont()
657 tn->us[option] = CURL_NO; in rec_dont()
658 tn->usq[option] = CURL_EMPTY; in rec_dont()
822 char *option = head->data; in check_telnet_options() local
824 char *sep = strchr(option, '='); in check_telnet_options()
826 olen = sep - option; in check_telnet_options()
833 if(strncasecompare(option, "TTYPE", 5)) { in check_telnet_options()
843 if(strncasecompare(option, "XDISPLOC", 8)) { in check_telnet_options()
853 if(strncasecompare(option, "NEW_ENV", 7)) { in check_telnet_options()
868 if(strncasecompare(option, "WS", 2)) { in check_telnet_options()
892 if(strncasecompare(option, "BINARY", 6)) { in check_telnet_options()
1008 static void sendsuboption(struct Curl_easy *data, int option) in sendsuboption() argument
1017 switch(option) { in sendsuboption()