1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/*********************************************************
* Copyright (C) 2003-2015 VMware, Inc. All rights reserved.
*
* This program 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 version 2.1 and no later version.
*
* This program 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 Lesser GNU General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*********************************************************/
/**
* @file guestInfo.h
*
* Common declarations that aid in sending guest information to the host.
*/
/**
* @defgroup vmtools_guestInfoAPI GuestInfo API Reference
* @{
*
* @brief APIs implementing the GuestInfo feature.
*
* Definitions below are used for communication across the backdoor between
* the VMware Tools Service (running in the guest) and the VMX (running in
* the host).
*
* @sa @ref vmtools_guestInfo for a high level overview.
*/
#ifndef _GUEST_INFO_H_
#define _GUEST_INFO_H_
#define INCLUDE_ALLOW_USERLEVEL
#include "includeCheck.h"
#include "vm_basic_types.h"
#include "dbllnklst.h"
#include "guestStats.h"
#ifndef N_PLAT_NLM
#include "guestrpc/nicinfo.h"
#endif // #ifndef N_PLAT_NLM
#define GUEST_INFO_COMMAND "SetGuestInfo"
#define MAX_VALUE_LEN 100
#define MAX_NICS 16
#define MAX_IPS 8 // Max number of IP addresses for a single NIC
#define MAC_ADDR_SIZE 19
#define IP_ADDR_SIZE 16
#define PARTITION_NAME_SIZE MAX_VALUE_LEN
/* Value to be used when "primary" IP address is indeterminable. */
#define GUESTINFO_IP_UNKNOWN "unknown"
typedef enum {
INFO_ERROR, /* Zero is unused so that errors in atoi can be caught. */
INFO_DNS_NAME,
INFO_IPADDRESS,
INFO_DISK_FREE_SPACE,
INFO_BUILD_NUMBER,
INFO_OS_NAME_FULL,
INFO_OS_NAME,
INFO_UPTIME,
INFO_MEMORY,
INFO_IPADDRESS_V2,
INFO_MAX
} GuestInfoType;
typedef enum {
INFO_IP_ADDRESS_FAMILY_IPV4,
INFO_IP_ADDRESS_FAMILY_IPV6
} GuestInfoIPAddressFamilyType;
typedef struct NicEntryV1 {
unsigned int numIPs;
char macAddress[MAC_ADDR_SIZE]; // In the format "12-23-34-45-56-67"
char ipAddress[MAX_IPS][IP_ADDR_SIZE];
} NicEntryV1;
typedef struct GuestNicInfoV1 {
unsigned int numNicEntries;
NicEntryV1 nicList[MAX_NICS];
} GuestNicInfoV1;
typedef
#include "vmware_pack_begin.h"
struct _PartitionEntry {
uint64 freeBytes;
uint64 totalBytes;
char name[PARTITION_NAME_SIZE];
}
#include "vmware_pack_end.h"
PartitionEntry, *PPartitionEntry;
typedef struct _DiskInfo {
unsigned int numEntries;
PPartitionEntry partitionList;
} GuestDiskInfo, *PGuestDiskInfo;
/**
* @}
*/
#endif // _GUEST_INFO_H_
|