VirtualBox

source: vbox/trunk/src/VBox/Main/include/NetworkServiceRunner.h@ 79644

最後變更 在這個檔案從79644是 79644,由 vboxsync 提交於 6 年 前

Main/NetworkServiceRunner: eliminated std::string and replaced the std::map option/value map with a C array that can be passed directly to RTProcCreate. Changed the term 'options' to 'arguments' to avoid DHCP option confusion. bugref:9288

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.0 KB
 
1/* $Id: NetworkServiceRunner.h 79644 2019-07-09 14:01:06Z vboxsync $ */
2/** @file
3 * VirtualBox Main - interface for VBox DHCP server.
4 */
5
6/*
7 * Copyright (C) 2009-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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
18#ifndef MAIN_INCLUDED_NetworkServiceRunner_h
19#define MAIN_INCLUDED_NetworkServiceRunner_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/com/string.h>
25
26
27/** @name Internal networking trunk type option values (NetworkServiceRunner::kpszKeyTrunkType)
28 * @{ */
29#define TRUNKTYPE_WHATEVER "whatever"
30#define TRUNKTYPE_NETFLT "netflt"
31#define TRUNKTYPE_NETADP "netadp"
32#define TRUNKTYPE_SRVNAT "srvnat"
33/** @} */
34
35/**
36 * Network service runner.
37 *
38 * Build arguments, starts and stops network service processes.
39 */
40class NetworkServiceRunner
41{
42public:
43 NetworkServiceRunner(const char *aProcName);
44 virtual ~NetworkServiceRunner();
45
46 /** @name Argument management
47 * @{ */
48 int addArgument(const char *pszArgument);
49 int addArgPair(const char *pszOption, const char *pszValue);
50 void resetArguments();
51 /** @} */
52
53 int start(bool aKillProcessOnStop);
54 int stop();
55 bool isRunning();
56 void detachFromServer();
57
58 /** @name Common options
59 * @{ */
60 static const char * const kpszKeyNetwork;
61 static const char * const kpszKeyTrunkType;
62 static const char * const kpszTrunkName;
63 static const char * const kpszMacAddress;
64 static const char * const kpszIpAddress;
65 static const char * const kpszIpNetmask;
66 static const char * const kpszKeyNeedMain;
67 /** @} */
68
69private:
70 struct Data;
71 Data *m;
72};
73
74#endif /* !MAIN_INCLUDED_NetworkServiceRunner_h */
75
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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