VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h@ 39557

Last change on this file since 39557 was 39557, checked in by vboxsync, 13 years ago

NAT/service: registering port-forawarding from command line.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: VBoxNetBaseService.h 39557 2011-12-08 05:55:10Z 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___
20class VBoxNetBaseService
21{
22public:
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 virtual int init(void);
31 virtual int parseOpt(int rc, const RTGETOPTUNION& getOptVal) = 0;
32
33 inline void debugPrint( int32_t iMinLevel, bool fMsg, const char *pszFmt, ...) const;
34 void debugPrintV(int32_t iMinLevel, bool fMsg, const char *pszFmt, va_list va) const;
35public:
36 /** @name The server configuration data members.
37 * @{ */
38 std::string m_Name;
39 std::string m_Network;
40 std::string m_TrunkName;
41 INTNETTRUNKTYPE m_enmTrunkType;
42 RTMAC m_MacAddress;
43 RTNETADDRIPV4 m_Ipv4Address;
44 /** @} */
45 /** @name The network interface
46 * @{ */
47 PSUPDRVSESSION m_pSession;
48 uint32_t m_cbSendBuf;
49 uint32_t m_cbRecvBuf;
50 INTNETIFHANDLE m_hIf; /**< The handle to the network interface. */
51 PINTNETBUF m_pIfBuf; /**< Interface buffer. */
52 std::vector<PRTGETOPTDEF> m_vecOptionDefs;
53 /** @} */
54 /** @name Debug stuff
55 * @{ */
56 int32_t m_cVerbosity;
57private:
58 PRTGETOPTDEF getOptionsPtr();
59 /** @} */
60};
61#endif
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