Deleted Added
full compact
2,4c2
< * Copyright (c) 2009-2012 Microsoft Corp.
< * Copyright (c) 2012 NetApp Inc.
< * Copyright (c) 2012 Citrix Inc.
---
> * Copyright (c) 2014 Microsoft Corp.
26a25,26
> *
> * $FreeBSD: head/sys/dev/hyperv/utilities/hv_kvp.h 271493 2014-09-13 02:15:31Z delphij $
33c33
< * An implementation of HyperV key value pair (KVP) functionality for FreeBSD
---
> * An implementation of HyperV key value pair (KVP) functionality for FreeBSD
56c56
< #define HV_KVP_EXCHANGE_MAX_VALUE_SIZE (2048)
---
> #define HV_KVP_EXCHANGE_MAX_VALUE_SIZE (2048)
62a63
> #define HV_KVP_EXCHANGE_MAX_KEY_SIZE (512)
64d64
< #define HV_KVP_EXCHANGE_MAX_KEY_SIZE (512)
114c114
<
---
>
117a118,120
> #define HV_REG_SZ 1
> #define HV_REG_U32 4
> #define HV_REG_U64 8
119,121d121
< #define HV_REG_SZ 1
< #define HV_REG_U32 4
< #define HV_REG_U64 8
123d122
<
125,130d123
< * Daemon code not supporting IP injection (legacy daemon).
< */
<
< #define HV_KVP_OP_REGISTER 4
<
< /*
132,134d124
< * The KVP opcode field is used to communicate the
< * registration information; so define a namespace that
< * will be distinct from the host defined KVP opcode.
135a126
> #define HV_KVP_OP_REGISTER 4
137d127
< #define KVP_OP_REGISTER1 100
157a148
>
161,168c152,159
< #define HV_KVP_S_OK 0x00000000
< #define HV_KVP_E_FAIL 0x80004005
< #define HV_KVP_S_CONT 0x80070103
< #define HV_ERROR_NOT_SUPPORTED 0x80070032
< #define HV_ERROR_MACHINE_LOCKED 0x800704F7
< #define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F
< #define HV_INVALIDARG 0x80070057
< #define HV_KVP_GUID_NOTFOUND 0x80041002
---
> #define HV_KVP_S_OK 0x00000000
> #define HV_KVP_E_FAIL 0x80004005
> #define HV_KVP_S_CONT 0x80070103
> #define HV_ERROR_NOT_SUPPORTED 0x80070032
> #define HV_ERROR_MACHINE_LOCKED 0x800704F7
> #define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F
> #define HV_INVALIDARG 0x80070057
> #define HV_KVP_GUID_NOTFOUND 0x80041002
170,172c161,163
< #define ADDR_FAMILY_NONE 0x00
< #define ADDR_FAMILY_IPV4 0x01
< #define ADDR_FAMILY_IPV6 0x02
---
> #define ADDR_FAMILY_NONE 0x00
> #define ADDR_FAMILY_IPV4 0x01
> #define ADDR_FAMILY_IPV6 0x02
174,176c165,167
< #define MAX_ADAPTER_ID_SIZE 128
< #define MAX_IP_ADDR_SIZE 1024
< #define MAX_GATEWAY_SIZE 512
---
> #define MAX_ADAPTER_ID_SIZE 128
> #define MAX_IP_ADDR_SIZE 1024
> #define MAX_GATEWAY_SIZE 512
180,187c171,178
< uint16_t adapter_id[MAX_ADAPTER_ID_SIZE];
< uint8_t addr_family;
< uint8_t dhcp_enabled;
< uint16_t ip_addr[MAX_IP_ADDR_SIZE];
< uint16_t sub_net[MAX_IP_ADDR_SIZE];
< uint16_t gate_way[MAX_GATEWAY_SIZE];
< uint16_t dns_addr[MAX_IP_ADDR_SIZE];
< } __attribute__((packed));
---
> uint16_t adapter_id[MAX_ADAPTER_ID_SIZE];
> uint8_t addr_family;
> uint8_t dhcp_enabled;
> uint16_t ip_addr[MAX_IP_ADDR_SIZE];
> uint16_t sub_net[MAX_IP_ADDR_SIZE];
> uint16_t gate_way[MAX_GATEWAY_SIZE];
> uint16_t dns_addr[MAX_IP_ADDR_SIZE];
> }__attribute__((packed));
189d179
<
191,192c181,182
< uint8_t operation;
< uint8_t pool;
---
> uint8_t operation;
> uint8_t pool;
200c190
< uint8_t key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
---
> uint8_t key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
202c192
< uint8_t value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
---
> uint8_t value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
232,233c222,223
< struct hv_kvp_hdr kvp_hdr;
< int error;
---
> struct hv_kvp_hdr kvp_hdr;
> uint32_t error;
236,237c226,227
< struct hv_kvp_msg_get kvp_get;
< struct hv_kvp_msg_set kvp_set;
---
> struct hv_kvp_msg_get kvp_get;
> struct hv_kvp_msg_set kvp_set;
240,241c230,231
< struct hv_kvp_ipaddr_value kvp_ip_val;
< struct hv_kvp_register kvp_register;
---
> struct hv_kvp_ipaddr_value kvp_ip_val;
> struct hv_kvp_register kvp_register;
251d240
< #define BSD_SOC_PATH "/etc/hyperv/socket"
253,257c242,246
< #define HV_SHUT_DOWN 0
< #define HV_TIME_SYNCH 1
< #define HV_HEART_BEAT 2
< #define HV_KVP 3
< #define HV_MAX_UTIL_SERVICES 4
---
> #define HV_SHUT_DOWN 0
> #define HV_TIME_SYNCH 1
> #define HV_HEART_BEAT 2
> #define HV_KVP 3
> #define HV_MAX_UTIL_SERVICES 4
259,263c248,252
< #define HV_WLTIMEDELTA 116444736000000000L /* in 100ns unit */
< #define HV_ICTIMESYNCFLAG_PROBE 0
< #define HV_ICTIMESYNCFLAG_SYNC 1
< #define HV_ICTIMESYNCFLAG_SAMPLE 2
< #define HV_NANO_SEC_PER_SEC 1000000000
---
> #define HV_WLTIMEDELTA 116444736000000000L /* in 100ns unit */
> #define HV_ICTIMESYNCFLAG_PROBE 0
> #define HV_ICTIMESYNCFLAG_SYNC 1
> #define HV_ICTIMESYNCFLAG_SAMPLE 2
> #define HV_NANO_SEC_PER_SEC 1000000000
265,284d253
< typedef struct hv_vmbus_service {
< hv_guid guid; /* Hyper-V GUID */
< char* name; /* name of service */
< boolean_t enabled; /* service enabled */
< hv_work_queue* work_queue; /* background work queue */
<
< //
< // function to initialize service
< //
< int (*init)(struct hv_vmbus_service *);
<
< //
< // function to process Hyper-V messages
< //
< void (*callback)(void *);
< } hv_vmbus_service;
<
< extern uint8_t* receive_buffer[];
< extern hv_vmbus_service service_table[];
<