This function print a null-terminated string, filtering out non-printable
characters.
DON'T USE IT with a pointer on the packet buffer because there is no
truncation check. For this use, see the nd_printX() functions.
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 *ndo, const u_char *, u_int, const u_char *);
extern int nd_printn(netdissect_options *, const u_char *, u_int, const u_char *);
ND_PRINT("%c", c);
}
+/*
+ * Print a null-terminated string, filtering out non-printable characters.
+ * DON'T USE IT with a pointer on the packet buffer because there is no
+ * truncation check. For this use, see the nd_printX() functions below.
+ */
+void
+fn_print_str(netdissect_options *ndo, const u_char *s)
+{
+ while (*s != '\0') {
+ fn_print_char(ndo, *s);
+ s++;
+ }
+}
+
/*
* Print out a null-terminated filename (or other ASCII string), part of
* the packet buffer.