aboutgitcodebugslistschat
path: root/tap.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-09-29 15:50:19 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-10-04 23:23:35 +0200
commit6471c7d01b0aad9d144448290557fcd783562228 (patch)
tree07c664f50790f205080f64d02a2b860f3642e8f7 /tap.h
parentfc8f0f8c48ef12edbf60f74f37024917f5812385 (diff)
downloadpasst-6471c7d01b0aad9d144448290557fcd783562228.tar
passt-6471c7d01b0aad9d144448290557fcd783562228.tar.gz
passt-6471c7d01b0aad9d144448290557fcd783562228.tar.bz2
passt-6471c7d01b0aad9d144448290557fcd783562228.tar.lz
passt-6471c7d01b0aad9d144448290557fcd783562228.tar.xz
passt-6471c7d01b0aad9d144448290557fcd783562228.tar.zst
passt-6471c7d01b0aad9d144448290557fcd783562228.zip
cppcheck: Make many pointers const
Newer versions of cppcheck (as of 2.12.0, at least) added a warning for pointers which could be declared to point at const data, but aren't. Based on that, make many pointers throughout the codebase const. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tap.h')
-rw-r--r--tap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tap.h b/tap.h
index 021fb7c..68509d1 100644
--- a/tap.h
+++ b/tap.h
@@ -62,7 +62,7 @@ void tap_udp4_send(const struct ctx *c, struct in_addr src, in_port_t sport,
struct in_addr dst, in_port_t dport,
const void *in, size_t len);
void tap_icmp4_send(const struct ctx *c, struct in_addr src, struct in_addr dst,
- void *in, size_t len);
+ const void *in, size_t len);
const struct in6_addr *tap_ip6_daddr(const struct ctx *c,
const struct in6_addr *src);
void tap_udp6_send(const struct ctx *c,
@@ -71,9 +71,9 @@ void tap_udp6_send(const struct ctx *c,
uint32_t flow, const void *in, size_t len);
void tap_icmp6_send(const struct ctx *c,
const struct in6_addr *src, const struct in6_addr *dst,
- void *in, size_t len);
+ const void *in, size_t len);
int tap_send(const struct ctx *c, const void *data, size_t len);
-void tap_send_frames(struct ctx *c, const struct iovec *iov, size_t n);
+void tap_send_frames(const struct ctx *c, const struct iovec *iov, size_t n);
void tap_update_mac(struct tap_hdr *taph,
const unsigned char *eth_d, const unsigned char *eth_s);
void tap_listen_handler(struct ctx *c, uint32_t events);