cf83988e96
Future debugging will want to identify a specific passt interface. We make a distinction in these helpers between the name of the *type* of pif, and name of the pif itself. For the time being these are always the same thing, since we have at most instance of each type of pif. However, that might change in future. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
21 lines
485 B
C
21 lines
485 B
C
/* 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");
|