VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 20 months ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: NetworkServiceRunner.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VirtualBox Main - interface for VBox DHCP server.
4 */
5
6/*
7 * Copyright (C) 2009-2022 Oracle and/or its affiliates.
8 *
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
26 */
27
28#ifndef MAIN_INCLUDED_NetworkServiceRunner_h
29#define MAIN_INCLUDED_NetworkServiceRunner_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBox/com/string.h>
35
36
37/** @name Internal networking trunk type option values (NetworkServiceRunner::kpszKeyTrunkType)
38 * @{ */
39#define TRUNKTYPE_WHATEVER "whatever"
40#define TRUNKTYPE_NETFLT "netflt"
41#define TRUNKTYPE_NETADP "netadp"
42#define TRUNKTYPE_SRVNAT "srvnat"
43/** @} */
44
45/**
46 * Network service runner.
47 *
48 * Build arguments, starts and stops network service processes.
49 */
50class NetworkServiceRunner
51{
52public:
53 NetworkServiceRunner(const char *aProcName);
54 virtual ~NetworkServiceRunner();
55
56 /** @name Argument management
57 * @{ */
58 int addArgument(const char *pszArgument);
59 int addArgPair(const char *pszOption, const char *pszValue);
60 void resetArguments();
61 /** @} */
62
63 int start(bool aKillProcessOnStop);
64 int stop();
65 void detachFromServer();
66 bool isRunning();
67
68 RTPROCESS getPid() const;
69
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 /** @} */
80
81private:
82 struct Data;
83 Data *m;
84};
85
86#endif /* !MAIN_INCLUDED_NetworkServiceRunner_h */
87
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use