VirtualBox

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

Last change on this file since 93444 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: NetworkServiceRunner.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VirtualBox Main - interface for VBox DHCP server.
4 */
5
6/*
7 * Copyright (C) 2009-2022 Oracle Corporation
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
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 void detachFromServer();
56 bool isRunning();
57
58 RTPROCESS getPid() const;
59
60 /** @name Common options
61 * @{ */
62 static const char * const kpszKeyNetwork;
63 static const char * const kpszKeyTrunkType;
64 static const char * const kpszTrunkName;
65 static const char * const kpszMacAddress;
66 static const char * const kpszIpAddress;
67 static const char * const kpszIpNetmask;
68 static const char * const kpszKeyNeedMain;
69 /** @} */
70
71private:
72 struct Data;
73 Data *m;
74};
75
76#endif /* !MAIN_INCLUDED_NetworkServiceRunner_h */
77
Note: See TracBrowser for help on using the repository browser.

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