Module host
[frames] | no frames]

Module host

Module that exposes functions to get information on the current host taken into consideration

Functions
string
serial()
Get host unique serial identifier
string
ethAddress()
Get host MAC address
string
ipAddress()
Get host IP address
string
hostResolvedName()
Get host Resolved Name
number
hostTrafficBucket()
Get Traffic Bucket
int
numHostSessions()
Get actual numHostSessions
number
vlanId()
Get vlanId
number
network_mask()
Get current host network_mask
string
hwModel()
Get hwModel of the current host
boolean
isHostResolvedNameType(type)
Check if the host matches the specified type
boolean
isFTPhost()
Check FTP Host
boolean
isServer()
Check isServer
boolean
isWorkstation()
Check isWorkstation Host
boolean
isMasterBrowser()
Check isMasterBrowser Host
boolean
isMultihomed()
Check isMultihomed Host
boolean
isMultivlaned()
Check isMultivlaned Host
boolean
isPrinter()
Check isPrinter Host
boolean
isSMTPhost()
Check isSMTPhost Host
boolean
isPOPhost()
Check isPOPhost Host
boolean
isIMAPhost()
Check isIMAPhost Host
boolean
isDirectoryHost()
Check isDirectoryHost Host
boolean
isHTTPhost()
Check isHTTPhost Host
boolean
isWINShost()
Check isWINShost Host
boolean
isBridgeHost()
Check isBridgeHost Host
boolean
isVoIPClient()
Check isVoIPClient Host
boolean
isVoIPGateway()
Check isVoIPGateway Host
boolean
isVoIPHost()
Check isVoIPHost Host
boolean
isDHCPClient()
Check isDHCPClient Host
boolean
isDHCPServer()
Check isDHCPServer Host
boolean
isP2P()
Check isP2P Host
boolean
isNtpServer()
Check isNtpServer Host
number
totContactedSentPeers()
Check totContactedSentPeers Host
number
totContactedRcvdPeers()
Check totContactedRcvdPeers Host
string
fingerprint()
Check fingerprint Host
number
synPktsSent()
Check synPktsSent Host
number
pktSent()
Return the number of packets sent by this host
number
pktRcvd()
Return the number of packets rcvd by this host
number
bytesSent()
Return the number of bytes sent by this host
number
bytesRcvd()
Return the number of bytes rcvd by this host
number
sendThpt(type)
Return the send throughput
number
receiveThpt(type)
Return the receive throughput
dictionary
geoIP()
Read geoLocalization info from GeoCityLite and return them
Variables
  __package__ = None
Function Details

serial()

 

Get host unique serial identifier

Returns: string
the unique serial identifier

ethAddress()

 

Get host MAC address

Returns: string
the host MAC address

ipAddress()

 

Get host IP address

Returns: string
the IP address

hostResolvedName()

 

Get host Resolved Name

Returns: string
the host Resolved Name

hostTrafficBucket()

 

Get Traffic Bucket

Returns: number
host traffic bucket

numHostSessions()

 

Get actual numHostSessions

Returns: int
the number of host Sessions

vlanId()

 

Get vlanId

Returns: number
the vlanId

network_mask()

 

Get current host network_mask

Returns: number
the network mask

hwModel()

 

Get hwModel of the current host

Returns: string
the hardware model or empy string if no info

isHostResolvedNameType(type)

 

Check if the host matches the specified type

Parameters:
  • type (number) - the type of the host resolved name to check
Returns: boolean
true if the host resolved name is of type type, false otherwise

isFTPhost()

 

Check FTP Host

Returns: boolean
true if the current host is ftp, false otherwise

isServer()

 

Check isServer

Returns: boolean
true if the current host is a Server, false otherwise

isWorkstation()

 

Check isWorkstation Host

Returns: boolean
true if the current host is a workstation, false otherwise

isMasterBrowser()

 

Check isMasterBrowser Host

Returns: boolean
true if the current host is a Master Browser, false otherwise

isMultihomed()

 

Check isMultihomed Host

Returns: boolean
true if the current host is multihomed, false otherwise

isMultivlaned()

 

Check isMultivlaned Host

Returns: boolean
true if the current host is multilaned, false otherwise

isPrinter()

 

Check isPrinter Host

Returns: boolean
true if the current host is a printer, false otherwise

isSMTPhost()

 

Check isSMTPhost Host

Returns: boolean
true if the current host is a smtp host, false otherwise

isPOPhost()

 

Check isPOPhost Host

Returns: boolean
true if the current host is a pop host, false otherwise

isIMAPhost()

 

Check isIMAPhost Host

Returns: boolean
true if the current host is an imap host, false otherwise

isDirectoryHost()

 

Check isDirectoryHost Host

Returns: boolean
true if the current host is a directory host, false otherwise

isHTTPhost()

 

Check isHTTPhost Host

Returns: boolean
true if the current host is an http host, false otherwise

isWINShost()

 

Check isWINShost Host

Returns: boolean
true if the current host is a wins host, false otherwise

isBridgeHost()

 

Check isBridgeHost Host

Returns: boolean
true if the current host is a bridge, false otherwise

isVoIPClient()

 

Check isVoIPClient Host

Returns: boolean
true if the current host is a voip client host, false otherwise

isVoIPGateway()

 

Check isVoIPGateway Host

Returns: boolean
true if the current host is a voip gateway, false otherwise

isVoIPHost()

 

Check isVoIPHost Host

Returns: boolean
true if the current host is a voip host, false otherwise

isDHCPClient()

 

Check isDHCPClient Host

Returns: boolean
true if the current host is a dhcp client, false otherwise

isDHCPServer()

 

Check isDHCPServer Host

Returns: boolean
true if the current host is a dhcp server, false otherwise

isP2P()

 

Check isP2P Host

Returns: boolean
true if the current host is a p2p host, false otherwise

isNtpServer()

 

Check isNtpServer Host

Returns: boolean
true if the current host is a ntp server, false otherwise

totContactedSentPeers()

 

Check totContactedSentPeers Host

Returns: number
the number of the total contacted sent peers

totContactedRcvdPeers()

 

Check totContactedRcvdPeers Host

Returns: number
the number of the total contacted received peers

fingerprint()

 

Check fingerprint Host

Returns: string
the fingerprint of the current host or empty string if none

synPktsSent()

 

Check synPktsSent Host

Returns: number
the number of syn packets sent by the current host

pktSent()

 

Return the number of packets sent by this host

Returns: number
the number packets sent

pktRcvd()

 

Return the number of packets rcvd by this host

Returns: number
the number of packets received

bytesSent()

 

Return the number of bytes sent by this host

Returns: number
the number of bytes sent

bytesRcvd()

 

Return the number of bytes rcvd by this host

Returns: number
the number of bytes received

sendThpt(type)

 

Return the send throughput

Parameters:
  • type (string) - actual average peak the type of the sent throughput to get
Returns: number
the number of bytes of the sent throughput of type type

receiveThpt(type)

 

Return the receive throughput

Parameters:
  • type (string) - actual average peak the type of the received throughput to get
Returns: number
the number of bytes of the received throughput of type type

geoIP()

 

Read geoLocalization info from GeoCityLite and return them

Returns: dictionary
a dictionary {'country_code':string,'country_name':string, 'region':string, 'city': string, 'latitude': number float, 'longitude': number float } with all the geoLocation info retrieved by GeoCityLite for the current host