Lines Matching refs:option

87 #define	TS_WILL		5	/* will option negotiation */
249 * Begin option subnegotiation...
277 * Handle RFC 10xx Telnet linemode option additions
338 suboption(); /* handle sub-option */
373 * Telnet option processing state machine.
423 * peer probably should be buffering until this option state negotiation
428 send_do(int option, int init)
431 if ((do_dont_resp[option] == 0 && his_state_is_will(option)) ||
432 his_want_state_is_will(option))
439 if (option == TELOPT_TM)
440 set_his_want_state_wont(option);
442 set_his_want_state_will(option);
443 do_dont_resp[option]++;
445 output_data((const char *)doopt, option);
447 DIAG(TD_OPTIONS, printoption("td: send do", option));
451 willoption(int option)
460 DIAG(TD_OPTIONS, printoption("td: recv will", option));
462 if (do_dont_resp[option]) {
463 do_dont_resp[option]--;
464 if (do_dont_resp[option] && his_state_is_will(option))
465 do_dont_resp[option]--;
467 if (do_dont_resp[option] == 0) {
468 if (his_want_state_is_wont(option)) {
469 switch (option) {
524 * option, then don't worry peer that we can't
572 set_his_want_state_will(option);
573 send_do(option, 0);
575 do_dont_resp[option]++;
576 send_dont(option, 0);
584 switch (option) {
591 send_dont(option, 1);
637 set_his_state_will(option);
643 send_dont(int option, int init)
646 if ((do_dont_resp[option] == 0 && his_state_is_wont(option)) ||
647 his_want_state_is_wont(option))
649 set_his_want_state_wont(option);
650 do_dont_resp[option]++;
652 output_data((const char *)dont, option);
654 DIAG(TD_OPTIONS, printoption("td: send dont", option));
658 wontoption(int option)
664 DIAG(TD_OPTIONS, printoption("td: recv wont", option));
666 if (do_dont_resp[option]) {
667 do_dont_resp[option]--;
668 if (do_dont_resp[option] && his_state_is_wont(option))
669 do_dont_resp[option]--;
671 if (do_dont_resp[option] == 0) {
672 if (his_want_state_is_will(option)) {
674 switch (option) {
713 * option, then let peer know that we can't
731 * option rather than responding to the request,
759 set_his_want_state_wont(option);
760 if (his_state_is_will(option))
761 send_dont(option, 0);
763 switch (option) {
785 set_his_state_wont(option);
790 send_will(int option, int init)
793 if ((will_wont_resp[option] == 0 && my_state_is_will(option))||
794 my_want_state_is_will(option))
796 set_my_want_state_will(option);
797 will_wont_resp[option]++;
799 output_data((const char *)will, option);
801 DIAG(TD_OPTIONS, printoption("td: send will", option));
816 dooption(int option)
824 DIAG(TD_OPTIONS, printoption("td: recv do", option));
826 if (will_wont_resp[option]) {
827 will_wont_resp[option]--;
828 if (will_wont_resp[option] && my_state_is_will(option))
829 will_wont_resp[option]--;
831 if ((will_wont_resp[option] == 0) && (my_want_state_is_wont(option))) {
832 switch (option) {
895 send_will(option, 0);
896 set_my_want_state_wont(option);
897 set_my_state_wont(option);
902 * When we get a LOGOUT option, respond
934 set_my_want_state_will(option);
935 send_will(option, 0);
937 will_wont_resp[option]++;
938 send_wont(option, 0);
941 set_my_state_will(option);
946 send_wont(int option, int init)
949 if ((will_wont_resp[option] == 0 && my_state_is_wont(option)) ||
950 my_want_state_is_wont(option))
952 set_my_want_state_wont(option);
953 will_wont_resp[option]++;
955 output_data((const char *)wont, option);
957 DIAG(TD_OPTIONS, printoption("td: send wont", option));
961 dontoption(int option)
968 DIAG(TD_OPTIONS, printoption("td: recv dont", option));
970 if (will_wont_resp[option]) {
971 will_wont_resp[option]--;
972 if (will_wont_resp[option] && my_state_is_wont(option))
973 will_wont_resp[option]--;
975 if ((will_wont_resp[option] == 0) && (my_want_state_is_will(option))) {
976 switch (option) {
1023 set_my_want_state_wont(option);
1024 if (my_state_is_will(option))
1025 send_wont(option, 0);
1026 set_my_state_wont(option);
1028 send_will(option, 1);
1036 set_my_want_state_wont(option);
1037 if (my_state_is_will(option))
1038 send_wont(option, 0);
1040 set_my_state_wont(option);
1055 * Look at the sub-option buffer, and try to be helpful to the other
1077 if (his_state_is_wont(TELOPT_TSPEED)) /* Ignore if option disabled */
1101 if (his_state_is_wont(TELOPT_TTYPE)) /* Ignore if option disabled */
1129 if (his_state_is_wont(TELOPT_NAWS)) /* Ignore if option disabled */
1154 if (his_state_is_wont(TELOPT_LINEMODE)) /* Ignore if option disabled */
1331 * If the client has sent us a well-formed option,
1511 * because if we received a DO/WILL for an option that we