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 int nd_printzp(netdissect_options *, const u_char *, u_int, const u_char *);
extern void nd_printjnp(netdissect_options *, const u_char *, u_int);
/*
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.