2012-02-10 21:09:00 +00:00
|
|
|
/*
|
2013-10-05 19:41:44 +00:00
|
|
|
* Copyright (C) 2013 Red Hat, Inc.
|
2012-02-10 21:09:00 +00:00
|
|
|
* Copyright (C) 2012 Nicira, Inc.
|
2017-02-07 15:16:43 +00:00
|
|
|
* Copyright (C) 2017 IBM Corporation
|
2012-02-10 21:09:00 +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-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2012-02-10 21:09:00 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:48 +00:00
|
|
|
#pragma once
|
2012-02-10 21:09:00 +00:00
|
|
|
|
2019-06-18 16:12:48 +00:00
|
|
|
#include "internal.h"
|
|
|
|
#include "virnetdevvportprofile.h"
|
|
|
|
#include "virnetdevvlan.h"
|
2012-02-10 21:09:00 +00:00
|
|
|
|
2019-06-18 16:12:48 +00:00
|
|
|
#define VIR_NETDEV_OVS_DEFAULT_TIMEOUT 5
|
2012-02-10 21:09:00 +00:00
|
|
|
|
2017-02-07 15:16:43 +00:00
|
|
|
void virNetDevOpenvswitchSetTimeout(unsigned int timeout);
|
|
|
|
|
2012-02-10 21:09:00 +00:00
|
|
|
int virNetDevOpenvswitchAddPort(const char *brname,
|
|
|
|
const char *ifname,
|
2013-10-05 19:41:44 +00:00
|
|
|
const virMacAddr *macaddr,
|
2012-03-07 07:15:36 +00:00
|
|
|
const unsigned char *vmuuid,
|
2019-10-01 17:56:35 +00:00
|
|
|
const virNetDevVPortProfile *ovsport,
|
2019-10-01 16:25:47 +00:00
|
|
|
const virNetDevVlan *virtVlan)
|
2012-02-10 21:09:00 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
2019-10-14 12:25:14 +00:00
|
|
|
G_GNUC_WARN_UNUSED_RESULT;
|
2012-02-10 21:09:00 +00:00
|
|
|
|
|
|
|
int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2012-02-10 21:09:00 +00:00
|
|
|
|
2018-07-01 23:24:19 +00:00
|
|
|
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2018-07-01 23:24:19 +00:00
|
|
|
|
2012-10-01 15:18:21 +00:00
|
|
|
int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2012-10-01 15:18:21 +00:00
|
|
|
|
|
|
|
int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
|
2012-10-01 15:18:21 +00:00
|
|
|
|
2019-07-16 07:33:38 +00:00
|
|
|
int virNetDevOpenvswitchInterfaceParseStats(const char *json,
|
|
|
|
virDomainInterfaceStatsPtr stats)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|
2019-07-16 07:33:38 +00:00
|
|
|
|
2016-11-18 22:51:13 +00:00
|
|
|
int virNetDevOpenvswitchInterfaceStats(const char *ifname,
|
|
|
|
virDomainInterfaceStatsPtr stats)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|
2016-11-18 22:51:13 +00:00
|
|
|
|
2018-07-01 23:24:19 +00:00
|
|
|
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|
2018-07-01 23:24:19 +00:00
|
|
|
|
2016-12-22 09:33:28 +00:00
|
|
|
int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
|
2019-11-06 10:59:22 +00:00
|
|
|
bool server,
|
2016-12-22 09:33:28 +00:00
|
|
|
char **ifname)
|
2019-10-15 11:24:34 +00:00
|
|
|
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
|
2016-12-22 09:33:28 +00:00
|
|
|
|
2017-07-17 15:49:00 +00:00
|
|
|
int virNetDevOpenvswitchUpdateVlan(const char *ifname,
|
2019-10-01 16:25:47 +00:00
|
|
|
const virNetDevVlan *virtVlan)
|
2019-10-14 12:25:14 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
|