2012-08-11 17:44:27 +00:00
|
|
|
/*
|
2013-10-05 19:41:44 +00:00
|
|
|
* Copyright (C) 2009-2013 Red Hat, Inc.
|
2012-08-11 17:44:27 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-08-11 17:44:27 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2018-12-13 13:32:06 +00:00
|
|
|
|
2019-06-18 16:12:48 +00:00
|
|
|
#pragma once
|
2012-08-11 17:44:27 +00:00
|
|
|
|
2019-06-18 16:12:48 +00:00
|
|
|
#include "virenum.h"
|
2018-07-24 15:52:32 +00:00
|
|
|
|
2013-05-23 17:12:10 +00:00
|
|
|
typedef enum {
|
|
|
|
VIR_NATIVE_VLAN_MODE_DEFAULT = 0,
|
|
|
|
VIR_NATIVE_VLAN_MODE_TAGGED,
|
|
|
|
VIR_NATIVE_VLAN_MODE_UNTAGGED,
|
|
|
|
|
|
|
|
VIR_NATIVE_VLAN_MODE_LAST
|
|
|
|
} virNativeVlanMode;
|
|
|
|
|
2019-01-20 16:04:56 +00:00
|
|
|
VIR_ENUM_DECL(virNativeVlanMode);
|
2013-05-23 17:12:10 +00:00
|
|
|
|
2012-08-11 17:44:27 +00:00
|
|
|
typedef struct _virNetDevVlan virNetDevVlan;
|
|
|
|
typedef virNetDevVlan *virNetDevVlanPtr;
|
|
|
|
struct _virNetDevVlan {
|
|
|
|
bool trunk; /* true if this is a trunk */
|
|
|
|
int nTags; /* number of tags in array */
|
|
|
|
unsigned int *tag; /* pointer to array of tags */
|
2013-05-23 17:12:10 +00:00
|
|
|
int nativeMode; /* enum virNativeVlanMode */
|
|
|
|
unsigned int nativeTag;
|
2012-08-11 17:44:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void virNetDevVlanClear(virNetDevVlanPtr vlan);
|
|
|
|
void virNetDevVlanFree(virNetDevVlanPtr vlan);
|
2013-10-05 19:41:44 +00:00
|
|
|
int virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b);
|
|
|
|
int virNetDevVlanCopy(virNetDevVlanPtr dst, const virNetDevVlan *src);
|
2012-08-11 17:44:27 +00:00
|
|
|
|
2019-10-15 12:47:50 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevVlan, virNetDevVlanFree);
|