pf::config - PacketFence configuration
pf::config contains the code necessary to read and manipulate the PacketFence configuration files.
It automatically imports gazillions of globals into your namespace. You have been warned.
Read the following configuration files: log.conf, pf.conf, pf.conf.defaults, networks.conf, dhcp_fingerprints.conf, oui.txt, floating_network_device.conf.
Load configuration. Can be used to reload it too.
WARNING: This has been recently introduced and was not tested with our multi-threaded daemons.
Returns the number of seconds represented by the time period.
Months and years are approximate. Do not use for anything serious about time.
Calculate the unregdate from from specific trigger.
Returns a formatted date (YYYY-MM-DD HH:MM:SS).
We compute the unreg date dynamicaly If the year is lower than the current year, year is zero or not defined.
Calculate the beginning of the period.
Returns the number of seconds since the Epoch.
Calculate the number of seconds to reach the end of the period from the beginning of the period.
Returns true or false based on if vlan enforcement is enabled or not
Returns true or false based on if inline enforcement is enabled or not
Returns the type of a network. The call encapsulate the type configuration changes that we made.
Returns undef on unrecognized types.
Returns true if given network is of type vlan-registration and false otherwise.
Returns true if given network is of type vlan-isolation and false otherwise.
Returns true if given network is of type inline and false otherwise.
Searches for an item in a comma separated list of elements (like we do in our configuration files).
Returns true or false values based on if item was found or not.
Returns the virtual IP (vip) on a given interface.
First, if there's a vip parameter defined on the interface, we return that.
Othwerise, we assume that the vip has a /32 netmask and that's how we fetch it.
We return the first vip that matches the above criteria in decimal dotted notation (ex: 192.168.1.1). Undef if nothing is found.
Populate captive portal related configuration and constants.
Is the given configuration parameter considered enabled? y, yes, true, enable and enabled are all positive values for PacketFence.
Inverse inc. <info@inverse.ca>
Minor parts of this file may have been contributed. See CREDITS.
Copyright (C) 2005-2013 Inverse inc.
Copyright (C) 2005 Kevin Amorin
Copyright (C) 2005 David LaPorte
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.