passt: Introduce ICMP echo proxy

It's nice to be able to confirm connectivity using ICMP or ICMPv6
echo requests, and "ping" sockets on Linux (IPPROTO_ICMP datagram)
allow us to do that without any special capability.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio
2021-03-17 10:57:44 +01:00
parent d32edee60a
commit 1d807fc720
7 changed files with 183 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
#define UNIX_SOCK_PATH "/tmp/passt.socket"
#include "icmp.h"
#include "tcp.h"
/**
@@ -39,5 +40,6 @@ struct ctx {
char ifn[IF_NAMESIZE];
struct icmp_ctx icmp;
struct tcp_ctx tcp;
};