<<

NAME

pf::node - module for node management.

DESCRIPTION

pf::node contains the functions necessary to manage node: creation, deletion, registration, expiration, read info, ...

CONFIGURATION AND ENVIRONMENT

Read the pf.conf configuration file.

SUBROUTINES

TODO: This list is incomlete

node_attributes

Returns information about a given MAC address (node)

It's a simpler and faster version of node_view with fewer fields returned.

node_attributes_with_fingerprint

Returns information about a given MAC address (node) with the DHCP fingerprint class as a string.

It's a simpler and faster version of node_view_with_fingerprint with fewer fields returned.

_node_view_old

Returning lots of information about a given MAC address (node)

DEPRECATED: This has been kept in case of regressions in the new node_view code. This code will disappear in 2013.

node_view

Returning lots of information about a given MAC address (node).

New implementation in 3.2.0.

* node_view_all - view all nodes based on several criterias

Warning: The connection_type field is translated into its human form before return.

node_view_with_fingerprint

DEPRECATED: This has been kept in case of regressions in the new node_attributes_with_fingerprint code. This code will disappear in 2013.

* nodes_maintenance - handling deregistration on node expiration and node grace

called by pfmon daemon every 10 maintenance interval (usually each 10 minutes)

nodes_registered_not_violators

Returns a list of MACs which are registered and don't have any open violation. Since trap violations stay open, this has the intended effect of getting all MACs which should be allowed through.

* node_update_bandwidth - update the bandwidth balance of a node

Updates the bandwidth balance of a node and close the violations that use the bandwidth trigger.

* node_mac_wakeup

Sub invoked each time a MAC as activity (eiher from dhcp or traps).

in: mac address

out: void

* is_node_voip

Is given MAC a VoIP Device or not?

in: mac address

* is_node_registered

Is given MAC registered or not?

in: mac address

* node_category_handling - assigns category_id based on provided data

expects category_id or category name in the form of category => 'name' or category_id => id

returns category_id, undef if no category was required or 0 if no category is found (which is a problem)

is_max_reg_nodes_reached

Performs the enforcement of the maximum number of registered nodes allowed per user for a specific role.

The MAC address is currently not used.

node_last_reg

Return the last mac that has been register May be sometimes usefull for custom

AUTHOR

Inverse inc. <info@inverse.ca>

Minor parts of this file may have been contributed. See CREDITS.

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

Copyright (C) 2005 Kevin Amorin

Copyright (C) 2005 David LaPorte

LICENSE

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.

<<