VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp@ 28546

Last change on this file since 28546 was 28546, checked in by vboxsync, 15 years ago

VBoxService: Delete stale installation directory + version/rev entries if none found (anymore).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.0 KB
Line 
1/* $Id: VBoxServiceVMInfo.cpp 28546 2010-04-21 08:30:20Z vboxsync $ */
2/** @file
3 * VBoxService - Virtual Machine Information for the Host.
4 */
5
6/*
7 * Copyright (C) 2009-2010 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22
23
24/*******************************************************************************
25* Header Files *
26*******************************************************************************/
27#ifdef RT_OS_WINDOWS
28#include <winsock2.h>
29#include <ws2tcpip.h>
30#include <windows.h>
31#include <Ntsecapi.h>
32#else
33# define __STDC_LIMIT_MACROS
34# include <arpa/inet.h>
35# include <errno.h>
36# include <netinet/in.h>
37# include <sys/ioctl.h>
38# include <sys/socket.h>
39# include <net/if.h>
40# include <unistd.h>
41# ifndef RT_OS_FREEBSD /* The header does not exist anymore since FreeBSD 9-current */
42# include <utmp.h>
43# endif
44# ifdef RT_OS_SOLARIS
45# include <sys/sockio.h>
46# endif
47#endif
48
49#include <iprt/mem.h>
50#include <iprt/thread.h>
51#include <iprt/string.h>
52#include <iprt/semaphore.h>
53#include <iprt/system.h>
54#include <iprt/time.h>
55#include <iprt/assert.h>
56#include <VBox/version.h>
57#include <VBox/VBoxGuestLib.h>
58#include "VBoxServiceInternal.h"
59#include "VBoxServiceUtils.h"
60
61
62/*******************************************************************************
63* Global Variables *
64*******************************************************************************/
65/** The vminfo interval (millseconds). */
66uint32_t g_VMInfoInterval = 0;
67/** The semaphore we're blocking on. */
68static RTSEMEVENTMULTI g_VMInfoEvent = NIL_RTSEMEVENTMULTI;
69/** The guest property service client ID. */
70static uint32_t g_VMInfoGuestPropSvcClientID = 0;
71/** Number of logged in users in OS. */
72static uint32_t g_cVMInfoLoggedInUsers = UINT32_MAX;
73
74
75/** @copydoc VBOXSERVICE::pfnPreInit */
76static DECLCALLBACK(int) VBoxServiceVMInfoPreInit(void)
77{
78 return VINF_SUCCESS;
79}
80
81
82/** @copydoc VBOXSERVICE::pfnOption */
83static DECLCALLBACK(int) VBoxServiceVMInfoOption(const char **ppszShort, int argc, char **argv, int *pi)
84{
85 int rc = -1;
86 if (ppszShort)
87 /* no short options */;
88 else if (!strcmp(argv[*pi], "--vminfo-interval"))
89 rc = VBoxServiceArgUInt32(argc, argv, "", pi,
90 &g_VMInfoInterval, 1, UINT32_MAX - 1);
91 return rc;
92}
93
94
95/** @copydoc VBOXSERVICE::pfnInit */
96static DECLCALLBACK(int) VBoxServiceVMInfoInit(void)
97{
98 /*
99 * If not specified, find the right interval default.
100 * Then create the event sem to block on.
101 */
102 if (!g_VMInfoInterval)
103 g_VMInfoInterval = g_DefaultInterval * 1000;
104 if (!g_VMInfoInterval)
105 g_VMInfoInterval = 10 * 1000;
106
107 int rc = RTSemEventMultiCreate(&g_VMInfoEvent);
108 AssertRCReturn(rc, rc);
109
110#ifdef RT_OS_WINDOWS
111 /* Get function pointers. */
112 HMODULE hKernel32 = LoadLibrary("kernel32");
113 if (hKernel32 != NULL)
114 {
115 g_pfnWTSGetActiveConsoleSessionId = (PFNWTSGETACTIVECONSOLESESSIONID)GetProcAddress(hKernel32, "WTSGetActiveConsoleSessionId");
116 FreeLibrary(hKernel32);
117 }
118#endif
119
120 rc = VbglR3GuestPropConnect(&g_VMInfoGuestPropSvcClientID);
121 if (RT_SUCCESS(rc))
122 VBoxServiceVerbose(3, "Property Service Client ID: %#x\n", g_VMInfoGuestPropSvcClientID);
123 else
124 {
125 VBoxServiceError("Failed to connect to the guest property service! Error: %Rrc\n", rc);
126 RTSemEventMultiDestroy(g_VMInfoEvent);
127 g_VMInfoEvent = NIL_RTSEMEVENTMULTI;
128 }
129
130 return rc;
131}
132
133
134/**
135 * Writes the properties that won't change while the service is running.
136 *
137 * Errors are ignored.
138 */
139static void VBoxServiceVMInfoWriteFixedProperties(void)
140{
141 /*
142 * First get OS information that won't change.
143 */
144 char szInfo[256];
145 int rc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szInfo, sizeof(szInfo));
146 if (RT_SUCCESS(rc))
147 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Product", "%s", szInfo);
148 else
149 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Product", "");
150
151 rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo));
152 if (RT_SUCCESS(rc))
153 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Release", "%s", szInfo);
154 else
155 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Release", "");
156
157 rc = RTSystemQueryOSInfo(RTSYSOSINFO_VERSION, szInfo, sizeof(szInfo));
158 if (RT_SUCCESS(rc))
159 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Version", "%s", szInfo);
160 else
161 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Version", "");
162
163 rc = RTSystemQueryOSInfo(RTSYSOSINFO_SERVICE_PACK, szInfo, sizeof(szInfo));
164 if (RT_SUCCESS(rc))
165 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/ServicePack", "%s", szInfo);
166 else
167 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/ServicePack", "");
168
169 /*
170 * Retrieve version information about Guest Additions and installed files (components).
171 */
172 char *pszAddVer;
173 char *pszAddRev;
174 rc = VbglR3GetAdditionsVersion(&pszAddVer, &pszAddRev);
175 if (RT_SUCCESS(rc))
176 {
177 /* Write information to host. */
178 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Version", "%s", pszAddVer);
179 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Revision", "%s", pszAddRev);
180 RTStrFree(pszAddVer);
181 RTStrFree(pszAddRev);
182 }
183 else /* If not found delete stale entries. */
184 {
185 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Version", NULL);
186 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Revision", NULL);
187 }
188
189#ifdef RT_OS_WINDOWS
190 /*
191 * Do windows specific properties.
192 */
193 char *pszInstDir;
194 rc = VbglR3GetAdditionsInstallationPath(&pszInstDir);
195 if (RT_SUCCESS(rc))
196 {
197 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/InstallDir", "%s", pszInstDir);
198 RTStrFree(pszInstDir);
199 }
200 else /* If not found delete stale entry. */
201 {
202 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/InstallDir", NULL);
203 }
204 VBoxServiceWinGetComponentVersions(g_VMInfoGuestPropSvcClientID);
205#endif
206
207 /* return rc; */
208}
209
210
211/** @copydoc VBOXSERVICE::pfnWorker */
212DECLCALLBACK(int) VBoxServiceVMInfoWorker(bool volatile *pfShutdown)
213{
214 int rc = VINF_SUCCESS;
215
216 /*
217 * Tell the control thread that it can continue
218 * spawning services.
219 */
220 RTThreadUserSignal(RTThreadSelf());
221
222#ifdef RT_OS_WINDOWS
223 /* Required for network information (must be called per thread). */
224 WSADATA wsaData;
225 if (WSAStartup(MAKEWORD(2, 2), &wsaData))
226 VBoxServiceError("WSAStartup failed! Error: %Rrc\n", RTErrConvertFromWin32(WSAGetLastError()));
227#endif /* RT_OS_WINDOWS */
228
229 /*
230 * Write the fixed properties first.
231 */
232 VBoxServiceVMInfoWriteFixedProperties();
233
234 /*
235 * Now enter the loop retrieving runtime data continuously.
236 */
237 unsigned cErrors = 0;
238 for (;;)
239 {
240/** @todo r=bird: split this code up into functions!! */
241 /* Enumerate logged in users. */
242 uint32_t cUsersInList = 0;
243 char szUserList[4096] = {0};
244
245#ifdef RT_OS_WINDOWS
246# ifndef TARGET_NT4
247 PLUID paSessions = NULL;
248 ULONG cSession = 0;
249 NTSTATUS r = 0;
250
251 /* This function can report stale or orphaned interactive logon sessions
252 of already logged off users (especially in Windows 2000). */
253 r = ::LsaEnumerateLogonSessions(&cSession, &paSessions);
254 VBoxServiceVerbose(3, "Users: Found %ld users.\n", cSession);
255 if (r != STATUS_SUCCESS)
256 {
257 VBoxServiceError("LsaEnumerate failed %lu\n", LsaNtStatusToWinError(r));
258 return 1;
259 }
260
261 PVBOXSERVICEVMINFOPROC paProcs;
262 DWORD cProcs;
263 rc = VBoxServiceVMInfoWinProcessesEnumerate(&paProcs, &cProcs);
264 if (RT_SUCCESS(rc))
265 {
266 for (ULONG i = 0; i < cSession; i++)
267 {
268 VBOXSERVICEVMINFOUSER UserInfo;
269 if ( VBoxServiceVMInfoWinIsLoggedIn(&UserInfo, &paSessions[i])
270 && VBoxServiceVMInfoWinSessionHasProcesses(&paSessions[i], paProcs, cProcs))
271 {
272 if (cUsersInList > 0)
273 strcat(szUserList, ",");
274
275 cUsersInList++;
276
277 char *pszTemp;
278 int rc2 = RTUtf16ToUtf8(UserInfo.wszUser, &pszTemp);
279 if (RT_SUCCESS(rc2))
280 {
281 strcat(szUserList, pszTemp);
282 RTMemFree(pszTemp);
283 }
284 else
285 strcat(szUserList, "<string-convertion-error>");
286 }
287 }
288 VBoxServiceVMInfoWinProcessesFree(paProcs);
289 }
290
291 ::LsaFreeReturnBuffer(paSessions);
292# endif /* TARGET_NT4 */
293#elif defined(RT_OS_FREEBSD)
294 /** @todo FreeBSD: Port logged on user info retrival. */
295#elif defined(RT_OS_OS2)
296 /** @todo OS/2: Port logged on (LAN/local/whatever) user info retrival. */
297#else
298 rc = utmpname(UTMP_FILE);
299# ifdef RT_OS_SOLARIS
300 if (rc != 1)
301# else
302 if (rc != 0)
303# endif
304 {
305 VBoxServiceError("Could not set UTMP file! Error: %ld\n", errno);
306 }
307 setutent();
308 utmp *ut_user;
309 while ((ut_user = getutent()))
310 {
311 /* Make sure we don't add user names which are not
312 * part of type USER_PROCESS and don't add same users twice. */
313 if ( ut_user->ut_type == USER_PROCESS
314 && strstr(szUserList, ut_user->ut_user) == NULL)
315 {
316 /** @todo Do we really want to filter out double user names? (Same user logged in twice)
317 * bird: If we do, then we must add checks for buffer overflows here! */
318 /** @todo r=bird: strstr will filtering out users with similar names. For
319 * example: smith, smithson, joesmith and bobsmith */
320 if (cUsersInList > 0)
321 strcat(szUserList, ",");
322 strcat(szUserList, ut_user->ut_user);
323 cUsersInList++;
324 }
325 }
326 endutent();
327#endif /* !RT_OS_WINDOWS */
328
329 if (cUsersInList > 0)
330 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsersList", "%s", szUserList);
331 else
332 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsersList", NULL);
333 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsers", "%u", cUsersInList);
334 if ( g_cVMInfoLoggedInUsers != cUsersInList
335 || g_cVMInfoLoggedInUsers == UINT32_MAX)
336 {
337 /* Update this property ONLY if there is a real change from no users to
338 * users or vice versa. The only exception is that the initialization
339 * forces an update, but only once. This ensures consistent property
340 * settings even if the VM aborted previously. */
341 if (cUsersInList == 0)
342 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "true");
343 else if (g_cVMInfoLoggedInUsers == 0)
344 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "false");
345 }
346 g_cVMInfoLoggedInUsers = cUsersInList;
347
348 /*
349 * Get network configuration.
350 */
351 /** @todo Throw this code into a separate function/module? */
352 int nNumInterfaces = 0;
353#ifdef RT_OS_WINDOWS
354 SOCKET sd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0);
355 if (sd == SOCKET_ERROR) /* Socket invalid. */
356 {
357 VBoxServiceError("Failed to get a socket: Error %d\n", WSAGetLastError());
358 return -1;
359 }
360
361 INTERFACE_INFO InterfaceList[20] = {0};
362 unsigned long nBytesReturned = 0;
363 if (WSAIoctl(sd,
364 SIO_GET_INTERFACE_LIST,
365 0,
366 0,
367 &InterfaceList,
368 sizeof(InterfaceList),
369 &nBytesReturned,
370 0,
371 0) == SOCKET_ERROR)
372 {
373 VBoxServiceError("Failed to WSAIoctl() on socket: Error: %d\n", WSAGetLastError());
374 return -1;
375 }
376 nNumInterfaces = nBytesReturned / sizeof(INTERFACE_INFO);
377#else
378 int sd = socket(AF_INET, SOCK_DGRAM, 0);
379 if (sd < 0) /* Socket invalid. */
380 {
381 VBoxServiceError("Failed to get a socket: Error %d\n", errno);
382 return -1;
383 }
384
385 ifconf ifcfg;
386 char buffer[1024] = {0};
387 ifcfg.ifc_len = sizeof(buffer);
388 ifcfg.ifc_buf = buffer;
389 if (ioctl(sd, SIOCGIFCONF, &ifcfg) < 0)
390 {
391 VBoxServiceError("Failed to ioctl(SIOCGIFCONF) on socket: Error %d\n", errno);
392 return -1;
393 }
394
395 ifreq* ifrequest = ifcfg.ifc_req;
396 ifreq *ifreqitem = NULL;
397 nNumInterfaces = ifcfg.ifc_len / sizeof(ifreq);
398#endif
399 char szPropPath [FILENAME_MAX];
400 int iCurIface = 0;
401
402 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/Net/Count", "%d",
403 nNumInterfaces > 1 ? nNumInterfaces-1 : 0);
404
405 /** @todo Use GetAdaptersInfo() and GetAdapterAddresses (IPv4 + IPv6) for more information. */
406 for (int i = 0; i < nNumInterfaces; ++i)
407 {
408 sockaddr_in *pAddress;
409 u_long nFlags = 0;
410#ifdef RT_OS_WINDOWS
411 if (InterfaceList[i].iiFlags & IFF_LOOPBACK) /* Skip loopback device. */
412 continue;
413 nFlags = InterfaceList[i].iiFlags;
414 pAddress = (sockaddr_in *)&(InterfaceList[i].iiAddress);
415#else
416 if (ioctl(sd, SIOCGIFFLAGS, &ifrequest[i]) < 0)
417 {
418 VBoxServiceError("Failed to ioctl(SIOCGIFFLAGS) on socket: Error %d\n", errno);
419 return -1;
420 }
421 if (ifrequest[i].ifr_flags & IFF_LOOPBACK) /* Skip loopback device. */
422 continue;
423 nFlags = ifrequest[i].ifr_flags;
424 pAddress = ((sockaddr_in *)&ifrequest[i].ifr_addr);
425#endif
426 Assert(pAddress);
427 RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/IP", iCurIface);
428 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, "%s", inet_ntoa(pAddress->sin_addr));
429
430#ifdef RT_OS_WINDOWS
431 pAddress = (sockaddr_in *) & (InterfaceList[i].iiBroadcastAddress);
432#else
433 if (ioctl(sd, SIOCGIFBRDADDR, &ifrequest[i]) < 0)
434 {
435 VBoxServiceError("Failed to ioctl(SIOCGIFBRDADDR) on socket: Error %d\n", errno);
436 return -1;
437 }
438 pAddress = (sockaddr_in *)&ifrequest[i].ifr_broadaddr;
439#endif
440 RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/Broadcast", iCurIface);
441 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, "%s", inet_ntoa(pAddress->sin_addr));
442
443#ifdef RT_OS_WINDOWS
444 pAddress = (sockaddr_in *)&(InterfaceList[i].iiNetmask);
445#else
446 if (ioctl(sd, SIOCGIFNETMASK, &ifrequest[i]) < 0)
447 {
448 VBoxServiceError("Failed to ioctl(SIOCGIFBRDADDR) on socket: Error %d\n", errno);
449 return -1;
450 }
451 #if defined(RT_OS_FREEBSD) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
452 pAddress = (sockaddr_in *)&ifrequest[i].ifr_addr;
453 #else
454 pAddress = (sockaddr_in *)&ifrequest[i].ifr_netmask;
455 #endif
456
457#endif
458 RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/Netmask", iCurIface);
459 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, "%s", inet_ntoa(pAddress->sin_addr));
460
461 RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/Status", iCurIface);
462 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath,
463 nFlags & IFF_UP ? "Up" : "Down");
464
465 iCurIface++;
466 }
467 if (sd >= 0)
468#ifdef RT_OS_WINDOWS
469 closesocket(sd);
470#else
471 close(sd);
472#endif
473
474 /*
475 * Block for a while.
476 *
477 * The event semaphore takes care of ignoring interruptions and it
478 * allows us to implement service wakeup later.
479 */
480 if (*pfShutdown)
481 break;
482 int rc2 = RTSemEventMultiWait(g_VMInfoEvent, g_VMInfoInterval);
483 if (*pfShutdown)
484 break;
485 if (rc2 != VERR_TIMEOUT && RT_FAILURE(rc2))
486 {
487 VBoxServiceError("RTSemEventMultiWait failed; rc2=%Rrc\n", rc2);
488 rc = rc2;
489 break;
490 }
491 }
492
493#ifdef RT_OS_WINDOWS
494 WSACleanup();
495#endif
496
497 RTSemEventMultiDestroy(g_VMInfoEvent);
498 g_VMInfoEvent = NIL_RTSEMEVENTMULTI;
499 return rc;
500}
501
502
503/** @copydoc VBOXSERVICE::pfnStop */
504static DECLCALLBACK(void) VBoxServiceVMInfoStop(void)
505{
506 RTSemEventMultiSignal(g_VMInfoEvent);
507}
508
509
510/** @copydoc VBOXSERVICE::pfnTerm */
511static DECLCALLBACK(void) VBoxServiceVMInfoTerm(void)
512{
513 int rc;
514
515 if (g_VMInfoEvent != NIL_RTSEMEVENTMULTI)
516 {
517 /** @todo temporary solution: Zap all values which are not valid
518 * anymore when VM goes down (reboot/shutdown ). Needs to
519 * be replaced with "temporary properties" later.
520 *
521 * @todo r=bird: This code isn't called on non-Windows systems. We need
522 * a more formal way of shutting down the service for that to work.
523 */
524 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsersList", NULL);
525 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsers", "%d", 0);
526 if (g_cVMInfoLoggedInUsers > 0)
527 VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "true");
528
529 const char *apszPat[1] = { "/VirtualBox/GuestInfo/Net/*" };
530 rc = VbglR3GuestPropDelSet(g_VMInfoGuestPropSvcClientID, &apszPat[0], RT_ELEMENTS(apszPat));
531 rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/Net/Count", "%d", 0);
532
533 /* Disconnect from guest properties service. */
534 rc = VbglR3GuestPropDisconnect(g_VMInfoGuestPropSvcClientID);
535 if (RT_FAILURE(rc))
536 VBoxServiceError("Failed to disconnect from guest property service! Error: %Rrc\n", rc);
537 g_VMInfoGuestPropSvcClientID = 0;
538
539
540 RTSemEventMultiDestroy(g_VMInfoEvent);
541 g_VMInfoEvent = NIL_RTSEMEVENTMULTI;
542 }
543}
544
545
546/**
547 * The 'vminfo' service description.
548 */
549VBOXSERVICE g_VMInfo =
550{
551 /* pszName. */
552 "vminfo",
553 /* pszDescription. */
554 "Virtual Machine Information",
555 /* pszUsage. */
556 "[--vminfo-interval <ms>]"
557 ,
558 /* pszOptions. */
559 " --vminfo-interval Specifies the interval at which to retrieve the\n"
560 " VM information. The default is 10000 ms.\n"
561 ,
562 /* methods */
563 VBoxServiceVMInfoPreInit,
564 VBoxServiceVMInfoOption,
565 VBoxServiceVMInfoInit,
566 VBoxServiceVMInfoWorker,
567 VBoxServiceVMInfoStop,
568 VBoxServiceVMInfoTerm
569};
570
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette