Lines Matching refs:option
105 int cmd, int option);
109 static void send_negotiation(struct connectdata *, int cmd, int option);
110 static void set_local_option(struct connectdata *, int cmd, int option);
111 static void set_remote_option(struct connectdata *, int cmd, int option);
117 static void sendsuboption(struct connectdata *conn, int option);
309 const char *direction, int cmd, int option) in printoption()
316 if(CURL_TELCMD_OK(option)) in printoption()
317 infof(data, "%s IAC %s\n", direction, CURL_TELCMD(option)); in printoption()
319 infof(data, "%s IAC %d\n", direction, option); in printoption()
325 if(CURL_TELOPT_OK(option)) in printoption()
326 opt = CURL_TELOPT(option); in printoption()
327 else if(option == CURL_TELOPT_EXOPL) in printoption()
335 infof(data, "%s %s %d\n", direction, fmt, option); in printoption()
338 infof(data, "%s %d %d\n", direction, cmd, option); in printoption()
344 static void send_negotiation(struct connectdata *conn, int cmd, int option) in send_negotiation() argument
353 buf[2] = (unsigned char)option; in send_negotiation()
361 printoption(conn->data, "SENT", cmd, option); in send_negotiation()
365 void set_remote_option(struct connectdata *conn, int option, int newstate) in set_remote_option() argument
369 switch(tn->him[option]) { in set_remote_option()
371 tn->him[option] = CURL_WANTYES; in set_remote_option()
372 send_negotiation(conn, CURL_DO, option); in set_remote_option()
380 switch(tn->himq[option]) { in set_remote_option()
383 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
392 switch(tn->himq[option]) { in set_remote_option()
397 tn->himq[option] = CURL_EMPTY; in set_remote_option()
404 switch(tn->him[option]) { in set_remote_option()
410 tn->him[option] = CURL_WANTNO; in set_remote_option()
411 send_negotiation(conn, CURL_DONT, option); in set_remote_option()
415 switch(tn->himq[option]) { in set_remote_option()
420 tn->himq[option] = CURL_EMPTY; in set_remote_option()
426 switch(tn->himq[option]) { in set_remote_option()
428 tn->himq[option] = CURL_OPPOSITE; in set_remote_option()
439 void rec_will(struct connectdata *conn, int option) in rec_will() argument
442 switch(tn->him[option]) { in rec_will()
444 if(tn->him_preferred[option] == CURL_YES) { in rec_will()
445 tn->him[option] = CURL_YES; in rec_will()
446 send_negotiation(conn, CURL_DO, option); in rec_will()
449 send_negotiation(conn, CURL_DONT, option); in rec_will()
458 switch(tn->himq[option]) { in rec_will()
461 tn->him[option] = CURL_NO; in rec_will()
465 tn->him[option] = CURL_YES; in rec_will()
466 tn->himq[option] = CURL_EMPTY; in rec_will()
472 switch(tn->himq[option]) { in rec_will()
474 tn->him[option] = CURL_YES; in rec_will()
477 tn->him[option] = CURL_WANTNO; in rec_will()
478 tn->himq[option] = CURL_EMPTY; in rec_will()
479 send_negotiation(conn, CURL_DONT, option); in rec_will()
487 void rec_wont(struct connectdata *conn, int option) in rec_wont() argument
490 switch(tn->him[option]) { in rec_wont()
496 tn->him[option] = CURL_NO; in rec_wont()
497 send_negotiation(conn, CURL_DONT, option); in rec_wont()
501 switch(tn->himq[option]) { in rec_wont()
503 tn->him[option] = CURL_NO; in rec_wont()
507 tn->him[option] = CURL_WANTYES; in rec_wont()
508 tn->himq[option] = CURL_EMPTY; in rec_wont()
509 send_negotiation(conn, CURL_DO, option); in rec_wont()
515 switch(tn->himq[option]) { in rec_wont()
517 tn->him[option] = CURL_NO; in rec_wont()
520 tn->him[option] = CURL_NO; in rec_wont()
521 tn->himq[option] = CURL_EMPTY; in rec_wont()
529 set_local_option(struct connectdata *conn, int option, int newstate) in set_local_option() argument
533 switch(tn->us[option]) { in set_local_option()
535 tn->us[option] = CURL_WANTYES; in set_local_option()
536 send_negotiation(conn, CURL_WILL, option); in set_local_option()
544 switch(tn->usq[option]) { in set_local_option()
547 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
556 switch(tn->usq[option]) { in set_local_option()
561 tn->usq[option] = CURL_EMPTY; in set_local_option()
568 switch(tn->us[option]) { in set_local_option()
574 tn->us[option] = CURL_WANTNO; in set_local_option()
575 send_negotiation(conn, CURL_WONT, option); in set_local_option()
579 switch(tn->usq[option]) { in set_local_option()
584 tn->usq[option] = CURL_EMPTY; in set_local_option()
590 switch(tn->usq[option]) { in set_local_option()
592 tn->usq[option] = CURL_OPPOSITE; in set_local_option()
603 void rec_do(struct connectdata *conn, int option) in rec_do() argument
606 switch(tn->us[option]) { in rec_do()
608 if(tn->us_preferred[option] == CURL_YES) { in rec_do()
609 tn->us[option] = CURL_YES; in rec_do()
610 send_negotiation(conn, CURL_WILL, option); in rec_do()
611 if(tn->subnegotiation[option] == CURL_YES) in rec_do()
613 sendsuboption(conn, option); in rec_do()
615 else if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
617 tn->us[option] = CURL_YES; in rec_do()
618 send_negotiation(conn, CURL_WILL, option); in rec_do()
619 sendsuboption(conn, option); in rec_do()
622 send_negotiation(conn, CURL_WONT, option); in rec_do()
630 switch(tn->usq[option]) { in rec_do()
633 tn->us[option] = CURL_NO; in rec_do()
637 tn->us[option] = CURL_YES; in rec_do()
638 tn->usq[option] = CURL_EMPTY; in rec_do()
644 switch(tn->usq[option]) { in rec_do()
646 tn->us[option] = CURL_YES; in rec_do()
647 if(tn->subnegotiation[option] == CURL_YES) { in rec_do()
649 sendsuboption(conn, option); in rec_do()
653 tn->us[option] = CURL_WANTNO; in rec_do()
654 tn->himq[option] = CURL_EMPTY; in rec_do()
655 send_negotiation(conn, CURL_WONT, option); in rec_do()
663 void rec_dont(struct connectdata *conn, int option) in rec_dont() argument
666 switch(tn->us[option]) { in rec_dont()
672 tn->us[option] = CURL_NO; in rec_dont()
673 send_negotiation(conn, CURL_WONT, option); in rec_dont()
677 switch(tn->usq[option]) { in rec_dont()
679 tn->us[option] = CURL_NO; in rec_dont()
683 tn->us[option] = CURL_WANTYES; in rec_dont()
684 tn->usq[option] = CURL_EMPTY; in rec_dont()
685 send_negotiation(conn, CURL_WILL, option); in rec_dont()
691 switch(tn->usq[option]) { in rec_dont()
693 tn->us[option] = CURL_NO; in rec_dont()
696 tn->us[option] = CURL_NO; in rec_dont()
697 tn->usq[option] = CURL_EMPTY; in rec_dont()
1002 static void sendsuboption(struct connectdata *conn, int option) in sendsuboption() argument
1012 switch (option) { in sendsuboption()