]> The Tcpdump Group git mirrors - tcpdump/blobdiff - util-print.c
Update version to 4.99.2-PRE-GIT
[tcpdump] / util-print.c
index 3d3caa5aa79ed0f47fd68f08d40594d051fe342f..6f8f61d1433b8ec7dc21105561ffcf0d0c9f0b5f 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
@@ -198,36 +171,6 @@ nd_printn(netdissect_options *ndo,
        return (n == 0) ? 0 : 1;
 }
 
-/*
- * Print out a null-padded 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 after n bytes or before the null char,
- * whichever is first.
- */
-int
-nd_printzp(netdissect_options *ndo,
-           const u_char *s, u_int n,
-           const u_char *ep)
-{
-       int ret;
-       u_char c;
-
-       ret = 1;                        /* assume truncated */
-       while (n > 0 && (ep == NULL || s < ep)) {
-               n--;
-               c = GET_U_1(s);
-               s++;
-               if (c == '\0') {
-                       ret = 0;
-                       break;
-               }
-               fn_print_char(ndo, c);
-       }
-       return (n == 0) ? 0 : ret;
-}
-
 /*
  * Print a null-padded filename (or other ASCII string), part of
  * the packet buffer, filtering out non-printable characters.