summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2022-04-02 13:21:29 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2022-04-02 13:21:29 +0200
commit7c9e185b02047e831cca7713d34040c4effe3a67 (patch)
tree87774cdad21a71303b420affe9a2dbbd30323a6f
parentc34c17ef84a942496ac74357711f531cb844570e (diff)
downloadtcpdump-7c9e185b02047e831cca7713d34040c4effe3a67.tar.gz
Add some const qualifiers
-rw-r--r--netdissect.c6
-rw-r--r--netdissect.h8
2 files changed, 6 insertions, 8 deletions
diff --git a/netdissect.c b/netdissect.c
index 61aa2c2b..000d1ffc 100644
--- a/netdissect.c
+++ b/netdissect.c
@@ -149,7 +149,7 @@ nd_smi_version_string(void)
int
nd_push_buffer(netdissect_options *ndo, u_char *new_buffer,
- const u_char *new_packetp, u_int newlen)
+ const u_char *new_packetp, const u_int newlen)
{
struct netdissect_saved_packet_info *ndspi;
@@ -182,7 +182,7 @@ nd_push_buffer(netdissect_options *ndo, u_char *new_buffer,
* set the snapshot end to that new value.
*/
int
-nd_push_snaplen(netdissect_options *ndo, const u_char *bp, u_int newlen)
+nd_push_snaplen(netdissect_options *ndo, const u_char *bp, const u_int newlen)
{
struct netdissect_saved_packet_info *ndspi;
u_int snaplen_remaining;
@@ -242,7 +242,7 @@ nd_push_snaplen(netdissect_options *ndo, const u_char *bp, u_int newlen)
* atop which the current one was pushed, however.
*/
void
-nd_change_snaplen(netdissect_options *ndo, const u_char *bp, u_int newlen)
+nd_change_snaplen(netdissect_options *ndo, const u_char *bp, const u_int newlen)
{
struct netdissect_saved_packet_info *ndspi;
const u_char *previous_snapend;
diff --git a/netdissect.h b/netdissect.h
index 909b7c87..7800574e 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -262,11 +262,9 @@ struct netdissect_options {
PRINTFLIKE_FUNCPTR(2, 3);
};
-extern WARN_UNUSED_RESULT int nd_push_buffer(netdissect_options *, u_char *,
- const u_char *, u_int);
-extern WARN_UNUSED_RESULT int nd_push_snaplen(netdissect_options *,
- const u_char *, u_int);
-extern void nd_change_snaplen(netdissect_options *, const u_char *, u_int);
+extern WARN_UNUSED_RESULT int nd_push_buffer(netdissect_options *, u_char *, const u_char *, const u_int);
+extern WARN_UNUSED_RESULT int nd_push_snaplen(netdissect_options *, const u_char *, const u_int);
+extern void nd_change_snaplen(netdissect_options *, const u_char *, const u_int);
extern void nd_pop_packet_info(netdissect_options *);
extern void nd_pop_all_packet_info(netdissect_options *);