NetReg::Shared - HTML output services for NetReg
use Net::NetReg::Shared;
This module provides several functions that are shared by NetReg CGI scripts.
These include routines for reading input and writing files.
- append_host_entry( FORM, MAC )
-
Adds a host record to the DHCP hosts file.
- build_host_entry( FORM, MAC, HFLAG )
-
Builds a host record to be added to the DHCP hosts file.
- canonical_mac( MAC )
-
Returns the MAC in canonical form. Reports an error if the given MAC is
invalid.
- char2entity( STRREF)
-
Convert illegal characters in the given string reference to HTML entities.
check_allowed()
-
Checks if registrations from the client are allowed.
- check_blacklist( DATA )
-
Check the given data against the blacklist and display an error if found.
- dhcpd_search( LISTREF, HASHREF )
-
Scan the DHCPDCONF file and returns an array of parsed records that match
the given search criteria.
- entity2char( STRREF)
-
Convert HTML entities in the given string reference to regular characters.
- get_input( HASHREF )
-
Reads CGI input and stores it in the given hash reference.
- get_mac( IP )
-
Returns the MAC associated with the given IP. If no IP is given, use the $IP
variable.
iso8601()
-
Returns a string containing the current time in ISO 8601 format.
- leases_search( LISTREF, HASHREF )
-
Scan the DHCP leases file and returns an array of parsed records that match
the given search criteria.
- remove_registration( MAC, USERCHECK )
-
Removes a registration from the DHCP database.
- safe_open( FILE, MODE, LOCK )
-
Opens a file with advisory locking.
- validate_host( FORM, IGNORE )
-
Determines if a particular host entry may be added to the DHCP hosts file.