lib/modules/range.inc

Properties

Description

Manages DHCP ranges for DHCP server.

Classes

range

Properties

 
 
modules  
No 
No 

Description

Manages DHCP ranges for DHCP server.
It implements the complete module interface and uses meta-data provided by the account modules for its functions.

Location and naming of modules
All LAM modules are placed in lib/modules/ and are named ".inc". E.g. if you create a new module and its class name is "qmail" then the filename would be "qmail.inc". The class name of a module must contain only a-z, A-Z, 0-9, -, and _.

You can avoid to override many functions by using {@link get_metaData()}.

All module classes should extend the baseModule class.

Methods

calculateSubnet, check_range, check_subnet_range, display_html_attributes, getButtonStatus, get_metaData, get_pdfEntries, load_Messages, load_attributes, overlaped_range, process_attributes, reload_ranges, reset_overlaped_range, save_attributes,

calculateSubnet( String   $ip, String   $mask, ) : n/a

Description

Calculates the subnet for a given IP and netmask.

Arguments

Name Type Description Default
$ip String

IP address

$mask String

network mask

Return value

Type Description
n/a n/a

check_range( String   $first_ip, String   $second_ip, ) : \true,

Description

Checks if the first IP is smaller than the second IP.

Arguments

Name Type Description Default
$first_ip String

first ip

$second_ip String

second ip

Return value

Type Description
\true, if it's a valid Range, else false;

check_subnet_range( String   $ip, String   $subnet, String   $mask, ) : true

Description

Check if an IP address is in the correct subnet.

Arguments

Name Type Description Default
$ip String

IP address

$subnet String

subnet

$mask String

network mask

Return value

Type Description
true if the range and subnet valid, else false

display_html_attributes( ) : \htmlElement

Description

Returns the HTML meta data for the main account page.

Return value

Type Description
\htmlElement HTML meta data

getButtonStatus( ) : string

Description

Controls if the module button the account page is visible and activated.

Return value

Type Description
string status ("enabled", "disabled", "hidden")

get_metaData( ) : array

Description

Returns meta data that is interpreted by parent class

Return value

Type Description
array array with meta data

Tags

Name Description
see

get_pdfEntries( ) : array

Description

Returns the PDF entries for this module.

Return value

Type Description
array list of possible PDF entries

load_Messages( ) : n/a

Description

This function fills the error message array with messages.

Return value

Type Description
n/a n/a

load_attributes( array   $attr, ) : n/a

Description

This function loads all needed LDAP attributes.

Arguments

Name Type Description Default
$attr array

list of attributes

Return value

Type Description
n/a n/a

overlaped_range(   $ip,   $ipB, ) : \false,

Description

Checked, if Ranges are overlaped.

Arguments

Name Type Description Default
$ip n/a
$ipB n/a

Return value

Type Description
\false, if overlaped, else true.

process_attributes( ) : array

Description

Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

Return value

Type Description
array list of info/error messages

reload_ranges( ) : \true,

Description

Adapt the Ranges with the subnet.

Return value

Type Description
\true, if ranges were edit.

reset_overlaped_range( ) : n/a

Description

Reset the overlaped_range() function

Return value

Type Description
n/a n/a

save_attributes( ) : array

Description

Returns a list of modifications which have to be made to the LDAP account.

Return value

Type Description
array list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/postModify actions)

Properties

$overlaped, $processed, $ranges, $subnet,

  public  $overlaped =

For check, if IPs overlaped.


  public  $processed =

Range -> Function attibute_processed already running?


  public  $ranges =

ranges


  public  $subnet =

subnet


Documentation was generated by phpDocumentor 2.1.0 .

Namespaces

  • global

    Packages