VBoxNetBaseService.h revision d1a00c93378091ef28db9d959b2d692cc8143a07
/* $Id$ */
/** @file
* VBoxNetUDP - IntNet Client Library.
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* Sun Microsystems, Inc. confidential
* All rights reserved
*/
#ifndef ___VBoxNetBaseService_h___
#define ___VBoxNetBaseService_h___
class VBoxNetBaseService
{
public:
VBoxNetBaseService();
virtual ~VBoxNetBaseService();
int parseArgs(int argc, char **argv);
int tryGoOnline(void);
void shutdown(void);
virtual void usage(void) = 0;
virtual void run(void) = 0;
inline void debugPrint( int32_t iMinLevel, bool fMsg, const char *pszFmt, ...) const;
void debugPrintV(int32_t iMinLevel, bool fMsg, const char *pszFmt, va_list va) const;
public:
/** @name The server configuration data members.
* @{ */
std::string m_Name;
std::string m_Network;
std::string m_TrunkName;
INTNETTRUNKTYPE m_enmTrunkType;
RTMAC m_MacAddress;
RTNETADDRIPV4 m_Ipv4Address;
/** @} */
/** @name The network interface
* @{ */
PSUPDRVSESSION m_pSession;
uint32_t m_cbSendBuf;
uint32_t m_cbRecvBuf;
INTNETIFHANDLE m_hIf; /**< The handle to the network interface. */
PINTNETBUF m_pIfBuf; /**< Interface buffer. */
/** @} */
/** @name Debug stuff
* @{ */
int32_t m_cVerbosity;
/** @} */
};
#endif