NetworkServiceRunner.h revision b5f3851e3304c175851642c5bc45cb432631665b
039cd2c4871a00e51af909222a34695d9cec3000vboxsync/* $Id$ */
039cd2c4871a00e51af909222a34695d9cec3000vboxsync/** @file
039cd2c4871a00e51af909222a34695d9cec3000vboxsync * VirtualBox Main - interface for VBox DHCP server.
039cd2c4871a00e51af909222a34695d9cec3000vboxsync */
039cd2c4871a00e51af909222a34695d9cec3000vboxsync
039cd2c4871a00e51af909222a34695d9cec3000vboxsync/*
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2009-2010 Oracle Corporation
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync *
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync */
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync#include <iprt/err.h>
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync#include <iprt/types.h>
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync#include <iprt/string.h>
039cd2c4871a00e51af909222a34695d9cec3000vboxsync#include <iprt/mem.h>
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync#include <VBox/com/string.h>
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync#define TRUNKTYPE_WHATEVER "whatever"
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync#define TRUNKTYPE_NETFLT "netflt"
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync#define TRUNKTYPE_NETADP "netadp"
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync#define TRUNKTYPE_SRVNAT "srvnat"
27537ffef7291d0bb3a24e459a6b94c65586defevboxsync
039cd2c4871a00e51af909222a34695d9cec3000vboxsyncclass NetworkServiceRunner
19edb133387698f301b529248daa3719fe0d7389vboxsync{
945c5fd81197e316e8bcfd9f29e06c6b8ff3508dvboxsyncpublic:
945c5fd81197e316e8bcfd9f29e06c6b8ff3508dvboxsync NetworkServiceRunner(const char *aProcName);
3f8fa562bb916e87b0beff9ec2a4e241c643dcc8vboxsync virtual ~NetworkServiceRunner();
039cd2c4871a00e51af909222a34695d9cec3000vboxsync
7203f6c17d0f467b2735c4cf235948225e73c2cevboxsync int setOption(const std::string& key, const std::string& val);
19edb133387698f301b529248daa3719fe0d7389vboxsync
19edb133387698f301b529248daa3719fe0d7389vboxsync int start();
19edb133387698f301b529248daa3719fe0d7389vboxsync int stop();
19edb133387698f301b529248daa3719fe0d7389vboxsync bool isRunning();
19edb133387698f301b529248daa3719fe0d7389vboxsync
19edb133387698f301b529248daa3719fe0d7389vboxsync void detachFromServer();
7203f6c17d0f467b2735c4cf235948225e73c2cevboxsync
3f8fa562bb916e87b0beff9ec2a4e241c643dcc8vboxsync static const std::string kNsrKeyName;
7203f6c17d0f467b2735c4cf235948225e73c2cevboxsync static const std::string kNsrKeyNetwork;
7203f6c17d0f467b2735c4cf235948225e73c2cevboxsync static const std::string kNsrKeyTrunkType;
12cd783de945853c8fc377095e8d0bbd4c97d8a1vboxsync static const std::string kNsrTrunkName;
7203f6c17d0f467b2735c4cf235948225e73c2cevboxsync static const std::string kNsrMacAddress;
039cd2c4871a00e51af909222a34695d9cec3000vboxsync static const std::string kNsrIpAddress;
039cd2c4871a00e51af909222a34695d9cec3000vboxsync static const std::string kNsrIpNetmask;
1a8be88b5b9a6353e5efdb82fddd5093dd78b3e3vboxsync
1a8be88b5b9a6353e5efdb82fddd5093dd78b3e3vboxsyncprivate:
1a8be88b5b9a6353e5efdb82fddd5093dd78b3e3vboxsync struct Data;
1a8be88b5b9a6353e5efdb82fddd5093dd78b3e3vboxsync Data *m;
1a8be88b5b9a6353e5efdb82fddd5093dd78b3e3vboxsync};
19edb133387698f301b529248daa3719fe0d7389vboxsync