#define GUEST_INFO_COMMAND "SetGuestInfo"
#define MAX_VALUE_LEN 100
+
+/**
+ * Upper bound for value sizes, based on gethostname(2):
+ *
+ * SUS2 guarantees that "Host names are limited to 255 bytes".
+ *
+ * We can't modify MAX_VALUE_LEN since it's used in wire-level definitions
+ * (such as PartitionEntry).
+ */
+#define GUESTINFO_MAX_VALUE_SIZE 256
+
#define MAX_NICS 16
#define MAX_IPS 8 // Max number of IP addresses for a single NIC
#define MAC_ADDR_SIZE 19
VM_EMBED_VERSION(VMTOOLSD_VERSION_STRING);
#endif
-
-/**
- * Upper bound for value sizes, based on gethostname(2):
- *
- * SUS2 guarantees that "Host names are limited to 255 bytes".
- *
- * We can't modify MAX_VALUE_LEN since it's used in wire-level definitions
- * (such as PartitionEntry).
- */
-#define GUESTINFO_MAX_VALUE_SIZE 256
-
MY_ASSERTS(GI_SIZE_ASSERTS,
ASSERT_ON_COMPILE(GUESTINFO_MAX_VALUE_SIZE >= MAX_VALUE_LEN);
)
const char *powerOnScript = NULL;
const char *resumeScript = NULL;
const char *suspendScript = NULL;
- char osNameFull[MAX_VALUE_LEN];
- char osName[MAX_VALUE_LEN];
+ char osNameFull[GUESTINFO_MAX_VALUE_SIZE];
+ char osName[GUESTINFO_MAX_VALUE_SIZE];
Bool foundHostName;
char *tempDir = NULL;
int wordSize = 32;