VirtualBox

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

Last change on this file since 93115 was 93115, checked in by vboxsync, 2 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
RevLine 
[46970]1/* $Id: NetworkServiceRunner.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
[48107]3 * VirtualBox Main - interface for VBox DHCP server.
[46970]4 */
5
6/*
[93115]7 * Copyright (C) 2009-2022 Oracle Corporation
[46970]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 */
[48107]17
[76562]18#ifndef MAIN_INCLUDED_NetworkServiceRunner_h
19#define MAIN_INCLUDED_NetworkServiceRunner_h
[76487]20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
[46970]24#include <VBox/com/string.h>
25
[49517]26
[79644]27/** @name Internal networking trunk type option values (NetworkServiceRunner::kpszKeyTrunkType)
28 * @{ */
[46970]29#define TRUNKTYPE_WHATEVER "whatever"
30#define TRUNKTYPE_NETFLT "netflt"
31#define TRUNKTYPE_NETADP "netadp"
32#define TRUNKTYPE_SRVNAT "srvnat"
[79644]33/** @} */
[46970]34
[79644]35/**
36 * Network service runner.
37 *
38 * Build arguments, starts and stops network service processes.
39 */
[47018]40class NetworkServiceRunner
[46970]41{
42public:
[49494]43 NetworkServiceRunner(const char *aProcName);
44 virtual ~NetworkServiceRunner();
[46970]45
[79644]46 /** @name Argument management
47 * @{ */
48 int addArgument(const char *pszArgument);
49 int addArgPair(const char *pszOption, const char *pszValue);
50 void resetArguments();
51 /** @} */
[46970]52
[79644]53 int start(bool aKillProcessOnStop);
[54705]54 int stop();
[79761]55 void detachFromServer();
[46970]56 bool isRunning();
[49494]57
[79761]58 RTPROCESS getPid() const;
59
[79644]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 /** @} */
[49499]70
[46970]71private:
[49494]72 struct Data;
73 Data *m;
[46970]74};
[76487]75
[76562]76#endif /* !MAIN_INCLUDED_NetworkServiceRunner_h */
[76487]77
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use