]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove the no more used nd_print() function
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 9 Jan 2021 13:07:53 +0000 (14:07 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 9 Jan 2021 13:11:01 +0000 (14:11 +0100)
The function to use now is: nd_printjnp().
(Added by commit 635e3cc92b72ca048a6b5b89b883980e4e1b4bdc)

netdissect.h
util-print.c

index 44d4df0fcde7455606f765a989f19f8881afc572..96b6c0e74657e8b38d7c638f49c7209ae2b35738 100644 (file)
@@ -391,7 +391,6 @@ extern void unsigned_relts_print(netdissect_options *, uint32_t);
 
 extern void fn_print_char(netdissect_options *, u_char);
 extern void fn_print_str(netdissect_options *, const u_char *);
-extern int nd_print(netdissect_options *, const u_char *, const u_char *);
 extern u_int nd_printztn(netdissect_options *, const u_char *, u_int, const u_char *);
 extern int nd_printn(netdissect_options *, const u_char *, u_int, const u_char *);
 extern void nd_printjn(netdissect_options *, const u_char *, u_int);
index 5424c20e6a9e65cf6759a9b6a7695e908517a601..925cf8d6a34be0e0a9e1a2d1bac70c114fcf72bf 100644 (file)
@@ -94,33 +94,6 @@ fn_print_str(netdissect_options *ndo, const u_char *s)
        }
 }
 
-/*
- * Print out a null-terminated filename (or other ASCII string), part of
- * the packet buffer.
- * If ep is NULL, assume no truncation check is needed.
- * Return true if truncated.
- * Stop at ep (if given) or before the null char, whichever is first.
- */
-int
-nd_print(netdissect_options *ndo,
-         const u_char *s, const u_char *ep)
-{
-       int ret;
-       u_char c;
-
-       ret = 1;                        /* assume truncated */
-       while (ep == NULL || s < ep) {
-               c = GET_U_1(s);
-               s++;
-               if (c == '\0') {
-                       ret = 0;
-                       break;
-               }
-               fn_print_char(ndo, c);
-       }
-       return(ret);
-}
-
 /*
  * Print out a null-terminated filename (or other ASCII string) from
  * a fixed-length field in the packet buffer, or from what remains of