aboutgitcodebugslistschat
path: root/icmp.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-01-16 16:16:15 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-01-22 23:36:51 +0100
commita325121759ad5a78bd79749f0a520d2ebfb72120 (patch)
treef52547a183171cfa3d570170f880fb62652b321a /icmp.h
parent70d43f9c0523a380a8451808b344c34685296725 (diff)
downloadpasst-a325121759ad5a78bd79749f0a520d2ebfb72120.tar
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.tar.gz
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.tar.bz2
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.tar.lz
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.tar.xz
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.tar.zst
passt-a325121759ad5a78bd79749f0a520d2ebfb72120.zip
icmp: Consolidate icmp_sock_handler() with icmpv6_sock_handler()
Currently we have separate handlers for ICMP and ICMPv6 ping replies. Although there are a number of points of difference, with some creative refactoring we can combine these together sensibly. Although it doesn't save a vast amount of code, it does make it clearer that we're performing basically the same steps for each case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'icmp.h')
-rw-r--r--icmp.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/icmp.h b/icmp.h
index 4096c65..0083597 100644
--- a/icmp.h
+++ b/icmp.h
@@ -10,8 +10,7 @@
struct ctx;
-void icmp_sock_handler(const struct ctx *c, union epoll_ref ref);
-void icmpv6_sock_handler(const struct ctx *c, union epoll_ref ref);
+void icmp_sock_handler(const struct ctx *c, int af, union epoll_ref ref);
int icmp_tap_handler(const struct ctx *c, uint8_t pif, int af,
const void *saddr, const void *daddr,
const struct pool *p, const struct timespec *now);