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 114 115 116 117 118 119 120 121 122 123 124 125
|
/*********************************************************
* Copyright (C) 2008 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.
*
*********************************************************/
/*
* toolbox-cmd.h --
*
* Common defines used by the toolbox-cmd.
*/
#ifndef _TOOLBOX_CMD_INT_H_
#define _TOOLBOX_CMD_INT_H_
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
# include "getoptwin32.h"
#else
# include <getopt.h>
# include <sysexits.h>
# include <unistd.h>
#endif
#include "toolboxInt.h"
#include "vmGuestLib.h"
/*
* Some platforms (such as Win32) don't have sysexits.h and thus don't have
* generic program exit codes.
*/
#ifndef EX_USAGE
#define EX_USAGE 64
#endif
#ifndef EX_UNAVAILABLE
#define EX_UNAVAILABLE 69
#endif
#ifndef EX_OSFILE
#define EX_OSFILE 72
#endif
#ifndef EX_TEMPFAIL
#define EX_TEMPFAIL 75
#endif
#ifndef EX_NOPERM
#define EX_NOPERM 77
#endif
/*
* We want to have commands and arguments on Windows to be
* case-instensitive, everywhere else we expect lowercase
* for commands and case-sensitivity for arguments.
*/
#ifdef _WIN32
# define toolbox_strcmp stricmp
#else
# define toolbox_strcmp strcmp
#endif
/*
* Devices Operations
*/
int Devices_ListDevices(void);
int Devices_DeviceStatus(char*);
int Devices_EnableDevice(char*, int);
int Devices_DisableDevice(char*, int);
/*
* TimeSync Operations
*/
int TimeSync_Enable(int);
int TimeSync_Disable(int);
int TimeSync_Status(void);
/*
* Script Operations
*/
int Script_GetDefault(const char *);
int Script_GetCurrent(const char *);
int Script_Enable(const char *, int);
int Script_Disable(const char *, int);
int Script_Set(const char *, const char *, int);
Bool Script_CheckName(const char *);
/*
* Disk Shrink Operations
*/
int Shrink_List(void);
int Shrink_DoShrink(char*, int);
/*
* Stat commands
*/
int Stat_HostTime(void);
int Stat_ProcessorSpeed(void);
int Stat_GetSessionID(void);
int Stat_GetCpuLimit(void);
int Stat_GetCpuReservation(void);
int Stat_GetMemoryBallooned(void);
int Stat_GetMemorySwapped(void);
int Stat_GetMemoryLimit(void);
int Stat_GetMemoryReservation(void);
#endif /*_TOOLBOX_CMD_H_*/
|