]> The Tcpdump Group git mirrors - tcpdump/blobdiff - util.c
ndo-ize print-ascii: hex_print_with_offset()
[tcpdump] / util.c
diff --git a/util.c b/util.c
index d5fe17df4b6aab5f38c52186b3bda5e281d200c7..4d25d6f0c4a99ca174e61f6ba264ac2cc648be72 100644 (file)
--- a/util.c
+++ b/util.c
@@ -259,21 +259,21 @@ relts_print(int secs)
  */
 
 int
-print_unknown_data(const u_char *cp,const char *ident,int len)
+print_unknown_data(netdissect_options *ndo, const u_char *cp,const char *ident,int len)
 {
        if (len < 0) {
-               printf("%sDissector error: print_unknown_data called with negative length",
-                   ident);
+          ND_PRINT((ndo,"%sDissector error: print_unknown_data called with negative length",
+                   ident));
                return(0);
        }
        if (snapend - cp < len)
                len = snapend - cp;
        if (len < 0) {
-               printf("%sDissector error: print_unknown_data called with pointer past end of packet",
-                   ident);
+          ND_PRINT((ndo,"%sDissector error: print_unknown_data called with pointer past end of packet",
+                   ident));
                return(0);
        }
-        hex_print(ident,cp,len);
+        hex_print(ndo, ident,cp,len);
        return(1); /* everything is ok */
 }