From e6d43cfb1f937898dc031c7b38a23e5ccad8bd9a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 20 Jul 2011 12:20:18 +0200 Subject: slirp: Forward ICMP echo requests via unprivileged sockets Linux 3.0 gained support for unprivileged ICMP ping sockets. Use this feature to forward guest pings to the outer world. The host admin has to set the ping_group_range in order to grant access to those sockets. To allow ping for the users group (GID 100): echo 100 100 > /proc/sys/net/ipv4/ping_group_range Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- slirp/ip_icmp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'slirp/ip_icmp.h') diff --git a/slirp/ip_icmp.h b/slirp/ip_icmp.h index 2692822f87..b3da1f2697 100644 --- a/slirp/ip_icmp.h +++ b/slirp/ip_icmp.h @@ -153,9 +153,12 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) +void icmp_init(Slirp *slirp); void icmp_input(struct mbuf *, int); void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, const char *message); void icmp_reflect(struct mbuf *); +void icmp_receive(struct socket *so); +void icmp_detach(struct socket *so); #endif -- cgit v1.2.1