2008-11-21 12:27:11 +00:00
|
|
|
/*
|
2014-03-07 13:38:51 +00:00
|
|
|
* node_device_driver.h: node device enumeration
|
2008-11-21 12:27:11 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Virtual Iron Software, Inc.
|
|
|
|
* Copyright (C) 2008 David F. Lively
|
|
|
|
*
|
|
|
|
* 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/>.
|
2008-11-21 12:27:11 +00:00
|
|
|
*
|
|
|
|
* Author: David F. Lively <dlively@virtualiron.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_NODE_DEVICE_H__
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __VIR_NODE_DEVICE_H__
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "driver.h"
|
|
|
|
# include "node_device_conf.h"
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define LINUX_NEW_DEVICE_WAIT_TIME 60
|
2009-06-02 15:12:53 +00:00
|
|
|
|
2012-09-20 14:38:35 +00:00
|
|
|
# ifdef WITH_HAL
|
2008-11-21 12:27:11 +00:00
|
|
|
int halNodeRegister(void);
|
2010-03-09 18:22:22 +00:00
|
|
|
# endif
|
2012-09-20 14:24:47 +00:00
|
|
|
# ifdef WITH_UDEV
|
2009-11-12 21:48:24 +00:00
|
|
|
int udevNodeRegister(void);
|
2010-03-09 18:22:22 +00:00
|
|
|
# endif
|
2008-11-21 12:27:11 +00:00
|
|
|
|
2014-11-17 16:30:27 +00:00
|
|
|
void nodeDeviceLock(void);
|
|
|
|
void nodeDeviceUnlock(void);
|
|
|
|
|
|
|
|
extern virNodeDeviceDriverStatePtr driver;
|
2008-12-04 21:48:31 +00:00
|
|
|
|
2008-11-21 12:27:11 +00:00
|
|
|
int nodedevRegister(void);
|
|
|
|
|
2011-06-04 21:24:54 +00:00
|
|
|
int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags);
|
|
|
|
int nodeListDevices(virConnectPtr conn, const char *cap, char **const names,
|
|
|
|
int maxnames, unsigned int flags);
|
2013-04-29 09:20:17 +00:00
|
|
|
int nodeConnectListAllNodeDevices(virConnectPtr conn,
|
|
|
|
virNodeDevicePtr **devices,
|
|
|
|
unsigned int flags);
|
2011-06-04 21:24:54 +00:00
|
|
|
virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name);
|
2013-02-04 13:03:11 +00:00
|
|
|
virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn,
|
|
|
|
const char *wwnn,
|
|
|
|
const char *wwpn,
|
|
|
|
unsigned int flags);
|
2011-06-04 21:24:54 +00:00
|
|
|
char *nodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags);
|
|
|
|
char *nodeDeviceGetParent(virNodeDevicePtr dev);
|
|
|
|
int nodeDeviceNumOfCaps(virNodeDevicePtr dev);
|
|
|
|
int nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames);
|
|
|
|
virNodeDevicePtr nodeDeviceCreateXML(virConnectPtr conn,
|
|
|
|
const char *xmlDesc, unsigned int flags);
|
|
|
|
int nodeDeviceDestroy(virNodeDevicePtr dev);
|
|
|
|
|
2008-11-21 12:27:11 +00:00
|
|
|
#endif /* __VIR_NODE_DEVICE_H__ */
|