* are preserved in all copies.
*/
-#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
-#include "interface.h"
+#include "netdissect.h"
#define TELCMDS
#define TELOPTS
osp = sp;
- if (ndo->ndo_qflag) {
- ND_PRINT((ndo, "[telnet]"));
- return;
- }
-
while (length > 0 && *sp == IAC) {
+ /*
+ * Parse the Telnet command without printing it,
+ * to determine its length.
+ */
l = telnet_parse(ndo, sp, length, 0);
if (l < 0)
break;