2012-02-10 23:09:00 +02:00
|
|
|
/*
|
2013-10-05 13:41:44 -06:00
|
|
|
* Copyright (C) 2013 Red Hat, Inc.
|
2012-02-10 23:09:00 +02:00
|
|
|
* Copyright (C) 2012 Nicira, Inc.
|
2017-02-07 16:16:43 +01:00
|
|
|
* Copyright (C) 2017 IBM Corporation
|
2012-02-10 23:09:00 +02: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 16:30:55 -06:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 18:06:23 +08:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2012-02-10 23:09:00 +02:00
|
|
|
*/
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#ifndef LIBVIRT_VIRNETDEVOPENVSWITCH_H
|
|
|
|
# define LIBVIRT_VIRNETDEVOPENVSWITCH_H
|
2012-02-10 23:09:00 +02:00
|
|
|
|
|
|
|
# include "internal.h"
|
|
|
|
# include "virnetdevvportprofile.h"
|
2012-08-17 00:04:54 -04:00
|
|
|
# include "virnetdevvlan.h"
|
2012-02-10 23:09:00 +02:00
|
|
|
|
2017-02-07 16:16:42 +01:00
|
|
|
# define VIR_NETDEV_OVS_DEFAULT_TIMEOUT 5
|
2012-02-10 23:09:00 +02:00
|
|
|
|
2017-02-07 16:16:43 +01:00
|
|
|
void virNetDevOpenvswitchSetTimeout(unsigned int timeout);
|
|
|
|
|
2012-02-10 23:09:00 +02:00
|
|
|
int virNetDevOpenvswitchAddPort(const char *brname,
|
|
|
|
const char *ifname,
|
2013-10-05 13:41:44 -06:00
|
|
|
const virMacAddr *macaddr,
|
2012-03-06 23:15:36 -08:00
|
|
|
const unsigned char *vmuuid,
|
2012-08-17 00:04:54 -04:00
|
|
|
virNetDevVPortProfilePtr ovsport,
|
|
|
|
virNetDevVlanPtr virtVlan)
|
2012-02-10 23:09:00 +02:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
|
|
|
ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
|
|
|
int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname)
|
|
|
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2018-07-01 19:24:19 -04:00
|
|
|
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2012-10-01 11:18:21 -04:00
|
|
|
int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
|
|
|
int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname)
|
2017-03-21 14:40:13 -04:00
|
|
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
2012-10-01 11:18:21 -04:00
|
|
|
|
2016-11-18 23:51:13 +01:00
|
|
|
int virNetDevOpenvswitchInterfaceStats(const char *ifname,
|
|
|
|
virDomainInterfaceStatsPtr stats)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2018-07-01 19:24:19 -04:00
|
|
|
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2016-12-22 10:33:28 +01:00
|
|
|
int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
|
|
|
|
char **ifname)
|
2017-07-12 11:07:17 +01:00
|
|
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
|
2016-12-22 10:33:28 +01:00
|
|
|
|
2017-07-17 17:49:00 +02:00
|
|
|
int virNetDevOpenvswitchUpdateVlan(const char *ifname,
|
|
|
|
virNetDevVlanPtr virtVlan)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2018-12-13 14:53:50 +00:00
|
|
|
#endif /* LIBVIRT_VIRNETDEVOPENVSWITCH_H */
|