\Subnet

Class Subnet builds IP map

Summary

Methods
Properties
Constants
getTree()
formTree()
$gamma
$res
No constants found
No protected methods found
No protected properties found
N/A
getAllInterfaces()
formSubnets()
formNodes()
formLeafs()
getClassfulNet()
getClassNet()
mask2cidr()
cidr_match()
getIPRange()
lastSort()
$arr
$arr_ip
$arr_iname
$arr_rname
$arr_descr
N/A

Properties

$gamma

$gamma : 

Type

$res

$res : 

Type

$arr

$arr : 

Type

$arr_ip

$arr_ip : 

Type

$arr_iname

$arr_iname : 

Type

$arr_rname

$arr_rname : 

Type

$arr_descr

$arr_descr : 

Type

Methods

getTree()

getTree() : array

wrapper : run process

Returns

array

formTree()

formTree() 

Create tree of Ips

getAllInterfaces()

getAllInterfaces() : array

Get intrfaces from DB

Returns

array

formSubnets()

formSubnets(  $arr_in) 

Create Subnets

Parameters

$arr_in

formNodes()

formNodes() 

Create nodes

formLeafs()

formLeafs() 

Create leafs of tree

getClassfulNet()

getClassfulNet(  $oct0) : string

Get Net cllsses

Parameters

$oct0

Returns

string

getClassNet()

getClassNet(  $btmask,   $btfb) : string

Get network classes using mask

Parameters

$btmask
$btfb

Returns

string

mask2cidr()

mask2cidr(  $mask) : integer

Convert mask to cidr

Parameters

$mask

Returns

integer

cidr_match()

cidr_match(  $ip,   $range) : boolean

Match cidr

Parameters

$ip
$range

Returns

boolean

getIPRange()

getIPRange(  $cidr) : array

Get ranges of IP

Parameters

$cidr

Returns

array

lastSort()

lastSort() 

Sort array of IP