passt: Add support for multiple instances in different network namespaces

...sharing the same filesystem. Instead of a fixed path for the UNIX
domain socket, passt now uses a path with a counter, probing for
existing instances, and picking the first free one.

The demo script is updated accordingly -- it can now be started several
times to create multiple namespaces with an instance of passt each,
with addressing reflecting separate subnets, and NDP proxying between
them.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio
2021-05-21 11:14:51 +02:00
parent 8ce188ecb0
commit 19d254bbbb
6 changed files with 114 additions and 44 deletions

2
pcap.h
View File

@@ -1,2 +1,2 @@
void pcap(char *pkt, size_t len);
void pcap_init(void);
void pcap_init(int sock_index);