diff --git a/Makefile b/Makefile index 0324fdd..55972b1 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ MANPAGES = passt.1 pasta.1 qrap.1 PASST_HEADERS = arch.h arp.h checksum.h conf.h dhcp.h dhcpv6.h icmp.h \ inany.h isolation.h lineread.h log.h ndp.h netlink.h packet.h passt.h \ - pasta.h pcap.h port_fwd.h siphash.h tap.h tcp.h tcp_conn.h \ + pasta.h pcap.h pif.h port_fwd.h siphash.h tap.h tcp.h tcp_conn.h \ tcp_splice.h udp.h util.h HEADERS = $(PASST_HEADERS) seccomp.h diff --git a/pif.h b/pif.h new file mode 100644 index 0000000..a705f2c --- /dev/null +++ b/pif.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright Red Hat + * Author: David Gibson + * + * Passt/pasta interface types and IDs + */ +#ifndef PIF_H +#define PIF_H + +/** + * enum pif_type - Type of passt/pasta interface ("pif") + * + * pifs can be an L4 level channel (sockets) or an L2 level channel (tap device + * or qemu socket). + */ +enum pif_type { + /* Invalid or not present pif */ + PIF_NONE = 0, + /* Host socket interface */ + PIF_HOST, + /* Qemu socket or namespace tuntap interface */ + PIF_TAP, + /* Namespace socket interface for splicing */ + PIF_SPLICE, +}; + +#endif /* PIF_H */