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
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRNETDEVVLAN_H
|
|
|
|
# define LIBVIRT_VIRNETDEVVLAN_H
|
2012-08-11 17:44:27 +00:00
|
|
|
|
2013-05-23 17:12:10 +00:00
|
|
|
# include <virutil.h>
|
|
|
|
|
2018-07-24 15:52:32 +00:00
|
|
|
# include "viralloc.h"
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
VIR_ENUM_DECL(virNativeVlanMode)
|
|
|
|
|
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
|
|
|
|
2018-07-24 15:52:32 +00:00
|
|
|
VIR_DEFINE_AUTOPTR_FUNC(virNetDevVlan, virNetDevVlanFree)
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRNETDEVVLAN_H */
|