aboutgitcodebugslistschat
path: root/passt.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-05-21 11:14:51 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-05-21 11:14:51 +0200
commit19d254bbbb3ab319d15891ff7287f5182980c105 (patch)
tree160fbdecfe6b6e255e05236590325260be51cfd4 /passt.h
parent8ce188ecb0a0d19874f8c0e663d5d8adffa50d43 (diff)
downloadpasst-19d254bbbb3ab319d15891ff7287f5182980c105.tar
passt-19d254bbbb3ab319d15891ff7287f5182980c105.tar.gz
passt-19d254bbbb3ab319d15891ff7287f5182980c105.tar.bz2
passt-19d254bbbb3ab319d15891ff7287f5182980c105.tar.lz
passt-19d254bbbb3ab319d15891ff7287f5182980c105.tar.xz
passt-19d254bbbb3ab319d15891ff7287f5182980c105.tar.zst
passt-19d254bbbb3ab319d15891ff7287f5182980c105.zip
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>
Diffstat (limited to 'passt.h')
-rw-r--r--passt.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/passt.h b/passt.h
index bfbdc06..28840fc 100644
--- a/passt.h
+++ b/passt.h
@@ -1,4 +1,5 @@
-#define UNIX_SOCK_PATH "/tmp/passt.socket"
+#define UNIX_SOCK_MAX 100
+#define UNIX_SOCK_PATH "/tmp/passt_%i.socket"
/**
* struct tap_msg - Generic message descriptor for arrays of messages
@@ -26,6 +27,8 @@ struct fqdn {
char n[NS_MAXDNAME];
};
+#include <net/if.h>
+
/**
* struct ctx - Execution context
* @epollfd: file descriptor for epoll instance