Lines Matching refs:option
98 int cmd, int option);
102 static void send_negotiation(struct Curl_easy *data, int cmd, int option);
104 int option, int newstate);
106 int option, int newstate);
112 static void sendsuboption(struct Curl_easy *data, int option);
266 const char *direction, int cmd, int option) in printoption()
270 if(CURL_TELCMD_OK(option)) in printoption()
271 infof(data, "%s IAC %s", direction, CURL_TELCMD(option)); in printoption()
273 infof(data, "%s IAC %d", direction, option); in printoption()
282 if(CURL_TELOPT_OK(option)) in printoption()
283 opt = CURL_TELOPT(option); in printoption()
284 else if(option == CURL_TELOPT_EXOPL) in printoption()
292 infof(data, "%s %s %d", direction, fmt, option); in printoption()
295 infof(data, "%s %d %d", direction, cmd, option); in printoption()
301 static void send_negotiation(struct Curl_easy *data, int cmd, int option) in send_negotiation() argument
309 buf[2] = (unsigned char)option; in send_negotiation()
317 printoption(data, "SENT", cmd, option); in send_negotiation()
321 void set_remote_option(struct Curl_easy *data, int option, int newstate) in set_remote_option() argument
325 switch(tn->him[option]) { in set_remote_option()
327 tn->him[option] = CURL_WANTYES; in set_remote_option()
328 send_negotiation(data, CURL_DO, option); in set_remote_option()
336 switch(tn->himq[option]) { in set_remote_option()
339 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
348 switch(tn->himq[option]) { in set_remote_option()
353 tn->himq[option] = CURL_EMPTY; in set_remote_option()
360 switch(tn->him[option]) { in set_remote_option()
366 tn->him[option] = CURL_WANTNO; in set_remote_option()
367 send_negotiation(data, CURL_DONT, option); in set_remote_option()
371 switch(tn->himq[option]) { in set_remote_option()
376 tn->himq[option] = CURL_EMPTY; in set_remote_option()
382 switch(tn->himq[option]) { in set_remote_option()
384 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
395 void rec_will(struct Curl_easy *data, int option) in rec_will() argument
398 switch(tn->him[option]) { in rec_will()
400 if(tn->him_preferred[option] == CURL_YES) { in rec_will()
401 tn->him[option] = CURL_YES; in rec_will()
402 send_negotiation(data, CURL_DO, option); in rec_will()
405 send_negotiation(data, CURL_DONT, option); in rec_will()
414 switch(tn->himq[option]) { in rec_will()
417 tn->him[option] = CURL_NO; in rec_will()
421 tn->him[option] = CURL_YES; in rec_will()
422 tn->himq[option] = CURL_EMPTY; in rec_will()
428 switch(tn->himq[option]) { in rec_will()
430 tn->him[option] = CURL_YES; in rec_will()
433 tn->him[option] = CURL_WANTNO; in rec_will()
434 tn->himq[option] = CURL_EMPTY; in rec_will()
435 send_negotiation(data, CURL_DONT, option); in rec_will()
443 void rec_wont(struct Curl_easy *data, int option) in rec_wont() argument
446 switch(tn->him[option]) { in rec_wont()
452 tn->him[option] = CURL_NO; in rec_wont()
453 send_negotiation(data, CURL_DONT, option); in rec_wont()
457 switch(tn->himq[option]) { in rec_wont()
459 tn->him[option] = CURL_NO; in rec_wont()
463 tn->him[option] = CURL_WANTYES; in rec_wont()
464 tn->himq[option] = CURL_EMPTY; in rec_wont()
465 send_negotiation(data, CURL_DO, option); in rec_wont()
471 switch(tn->himq[option]) { in rec_wont()
473 tn->him[option] = CURL_NO; in rec_wont()
476 tn->him[option] = CURL_NO; in rec_wont()
477 tn->himq[option] = CURL_EMPTY; in rec_wont()
485 set_local_option(struct Curl_easy *data, int option, int newstate) in set_local_option() argument
489 switch(tn->us[option]) { in set_local_option()
491 tn->us[option] = CURL_WANTYES; in set_local_option()
492 send_negotiation(data, CURL_WILL, option); in set_local_option()
500 switch(tn->usq[option]) { in set_local_option()
503 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
512 switch(tn->usq[option]) { in set_local_option()
517 tn->usq[option] = CURL_EMPTY; in set_local_option()
524 switch(tn->us[option]) { in set_local_option()
530 tn->us[option] = CURL_WANTNO; in set_local_option()
531 send_negotiation(data, CURL_WONT, option); in set_local_option()
535 switch(tn->usq[option]) { in set_local_option()
540 tn->usq[option] = CURL_EMPTY; in set_local_option()
546 switch(tn->usq[option]) { in set_local_option()
548 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
559 void rec_do(struct Curl_easy *data, int option) in rec_do() argument
562 switch(tn->us[option]) { in rec_do()
564 if(tn->us_preferred[option] == CURL_YES) { in rec_do()
565 tn->us[option] = CURL_YES; in rec_do()
566 send_negotiation(data, CURL_WILL, option); in rec_do()
567 if(tn->subnegotiation[option] == CURL_YES) in rec_do()
569 sendsuboption(data, option); in rec_do()
571 else if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
573 tn->us[option] = CURL_YES; in rec_do()
574 send_negotiation(data, CURL_WILL, option); in rec_do()
575 sendsuboption(data, option); in rec_do()
578 send_negotiation(data, CURL_WONT, option); in rec_do()
586 switch(tn->usq[option]) { in rec_do()
589 tn->us[option] = CURL_NO; in rec_do()
593 tn->us[option] = CURL_YES; in rec_do()
594 tn->usq[option] = CURL_EMPTY; in rec_do()
600 switch(tn->usq[option]) { in rec_do()
602 tn->us[option] = CURL_YES; in rec_do()
603 if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
605 sendsuboption(data, option); in rec_do()
609 tn->us[option] = CURL_WANTNO; in rec_do()
610 tn->himq[option] = CURL_EMPTY; in rec_do()
611 send_negotiation(data, CURL_WONT, option); in rec_do()
619 void rec_dont(struct Curl_easy *data, int option) in rec_dont() argument
622 switch(tn->us[option]) { in rec_dont()
628 tn->us[option] = CURL_NO; in rec_dont()
629 send_negotiation(data, CURL_WONT, option); in rec_dont()
633 switch(tn->usq[option]) { in rec_dont()
635 tn->us[option] = CURL_NO; in rec_dont()
639 tn->us[option] = CURL_WANTYES; in rec_dont()
640 tn->usq[option] = CURL_EMPTY; in rec_dont()
641 send_negotiation(data, CURL_WILL, option); in rec_dont()
647 switch(tn->usq[option]) { in rec_dont()
649 tn->us[option] = CURL_NO; in rec_dont()
652 tn->us[option] = CURL_NO; in rec_dont()
653 tn->usq[option] = CURL_EMPTY; in rec_dont()
973 static void sendsuboption(struct Curl_easy *data, int option) in sendsuboption() argument
982 switch(option) { in sendsuboption()