Debian Codegraph @

src/network/netdev/tuntap.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "shared-forward.h"
5 #include "netdev.h"
6
7 typedef struct TunTap {
8 NetDev meta;
9
10 char *user_name;
11 uid_t uid;
12 char *group_name;
13 gid_t gid;
14 bool multi_queue;
15 bool packet_info;
16 bool vnet_hdr;
17 bool keep_fd;
18 } TunTap;
19
20 DEFINE_NETDEV_CAST(TUN, TunTap);
21 DEFINE_NETDEV_CAST(TAP, TunTap);
22 extern const NetDevVTable tun_vtable;
23 extern const NetDevVTable tap_vtable;
24
25 int manager_add_tuntap_fd(Manager *m, int fd, const char *name);
26 void manager_clear_unmanaged_tuntap_fds(Manager *m);