diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-10-11 12:01:31 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-10-14 13:15:12 +0200 |
commit | 675174d4ba255383b213437e29b617d8f55dbc69 (patch) | |
tree | 7add0cf70e595028f9ca9485eb8e139d3d652bb6 /netlink.h | |
parent | dcd3605d14aba011fa6c2f4596cb7494f64d2b93 (diff) | |
download | passt-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 'netlink.h')
-rw-r--r-- | netlink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/netlink.h b/netlink.h new file mode 100644 index 0000000..654e17e --- /dev/null +++ b/netlink.h @@ -0,0 +1,6 @@ +int nl_sock_init(struct ctx *c); +unsigned int nl_get_ext_if(int *v4, int *v6); +void nl_route(int ns, unsigned int ifi, sa_family_t af, void *gw); +void nl_addr(int ns, unsigned int ifi, sa_family_t af, + void *addr, int prefix_len, void *addr_l); +void nl_link(int ns, unsigned int ifi, void *mac, int up); |