Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/utilities/hv_util.h
Show All 25 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _HVUTIL_H_ | #ifndef _HVUTIL_H_ | ||||
#define _HVUTIL_H_ | #define _HVUTIL_H_ | ||||
#include <dev/hyperv/include/hyperv.h> | |||||
#include <dev/hyperv/include/vmbus.h> | #include <dev/hyperv/include/vmbus.h> | ||||
/** | /** | ||||
* hv_util related structures | * hv_util related structures | ||||
* | * | ||||
*/ | */ | ||||
typedef struct hv_util_sc { | typedef struct hv_util_sc { | ||||
uint8_t *receive_buffer; | uint8_t *receive_buffer; | ||||
int ic_buflen; | int ic_buflen; | ||||
} hv_util_sc; | } hv_util_sc; | ||||
struct vmbus_ic_desc { | |||||
const struct hyperv_guid ic_guid; | |||||
const char *ic_desc; | |||||
}; | |||||
#define VMBUS_IC_DESC_END { .ic_desc = NULL } | |||||
void hv_negotiate_version(struct hv_vmbus_icmsg_hdr *icmsghdrp, uint8_t *buf); | void hv_negotiate_version(struct hv_vmbus_icmsg_hdr *icmsghdrp, uint8_t *buf); | ||||
int hv_util_attach(device_t dev, vmbus_chan_callback_t cb); | int hv_util_attach(device_t dev, vmbus_chan_callback_t cb); | ||||
int hv_util_detach(device_t dev); | int hv_util_detach(device_t dev); | ||||
int vmbus_ic_probe(device_t dev, const struct vmbus_ic_desc descs[]); | |||||
#endif | #endif |