提交 315baab9 编写于 作者: S Stefan Berger 提交者: Daniel Veillard

macvtap support for libvirt -- helper code

This part adds the helper code to setup and tear down macvtap devices
using direct communication with the device driver via netlink sockets.
The rather short messages received from the netlink layer are now
written into a dynamically allocated buffer

* src/util/macvtap.h src/util/macvtap.c: provides the new module
* po/POTFILES.in: the module contains translated strings
上级 78d1ee29
......@@ -60,6 +60,7 @@ src/util/conf.c
src/util/hostusb.c
src/util/json.c
src/util/logging.c
src/util/macvtap.c
src/util/pci.c
src/util/processinfo.c
src/util/stats_linux.c
......
此差异已折叠。
/*
* Copyright (C) 2010 IBM Corporation
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Stefan Berger <stefanb@us.ibm.com>
*/
#ifndef __UTIL_MACVTAP_H__
#define __UTIL_MACVTAP_H__
#include <config.h>
#if defined(WITH_MACVTAP)
#include "internal.h"
int openMacvtapTap(virConnectPtr conn,
const char *ifname,
const unsigned char *macaddress,
const char *linkdev,
int mode,
char **res_ifname);
int delMacvtapByMACAddress(const unsigned char *macaddress,
int *hasBusyDev);
#endif /* WITH_MACVTAP */
#define MACVTAP_MODE_PRIVATE_STR "private"
#define MACVTAP_MODE_VEPA_STR "vepa"
#define MACVTAP_MODE_BRIDGE_STR "bridge"
#endif /* __UTIL_MACVTAP_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册