aboutgitcodebugslistschat
path: root/passt.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-11 12:01:31 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-14 13:15:12 +0200
commit675174d4ba255383b213437e29b617d8f55dbc69 (patch)
tree7add0cf70e595028f9ca9485eb8e139d3d652bb6 /passt.h
parentdcd3605d14aba011fa6c2f4596cb7494f64d2b93 (diff)
downloadpasst-675174d4ba255383b213437e29b617d8f55dbc69.tar
passt-675174d4ba255383b213437e29b617d8f55dbc69.tar.gz
passt-675174d4ba255383b213437e29b617d8f55dbc69.tar.bz2
passt-675174d4ba255383b213437e29b617d8f55dbc69.tar.lz
passt-675174d4ba255383b213437e29b617d8f55dbc69.tar.xz
passt-675174d4ba255383b213437e29b617d8f55dbc69.tar.zst
passt-675174d4ba255383b213437e29b617d8f55dbc69.zip
conf, tap: Split netlink and pasta functions, allow interface configuration
Move netlink routines to their own file, and use netlink to configure or fetch all the information we need, except for the TUNSETIFF ioctl. Move pasta-specific functions to their own file as well, add parameters and calls to configure the tap interface in the namespace. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.h')
-rw-r--r--passt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/passt.h b/passt.h
index 4cce092..50e33a3 100644
--- a/passt.h
+++ b/passt.h
@@ -113,8 +113,10 @@ enum passt_modes {
* @addr6_ll_seen: Latest IPv6 link-local address seen as source from tap
* @gw6: Default IPv6 gateway
* @dns4: IPv4 DNS addresses, zero-terminated
- * @ifn: Name of routable interface
+ * @ifi: Index of routable interface
* @pasta_ifn: Name of namespace interface for pasta
+ * @pasta_ifn: Index of namespace interface for pasta
+ * @pasta_conf_ns: Configure namespace interface after creating it
* @no_tcp: Disable TCP operation
* @tcp: Context for TCP protocol handler
* @no_tcp: Disable UDP operation
@@ -167,8 +169,10 @@ struct ctx {
struct in6_addr gw6;
struct in6_addr dns6[MAXNS + 1];
- char ifn[IF_NAMESIZE];
+ unsigned int ifi;
char pasta_ifn[IF_NAMESIZE];
+ unsigned int pasta_ifi;
+ int pasta_conf_ns;
int no_tcp;
struct tcp_ctx tcp;