<<

NAME

pf::iplog - Module to manage IP address <-> MAC address bindings

DESCRIPTION

pf::iplog contains the functions necessary to read and manage the DHCP information gathered by PacketFence on the network.

omapiCache

Get the OMAPI cache

ip2mac

Lookup for the MAC address of a given IP address

Returns '0' if no match

_ip2mac_omapi

Look for the MAC address of a given IP address in the DHCP leases using OMAPI

Not meant to be used outside of this class. Refer to pf::iplog::ip2mac

_ip2mac_sql

Look for the MAC address of a given IP address using the SQL 'iplog' table

Not meant to be used outside of this class. Refer to pf::iplog::ip2mac

mac2ip

Lookup for the IP address of a given MAC address

Returns '0' if no match

_mac2ip_omapi

Look for the IP address of a given MAC address in the DHCP leases using OMAPI

Not meant to be used outside of this class. Refer to pf::iplog::mac2ip

_mac2ip_sql

Look for the IP address of a given MAC address using the SQL 'iplog' table

Not meant to be used outside of this class. Refer to pf::iplog::mac2ip

iplog_history

Get the full iplog for a given IP address or MAC address.

TODO: Rename to 'history' once the "issue" with pfcmd is resolved. Also remove from the export...

_history_by_ip

Get the full iplog for a given IP address.

Not meant to be used outside of this class. Refer to pf::iplog::iplog_history

_history_by_mac

Get the full iplog for a given MAC address.

Not meant to be used outside of this class. Refer to pf::iplog::iplog_history

view

Consult the 'iplog' SQL table for a given IP address or MAC address.

Returns a single row for the given parameter.

_view_by_ip

Consult the 'iplog' SQL table for a given IP address.

Not meant to be used outside of this class. Refer to pf::iplog::view

_view_by_mac

Consult the 'iplog' SQL table for a given MAC address.

Not meant to be used outside of this class. Refer to pf::iplog::view

list_open

List all the current open 'iplog' SQL table entries (either for a given IP address, MAC address of both)

_list_open_by_ip

List all the current open 'iplog' SQL table entries for a given IP address

Not meant to be used outside of this class. Refer to pf::iplog::list_open

_list_open_by_mac

List all the current open 'iplog' SQL table entries for a given MAC address

Not meant to be used outside of this class. Refer to pf::iplog::list_open

_exists

Check if there is an existing 'iplog' table entry for the IP address.

Not meant to be used outside of this class.

open

Handle 'iplog' table "new" entries. Will take care of either adding or updating an entry.

_insert

Insert a new 'iplog' table entry.

Not meant to be used outside of this class. Refer to pf::iplog::open

_update

Update an existing 'iplog' table entry.

Please note that a trigger (iplog_insert_in_iplog_history_before_update_trigger) exists in the database schema to copy the old existing record into the 'iplog_history' table and adjust the end_time accordingly.

Not meant to be used outside of this class. Refer to pf::iplog::open

close

Close (update the end_time as of now) an existing 'iplog' table entry.

_get_omapi_client

Get the omapi client return undef if omapi is disabled

_lookup_cached_omapi

Will retrieve the lease from the cache or from the dhcpd server using omapi

_get_lease_from_omapi

Get the lease information using omapi

_expire_lease

Check if the lease has expired

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.

<<