<<

NAME

pf::OMAPI

DESCRIPTION

pf::OMAPI

SYNOPSIS

    use pf::OMAPI;

    my $omapi = pf::OMAPI->new( key_name => 'pf_omapi_key',key_base64 => 'xJviCHiQKcDu6hk7+Ffa3A==', host => 'localhost', port => 7911);

    my $data = $omapi->lookup({'ip-address' => "10.229.25.247" });

ATTRIBUTES

host

host of dhcp server

port

port of the dhcp server

buffer

The reference to the buffer of message

sock

The socket used for communicating with the dhcpd server

connected

A check if we are connected to the omapi service

key_name

The name of the key

op

The current operation

msg

The current message to be sent

obj

The current obj to be sent

authid

The auth id to send

authlen

The length of signature

id

The current id of the message

key

The key used to sign messages

key

The key base64 representation of the key

SUBROUTINES/METHODS

_trigger_key_base64

The will set the key to the binary from the base 64 version of the key

_build_key

builds the key from base64 version of the key

connect

Will connect and authenticate to the omapi server

send_auth

send the auto info

lookup

Look up a message

send_msg

Sends the message to the dhcpd server

send

send the message

get_reply

get the reply of the message

_build_message

Builds the message from current data

_append_name_values

Appends a hash to the buffer to send

_build_sock

Creates a socket

_clear_buffer

Clear the buffer

_append_ints_buffer

Append a list of integers to the buffer

_pack_and_append

pack data and apeends it the buffer

parse_stream

Parse the omapi message from the given stream

parse_name_value

Parses the name value pair from the buffer

pack_ip_address

Packs the ipaddress from a string

pack_hardware_address

Packs the pack_hardware_address from a string

unpack_ip_address

unpacks the ip address from the buffer

unpack_hardware_address

unpacks the hardware from the buffer

_sign

Sign the message

AUTHOR

Inverse inc. <info@inverse.ca>

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

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.

<<