Home | History | Annotate | Download | only in telnetd

Lines Matching defs:IF

28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
65 #if 0
89 #if defined(AUTHENTICATION) || defined(ENCRYPTION)
164 #if defined(IPPROTO_IP) && defined(IP_TOS)
188 if (strcmp(optarg, "debug") == 0) {
190 } else if (strcasecmp(optarg, "none") == 0) {
192 } else if (strcasecmp(optarg, "other") == 0) {
194 } else if (strcasecmp(optarg, "user") == 0) {
196 } else if (strcasecmp(optarg, "valid") == 0) {
198 } else if (strcasecmp(optarg, "off") == 0) {
212 if (strcmp(optarg, "ebug") == 0) {
225 if (!strcmp(optarg, "report")) {
227 } else if (!strcmp(optarg, "exercise")) {
229 } else if (!strcmp(optarg, "netdata")) {
231 } else if (!strcmp(optarg, "ptydata")) {
233 } else if (!strcmp(optarg, "options")) {
244 if (strcmp(optarg, "debug") == 0) {
277 #if defined(LINEMODE) && defined(KLUDGELINEMODE)
280 /* ignore -k option if built without kludge linemode */
294 if (telnet_context == 0) {
296 if (retval) {
355 if (debug) {
361 if (argc > 1) {
364 } else if (argc == 1)
374 if (error) {
380 if (s < 0) {
386 if (bind(s, res->ai_addr, res->ai_addrlen) < 0) {
390 if (listen(s, 1) < 0) {
396 if (ns < 0) {
404 } else if (argc > 0) {
411 if (getpeername(0, (struct sockaddr *)&from, &fromlen) < 0) {
416 if (keepalive &&
422 #if defined(IPPROTO_IP) && defined(IP_TOS)
423 if (((struct sockaddr *)&from)->sa_family == AF_INET) {
424 if (tos < 0)
426 if (tos
457 #if defined(LINEMODE) && defined(KLUDGELINEMODE)
496 if (auth_level >= 0) {
500 if (his_state_is_will(TELOPT_AUTHENTICATION)) {
525 if (his_state_is_will(TELOPT_TSPEED)) {
535 * send with. If autoencrypt is not set, this will just return.
537 if (his_state_is_will(TELOPT_ENCRYPT)) {
541 if (his_state_is_will(TELOPT_XDISPLOC)) {
548 if (his_state_is_will(TELOPT_NEW_ENVIRON)) {
555 else if (his_state_is_will(TELOPT_OLD_ENVIRON)) {
562 if (his_state_is_will(TELOPT_TTYPE)) {
568 if (his_state_is_will(TELOPT_TSPEED)) {
572 if (his_state_is_will(TELOPT_XDISPLOC)) {
576 if (his_state_is_will(TELOPT_NEW_ENVIRON)) {
580 if (his_state_is_will(TELOPT_OLD_ENVIRON)) {
584 if (his_state_is_will(TELOPT_TTYPE)) {
591 * If the other side has already disabled the option, then
594 if (his_state_is_will(TELOPT_TTYPE) && !terminaltypeok(terminaltype)) {
602 if (terminaltypeok(terminaltype))
604 if ((strncmp(last, terminaltype, sizeof(last)) == 0) ||
607 * We've hit the end. If this is the same as
610 if (strncmp(first, terminaltype, sizeof(first)) == 0)
618 if (strncmp(first, terminaltype, sizeof(first)) != 0) {
633 * If the client turned off the option,
637 if (his_state_is_wont(TELOPT_TTYPE))
653 * tgetent() will return 1 if the type is known, and
654 * 0 if it is not known. If it returns -1, it couldn't
655 * open the database. But if we can't open the database,
659 if (tgetent(buf, s) == 0)
692 if (pty < 0)
701 if (error) {
716 #if defined(AUTHENTICATION) || defined(ENCRYPTION)
750 char *HE, *HN, *IF, *ptyibuf2ptr;
759 if (my_state_is_wont(TELOPT_SGA))
765 * To find out, we send out a "DO ECHO". If the remote system
774 if (his_state_is_wont(TELOPT_LINEMODE)) {
808 * startup code; if so, we'll be here before we get the
816 if (his_want_state_is_will(TELOPT_ECHO) &&
831 if (his_want_state_is_will(TELOPT_ECHO)) {
842 if (my_state_is_wont(TELOPT_ECHO))
850 #if defined(LINEMODE) && defined(KLUDGELINEMODE)
852 * Continuing line mode support. If client does not support
856 if (lmodetype < REAL_LINEMODE)
885 if (t >= 0) {
900 if (getent(defent, gettyname) == 1) {
906 IF = getstr("if", &cp);
907 if (HN && *HN)
909 if (IM == 0)
914 IF = NULL;
918 if (hostinfo) {
919 if (IF) {
923 if ((fd = fopen(IF, "r")) != NULL) {
929 if (*IM)
933 if (pcc)
954 if (ncc < 0 && pcc < 0)
958 * Never look for input if there's still
963 if (nfrontp - nbackp || pcc > 0)
967 if (pfrontp - pbackp || ncc > 0)
971 if (!SYNCHing)
974 if ((c = poll(set, 2, INFTIM)) < 1) {
975 if (c == -1) {
976 if (errno == EINTR) {
987 if (set[0].revents & POLLPRI) {
994 if (set[0].revents & POLLIN) {
996 if (ncc < 0 && errno == EWOULDBLOCK)
999 if (ncc <= 0) {
1012 if (set[1].revents & POLLIN) {
1015 * On some systems, if we try to read something
1019 if (pcc < 0 && (errno == EWOULDBLOCK ||
1024 if (pcc <= 0)
1028 * If ioctl from pty, pass it through net
1030 if (ptyibuf[0] & TIOCPKT_IOCTL) {
1036 if (ptyibuf[0] & TIOCPKT_FLUSHWRITE) {
1041 * royally if we send them urgent
1049 if (his_state_is_will(TELOPT_LFLOW) &&
1054 if (newflow != flowmode) {
1073 if ((&netobuf[BUFSIZ] - nfrontp) < 2)
1076 if (c == IAC)
1079 if ((c == '\r') && (my_state_is_wont(TELOPT_BINARY))) {
1080 if (pcc > 0 && ((*ptyip & 0377) == '\n')) {
1088 if ((set[0].revents & POLLOUT) && (nfrontp - nbackp) > 0)
1090 if (ncc > 0)
1092 if ((set[1].revents & POLLOUT) && (pfrontp - pbackp) > 0)
1100 * If it is in raw mode, just write NULL;
1113 * If it is in raw mode, just write NULL;
1131 * When we get an AYT, if ^T is enabled, use that. Otherwise,
1137 if (slctab[SLC_AYT].sptr && *slctab[SLC_AYT].sptr != _POSIX_VDISABLE) {
1149 #if defined(LINEMODE) && (VEOF == VMIN)
1150 if (!tty_isediting()) {