Wiretap API  <small>Wiretap 2021.2</small>
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WireTapOS Class Reference

This class gives access to information about the Wiretap client host, and provides methods and constants for specifying standard operating systems. More...

Public Types

enum  OsType {
  OS_UNKNOWN = 0, OS_IRIX = 1, OS_LINUX = 2, OS_WINNT = 3,
  OS_MACOSX = 4
}
 

Static Public Member Functions

static WireTapStr getGroupId ()
 Gets the group id/name of the current process. More...
 
static WireTapStr getHostName ()
 Gets the name of the host machine on which the Wiretap client is running. More...
 
static WireTapOS::OsType getOSType ()
 Gets the operating system running on the Wiretap client host. More...
 
static WireTapStr getOSVersion ()
 Gets the version of the operating system running on the Wiretap client host. More...
 
static WireTapStr getUserId ()
 Gets the user id of the current process. More...
 
static bool isLocalIP (const char *ip)
 Determines if the IP or hostname specified references the local host. (e.g. 127.0.0.1, ::1, localhost, <host name>, <host IP>, etc) More...
 
static bool isLoopBackIP (const char *ip)
 Determines if the IP specified is a local only loopback IP address. (e.g. 127.0.0.1, ::1, localhost, etc) More...
 
static const char * OS_TYPE_IRIX_STR ()
 
static const char * OS_TYPE_LINUX_STR ()
 
static const char * OS_TYPE_MACOSX_STR ()
 
static const char * OS_TYPE_UNKNOWN_STR ()
 
static const char * OS_TYPE_WINNT_STR ()
 
static const char * OsTypeStr (WireTapOS::OsType osType)
 Converts an integer constant (defined in the WireTapOS.OsType enumeration) to a string describing the operating system. More...
 
static void setUserId (const char *id)
 Sets the user id of the current process. This id will be passed onto the remote Wiretap server for each command. No authentication is performed. Set to 0 or the empty string to reset to the user's process login ID. More...
 
static WireTapOS::OsType strToOsType (const char *osString)
 Converts a string to an integer constant defined in the WireTapOS.OsType enumeration. More...
 

Detailed Description

This class gives access to information about the Wiretap client host, and provides methods and constants for specifying standard operating systems.

This class provides static methods that give access to information about the host machine on which the Wiretap client is running (such as its operating system, IP address, and name).

The class includes an enumeration of constants that can be used to specify standard operating systems, as well as static methods that return strings for the standard operating systems. It also includes static methods for converting the constants to strings (WireTapOS.OsTypeStr) and vice versa (WireTapOS.strToOsType).

Member Enumeration Documentation

Enumerator
OS_UNKNOWN 
OS_IRIX 
OS_LINUX 
OS_WINNT 
OS_MACOSX 

Member Function Documentation

static WireTapStr WireTapOS::getGroupId ( )
static

Gets the group id/name of the current process.

Returns
A WireTapStr object that contains the id of the group that initiated the Wiretap client on the host machine. ( if available )
static WireTapStr WireTapOS::getHostName ( )
static

Gets the name of the host machine on which the Wiretap client is running.

Note
Wiretap clients can get the name of the host machine on which a Wiretap server is running, by calling WireTapServerHandle.getHostName.
Returns
A WireTapStr object that contains the name of the host machine on which the Wiretap client is running.
static WireTapOS::OsType WireTapOS::getOSType ( )
static

Gets the operating system running on the Wiretap client host.

Returns
An integer constant that represents the operating system of the machine on which the Wiretap client is running. The integer can be converted to a string with the WireTapOS.OsTypeStr method.
static WireTapStr WireTapOS::getOSVersion ( )
static

Gets the version of the operating system running on the Wiretap client host.

Returns
A WireTapStr object that contains the version of the operating system running on the Wiretap client host.
static WireTapStr WireTapOS::getUserId ( )
static

Gets the user id of the current process.

Returns
A WireTapStr object that contains the id/name of the user that initiated the Wiretap client on the host machine. Can be overriden by WireTapOS.setUserId.
static bool WireTapOS::isLocalIP ( const char *  ip)
static

Determines if the IP or hostname specified references the local host. (e.g. 127.0.0.1, ::1, localhost, <host name>, <host IP>, etc)

Returns
True if the IP or hostname specified maps to a local interface.
static bool WireTapOS::isLoopBackIP ( const char *  ip)
static

Determines if the IP specified is a local only loopback IP address. (e.g. 127.0.0.1, ::1, localhost, etc)

Returns
True if the IP specified maps to the local host.
static const char* WireTapOS::OS_TYPE_IRIX_STR ( )
static
static const char* WireTapOS::OS_TYPE_LINUX_STR ( )
static
static const char* WireTapOS::OS_TYPE_MACOSX_STR ( )
static
static const char* WireTapOS::OS_TYPE_UNKNOWN_STR ( )
static
static const char* WireTapOS::OS_TYPE_WINNT_STR ( )
static
static const char* WireTapOS::OsTypeStr ( WireTapOS::OsType  osType)
static

Converts an integer constant (defined in the WireTapOS.OsType enumeration) to a string describing the operating system.

Parameters
osTypeAn integer constant (defined in WireTapOS.OsType) that represents a standard operating system.
Returns
A string describing the operating system that corresponds to the input parameter, osType.
static void WireTapOS::setUserId ( const char *  id)
static

Sets the user id of the current process. This id will be passed onto the remote Wiretap server for each command. No authentication is performed. Set to 0 or the empty string to reset to the user's process login ID.

static WireTapOS::OsType WireTapOS::strToOsType ( const char *  osString)
static

Converts a string to an integer constant defined in the WireTapOS.OsType enumeration.

Parameters
osStringAn input parameter. A string describing an operating system.
Returns
An integer constant (defined in WireTapOS.OsType) that represents a standard operating system. Returns 0 (OS_UNKNOWN) if the string does not match any of the members of WireTapOS::OsType.

The documentation for this class was generated from the following file: