Class PortScan

Description

This class represents a row in the systems table in the database.

Additionaly, it retrieves information about open ports for this end device. This class extends the EndDevice class

Located in /lib/PortScan.php (line 25)

Common
   |
   --EndDevice
      |
      --PortScan
Method Summary
 PortScan __construct (object $object)
 array getPorts ()
 boolean isPortOpen ([integer $port = 0], [mixed $protocol = 'TCP'], [integer $days = 7])
 mixed openPorts ()
 void scan ()
Variables
Methods
Constructor __construct (line 32)

Retrieve a row from the systems table for this system and also port_scan information

  • access: public
PortScan __construct (object $object)
  • object $object: Required to construct our object

Redefinition of:
EndDevice::__construct()
The constructor takes the mac address of the system and creates and instance representing that particular system.
getPorts (line 104)

Get all open ports for this system

  • return: List of open ports according to the nac_openports table
  • access: public
array getPorts ()
isPortOpen (line 119)

Tell if a specific port has been open during the last days

  • return: True if port has been open during the last days, false otherwise
  • access: public
boolean isPortOpen ([integer $port = 0], [mixed $protocol = 'TCP'], [integer $days = 7])
  • integer $port: Port number
  • mixed $protocol: Protocol for this port
  • integer $days: Number of days to check if the port has been open for
openPorts (line 88)

Get the number of open ports for this device

  • return: Number of ports open or false if the device is not in de database
  • access: public
mixed openPorts ()
scan (line 144)
  • access: public
void scan ()

Inherited Methods

Inherited From EndDevice

 EndDevice::__construct()
 EndDevice::check_calling_method()
 EndDevice::getAllProps()
 EndDevice::getEndDeviceID()
 EndDevice::getVendor()
 EndDevice::getVlanID()
 EndDevice::getVlanName()
 EndDevice::inDB()
 EndDevice::insertIfUnknown()
 EndDevice::isActive()
 EndDevice::isExpired()
 EndDevice::isKilled()
 EndDevice::isUnknown()
 EndDevice::isUnmanaged()
 EndDevice::isVM()
 EndDevice::setAlertMessage()
 EndDevice::setAlertSubject()
 EndDevice::setHealth()
 EndDevice::setNotifyInfo()
 EndDevice::setOfficeID()
 EndDevice::setPatchInfo()
 EndDevice::setPortID()
 EndDevice::setPortInfo()
 EndDevice::setSwitchInfo()
 EndDevice::setVlanID()
 EndDevice::update()
 EndDevice::__call()
 EndDevice::__get()
 EndDevice::__set()

Inherited From Common

 Common::__construct()
 Common::getConnection()
 Common::htmlescape()
 Common::log2db()
 Common::real_escape_string1()
 Common::sqlescape()

Documentation generated on Mon, 13 Oct 2008 01:10:42 +0200 by phpDocumentor 1.4.0