aboutgitcodebugslistschat
path: root/pif.c
diff options
context:
space:
mode:
Diffstat (limited to 'pif.c')
-rw-r--r--pif.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/pif.c b/pif.c
new file mode 100644
index 0000000..ebf01cc
--- /dev/null
+++ b/pif.c
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright Red Hat
+ * Author: David Gibson <david@gibson.dropbear.id.au>
+ *
+ * Passt/pasta interface types and IDs
+ */
+
+#include <stdint.h>
+#include <assert.h>
+
+#include "util.h"
+#include "pif.h"
+
+const char *pif_type_str[] = {
+ [PIF_NONE] = "<none>",
+ [PIF_HOST] = "HOST",
+ [PIF_TAP] = "TAP",
+ [PIF_SPLICE] = "SPLICE",
+};
+static_assert(ARRAY_SIZE(pif_type_str) == PIF_NUM_TYPES,
+ "pif_type_str[] doesn't match enum pif_type");