Net::Peep::BC |
Net::Peep::BC - Perl extension for Peep: The Network Auralizer
use Net::Peep::BC; my $bc = new Net::Peep::BC;
Net::Peep::BC is a library for Peep: The Network Auralizer.
None by default.
PROT_MAJORVER
PROT_MINORVER
PROT_BCSERVER
PROT_BCCLIENT
PROT_SERVERSTILLALIVE
PROT_CLIENTSTILLALIVE
PROT_CLIENTEVENT
PROT_CLASSDELIM
%Leases
%Servers
%Defaults - Default values for options such as 'priority', 'volume', 'dither', 'sound'.
$Alarmtime - The amount of time (in seconds) between when the alarm handler (see the handlealarm method) is set and the SIGALRM signal is sent.
Note that this section is somewhat incomplete. More documentation will come soon.
new(%options) - Net::Peep::BC constructor. If an option is not specified in the %options argument, the equivalent value in the %Defaults class attributes is used.
assemble_bc_packet() - Assembles the BC packet. Duh.
logger() - Returns a Net::Peep::Log object used for log messages and debugging output.
send() - Sends a packet including information on sound, location, priority, volume etc. to each server specified in the %Servers hash.
sendout() - Used by send() to send the packet.
handlealarm() - Refreshes and purges the server list. Schedules the next SIGALRM signal to be issued in another $Alarmtime seconds.
updateserverlist() - Polls to see if any of the servers have sent alive broadcasts so that the server list can be updated.
purgeserverlist() - Removes servers from the server list if they have not sent an alive broadcast within their given expiration time.
addnewserver($server,$packet) - Adds the server $server based on information provided in the packet $packet. The server is only added if it does not exist in the %Servers hash. The server is pysically added by a call to the addserver method.
addserver($server,$leasemin,$leasesec) - Adds the server $server. The server is expired $leasemin minutes and $leasesec seconds after being added if it has not sent an alive message in the meantime. Sends the server a client BC packet.
updateserver($server,$packet) - Updates the expiration time for server $server. Sends the server a client still alive message.
initialize(%options) - Net::Peep::BC initializer. Called from the constructor. Performs the following actions:
o Sets instance attributes via the %options argument o Loads configuration information from configuration file information passed in through the %options argument o Opens a socket and broadcasts an 'alive' message o Starts up the alarm. Every $Alarmtime seconds, the alarm handler updates the server list.
Michael Gilfix <mgilfix@eecs.tufts.edu> Copyright (C) 2000
perl(1), peepd(1), Net::Peep::Dumb, Net::Peep::Log, Net::Peep::Parse, Net::Peep::Log.
You should have received a file COPYING containing license terms along with this program; if not, write to Michael Gilfix (mgilfix@eecs.tufts.edu) for a copy.
This version of Peep is open source; you can redistribute it and/or modify it under the terms listed in the file COPYING.
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.
$Log: Net::Peep::BC.html,v $
Revision 1.1 2001/04/23 10:19:14 starky
Commit in preparation for release 0.4.1.
o Altered package namespace of Peep clients to Net::Peep
at the suggestion of a CPAN administrator.
o Changed Peep::Client::Log to Net::Peep::Client::Logparser
and Peep::Client::System to Net::Peep::Client::Sysmonitor
for clarity.
o Made adjustments to documentation.
o Fixed miscellaneous bugs.
Revision 1.10 2001/04/18 05:27:04 starky Fixed bug #416872: An extra ``!'' is tacked onto the identifier list before the client sends out its class identifier string.
Revision 1.9 2001/04/17 06:46:21 starky Hopefully the last commit before submission of the Peep client library to the CPAN. Among the changes:
o The clients have been modified somewhat to more elagantly clean up pidfiles in response to sigint and sigterm signals. o Minor changes have been made to the documentation. o The Peep::Client module searches through a host of directories in order to find peep.conf if it is not immediately found in /etc or provided on the command line. o The make test script conf.t was modified to provide output during the testing process. o Changes files and test.pl files were added to prevent specious complaints during the make process.
Revision 1.8 2001/04/04 05:37:11 starky Added some debugging and made other transparent changes.
Revision 1.7 2001/03/31 07:51:34 mgilfix
Last major commit before the 0.4.0 release. All of the newly rewritten clients and libraries are now working and are nicely formatted. The server installation has been changed a bit so now peep.conf is generated from the template file during a configure - which brings us closer to having a work-out-of-the-box system.
Revision 1.7 2001/03/31 02:17:00 mgilfix Made the final adjustments to for the 0.4.0 release so everything now works. Lots of changes here: autodiscovery works in every situation now (client up, server starts & vice-versa), clients now shutdown elegantly with a SIGTERM or SIGINT and remove their pidfiles upon exit, broadcast and server definitions in the class definitions is now parsed correctly, the client libraries now parse the events so they can translate from names to internal numbers. There's probably some other changes in there but many were made :) Also reformatted all of the code, so it uses consistent indentation.
Revision 1.6 2001/03/30 18:34:12 starky Adjusted documentation and made some modifications to Peep::BC to handle autodiscovery differently. This is the last commit before the 0.4.0 release.
Revision 1.5 2001/03/28 02:41:48 starky Created a new client called 'pinger' which pings a set of hosts to check whether they are alive. Made some adjustments to the client modules to accomodate the new client.
Also fixed some trivial pre-0.4.0-launch bugs.
Revision 1.4 2001/03/27 00:44:19 starky Completed work on rearchitecting the Peep client API, modified client code to be consistent with the new API, and added and tested the sysmonitor client, which replaces the uptime client.
This is the last major commit prior to launching the new client code, though the API or architecture may undergo some initial changes following launch in response to comments or suggestions from the user and developer base.
Revision 1.3 2001/03/19 07:47:37 starky Fixed bugs in autodiscovery/noautodiscovery. Now both are supported by Peep::BC and both look relatively bug free. Wahoo!
Revision 1.2 2001/03/18 17:17:46 starky Finally got LogParser (now called logparser) running smoothly.
Revision 1.1 2001/03/16 18:31:59 starky Initial commit of some very broken code which will eventually comprise a rearchitecting of the Peep client libraries; most importantly, the Perl modules.
A detailed e-mail regarding this commit will be posted to the Peep develop list (peep-develop@lists.sourceforge.net)
Contact me (Collin Starkweather) at
collin.starkweather@colorado.edu
or
collin.starkweather@collinstarkweather.com
with any questions.
Net::Peep::BC |