mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-19 10:01:28 +00:00
There should be a way to show no intent in programming a VLAN at all (including clearing it). This allows handling error conditions differently when VLAN clearing is explicit (vlan id == 0) vs implicit (vlanid == NULL - try to clear it if possible). Signed-off-by: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
/*
|
|
* virnetdevpriv.h: private virnetdev header for unit testing
|
|
*
|
|
* Copyright (C) 2021 Canonical Ltd.
|
|
*
|
|
* 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
|
|
* License along with this library; If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef LIBVIRT_VIRNETDEVPRIV_H_ALLOW
|
|
# error "virnetdevpriv.h may only be included by virnetdev.c or test suites"
|
|
#endif /* LIBVIRT_VIRNETDEVPRIV_H_ALLOW */
|
|
|
|
#pragma once
|
|
|
|
#include "virnetdev.h"
|
|
|
|
int
|
|
virNetDevSendVfSetLinkRequest(const char *ifname,
|
|
int vfInfoType,
|
|
const void *payload,
|
|
const size_t payloadLen);
|
|
|
|
int
|
|
virNetDevSetVfVlan(const char *ifname,
|
|
int vf,
|
|
const int *vlanid);
|
|
|
|
int
|
|
virNetDevSetVfMac(const char *ifname,
|
|
int vf,
|
|
const virMacAddr *macaddr,
|
|
bool *allowRetry);
|
|
|
|
int
|
|
virNetDevSetVfConfig(const char *ifname,
|
|
int vf,
|
|
const virMacAddr *macaddr,
|
|
const int *vlanid,
|
|
bool *allowRetry);
|