summaryrefslogtreecommitdiff
path: root/netdissect.h
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-11-01 12:43:37 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-11-01 12:50:29 +0100
commit635e3cc92b72ca048a6b5b89b883980e4e1b4bdc (patch)
tree75769999820f0ad8c833ad24e203ac0ba8e60142 /netdissect.h
parent7bd4c9482dbd07ce2edfe20dcf652cc09866dc22 (diff)
downloadtcpdump-635e3cc92b72ca048a6b5b89b883980e4e1b4bdc.tar.gz
Add a nd_printjnp() function
It prints a null-padded filename (or other ASCII string), part of the packet buffer, filtering out non-printable characters. Stop if truncated (via GET_U_1/longjmp) or after n bytes or before the null char, whichever occurs first. The suffix comes from: j:longJmp, n:after N bytes, p:null-Padded.
Diffstat (limited to 'netdissect.h')
-rw-r--r--netdissect.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/netdissect.h b/netdissect.h
index afa5283d..854fb8a5 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -395,6 +395,7 @@ 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);
/*
* Flags for txtproto_print().