VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
RevLine 
[46970]1/* $Id: NetworkServiceRunner.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
[48107]3 * VirtualBox Main - interface for VBox DHCP server.
[46970]4 */
5
6/*
[98103]7 * Copyright (C) 2009-2023 Oracle and/or its affiliates.
[46970]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[46970]26 */
[48107]27
[76562]28#ifndef MAIN_INCLUDED_NetworkServiceRunner_h
29#define MAIN_INCLUDED_NetworkServiceRunner_h
[76487]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
[46970]34#include <VBox/com/string.h>
35
[49517]36
[79644]37/** @name Internal networking trunk type option values (NetworkServiceRunner::kpszKeyTrunkType)
38 * @{ */
[46970]39#define TRUNKTYPE_WHATEVER "whatever"
40#define TRUNKTYPE_NETFLT "netflt"
41#define TRUNKTYPE_NETADP "netadp"
42#define TRUNKTYPE_SRVNAT "srvnat"
[79644]43/** @} */
[46970]44
[79644]45/**
46 * Network service runner.
47 *
48 * Build arguments, starts and stops network service processes.
49 */
[47018]50class NetworkServiceRunner
[46970]51{
52public:
[49494]53 NetworkServiceRunner(const char *aProcName);
54 virtual ~NetworkServiceRunner();
[46970]55
[79644]56 /** @name Argument management
57 * @{ */
58 int addArgument(const char *pszArgument);
59 int addArgPair(const char *pszOption, const char *pszValue);
60 void resetArguments();
61 /** @} */
[46970]62
[79644]63 int start(bool aKillProcessOnStop);
[54705]64 int stop();
[79761]65 void detachFromServer();
[46970]66 bool isRunning();
[49494]67
[79761]68 RTPROCESS getPid() const;
69
[79644]70 /** @name Common options
71 * @{ */
72 static const char * const kpszKeyNetwork;
73 static const char * const kpszKeyTrunkType;
74 static const char * const kpszTrunkName;
75 static const char * const kpszMacAddress;
76 static const char * const kpszIpAddress;
77 static const char * const kpszIpNetmask;
78 static const char * const kpszKeyNeedMain;
79 /** @} */
[49499]80
[46970]81private:
[49494]82 struct Data;
83 Data *m;
[46970]84};
[76487]85
[76562]86#endif /* !MAIN_INCLUDED_NetworkServiceRunner_h */
[76487]87
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use