]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-telnet.c
Add program_name field in the netdissect_options structure
[tcpdump] / print-telnet.c
index 6a2680b413c8140a76e7da4f017fb342194b8898..ae29b4749a21092f088f8844a2e34d3241884062 100644 (file)
@@ -45,7 +45,6 @@
  *      are preserved in all copies.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -54,7 +53,7 @@
 
 #include <stdio.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 #define TELCMDS
 #define TELOPTS
@@ -510,6 +509,10 @@ telnet_print(netdissect_options *ndo, const u_char *sp, u_int length)
        osp = sp;
 
        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;