1 | /* $Id: VBoxNetBaseService.h 28800 2010-04-27 08:22:32Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxNetUDP - IntNet Client Library.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009 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 ___VBoxNetBaseService_h___
|
---|
19 | #define ___VBoxNetBaseService_h___
|
---|
20 | class VBoxNetBaseService
|
---|
21 | {
|
---|
22 | public:
|
---|
23 | VBoxNetBaseService();
|
---|
24 | virtual ~VBoxNetBaseService();
|
---|
25 | int parseArgs(int argc, char **argv);
|
---|
26 | int tryGoOnline(void);
|
---|
27 | void shutdown(void);
|
---|
28 | virtual void usage(void) = 0;
|
---|
29 | virtual void run(void) = 0;
|
---|
30 |
|
---|
31 | inline void debugPrint( int32_t iMinLevel, bool fMsg, const char *pszFmt, ...) const;
|
---|
32 | void debugPrintV(int32_t iMinLevel, bool fMsg, const char *pszFmt, va_list va) const;
|
---|
33 | public:
|
---|
34 | /** @name The server configuration data members.
|
---|
35 | * @{ */
|
---|
36 | std::string m_Name;
|
---|
37 | std::string m_Network;
|
---|
38 | std::string m_TrunkName;
|
---|
39 | INTNETTRUNKTYPE m_enmTrunkType;
|
---|
40 | RTMAC m_MacAddress;
|
---|
41 | RTNETADDRIPV4 m_Ipv4Address;
|
---|
42 | /** @} */
|
---|
43 | /** @name The network interface
|
---|
44 | * @{ */
|
---|
45 | PSUPDRVSESSION m_pSession;
|
---|
46 | uint32_t m_cbSendBuf;
|
---|
47 | uint32_t m_cbRecvBuf;
|
---|
48 | INTNETIFHANDLE m_hIf; /**< The handle to the network interface. */
|
---|
49 | PINTNETBUF m_pIfBuf; /**< Interface buffer. */
|
---|
50 | /** @} */
|
---|
51 | /** @name Debug stuff
|
---|
52 | * @{ */
|
---|
53 | int32_t m_cVerbosity;
|
---|
54 | /** @} */
|
---|
55 | };
|
---|
56 | #endif
|
---|