state.c (80224) | state.c (81965) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; 37#endif 38static const char rcsid[] = | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/contrib/telnet/telnetd/state.c 80224 2001-07-23 21:52:26Z kris $"; | 39 "$FreeBSD: head/contrib/telnet/telnetd/state.c 81965 2001-08-20 12:28:40Z markm $"; |
40#endif /* not lint */ 41 42#include <stdarg.h> 43#include "telnetd.h" 44#if defined(AUTHENTICATION) 45#include <libtelnet/auth.h> 46#endif 47#if defined(ENCRYPTION) --- 668 unchanged lines hidden (view full) --- 716 case TELOPT_LINEMODE: 717# ifdef KLUDGELINEMODE 718 /* 719 * If real linemode is supported, then client is 720 * asking to turn linemode off. 721 */ 722 if (lmodetype != REAL_LINEMODE) 723 break; | 40#endif /* not lint */ 41 42#include <stdarg.h> 43#include "telnetd.h" 44#if defined(AUTHENTICATION) 45#include <libtelnet/auth.h> 46#endif 47#if defined(ENCRYPTION) --- 668 unchanged lines hidden (view full) --- 716 case TELOPT_LINEMODE: 717# ifdef KLUDGELINEMODE 718 /* 719 * If real linemode is supported, then client is 720 * asking to turn linemode off. 721 */ 722 if (lmodetype != REAL_LINEMODE) 723 break; |
724 lmodetype = KLUDGE_LINEMODE; |
|
724# endif /* KLUDGELINEMODE */ 725 clientstat(TELOPT_LINEMODE, WONT, 0); 726 break; 727#endif /* LINEMODE */ 728 729 case TELOPT_TM: 730 /* 731 * If we get a WONT TM, and had sent a DO TM, --- 814 unchanged lines hidden (view full) --- 1546 * in response to our WONT/DONT, then the "state" will be 1547 * WILL/DO, and the "want_state" will be WONT/DONT. We 1548 * need to go by the latter. 1549 */ 1550 for (i = 0; i < (unsigned char)NTELOPTS; i++) { 1551 if (my_want_state_is_will(i)) { 1552 ADD(WILL); 1553 ADD_DATA(i); | 725# endif /* KLUDGELINEMODE */ 726 clientstat(TELOPT_LINEMODE, WONT, 0); 727 break; 728#endif /* LINEMODE */ 729 730 case TELOPT_TM: 731 /* 732 * If we get a WONT TM, and had sent a DO TM, --- 814 unchanged lines hidden (view full) --- 1547 * in response to our WONT/DONT, then the "state" will be 1548 * WILL/DO, and the "want_state" will be WONT/DONT. We 1549 * need to go by the latter. 1550 */ 1551 for (i = 0; i < (unsigned char)NTELOPTS; i++) { 1552 if (my_want_state_is_will(i)) { 1553 ADD(WILL); 1554 ADD_DATA(i); |
1555 if (i == IAC) 1556 ADD(IAC); |
|
1554 } 1555 if (his_want_state_is_will(i)) { 1556 ADD(DO); 1557 ADD_DATA(i); | 1557 } 1558 if (his_want_state_is_will(i)) { 1559 ADD(DO); 1560 ADD_DATA(i); |
1561 if (i == IAC) 1562 ADD(IAC); |
|
1558 } 1559 } 1560 1561 if (his_want_state_is_will(TELOPT_LFLOW)) { 1562 ADD(SB); 1563 ADD(TELOPT_LFLOW); 1564 if (flowmode) { 1565 ADD(LFLOW_ON); --- 95 unchanged lines hidden --- | 1563 } 1564 } 1565 1566 if (his_want_state_is_will(TELOPT_LFLOW)) { 1567 ADD(SB); 1568 ADD(TELOPT_LFLOW); 1569 if (flowmode) { 1570 ADD(LFLOW_ON); --- 95 unchanged lines hidden --- |