[Nagiosplug-devel] RFC adding functions to utils.pm

Voon, Ton Ton.Voon at egg.com
Mon Nov 22 04:03:08 CET 2004


Stanley,

If only two plugins would use this routine, would it be better in a separate
.pm to be pulled in by these two plugins?

Whatever you decide, I trust your judgement. 

Ton

-----Original Message-----
From: Stanley Hopcroft [mailto:Stanley.Hopcroft at IPAustralia.Gov.AU] 
Sent: 22 November 2004 06:11
To: nagiosplug-devel at lists.sourceforge.net
Subject: [Nagiosplug-devel] RFC adding functions to utils.pm


Dear Folks,

I would like to add two functions to utils.pm

sub tethereal2str ($$) # two scalar args
sub dump          ($)  # one scalar arg

tethereal2str($$) takes a string containing a 'tethereal' trace of one 
network packet and a string containing a hex byte and returns the 
string from that hex byte til the end of the trace, formatted as a Perl 
scalar containing a string of characters corresponding to the hex codes 
found in the trace.

This function is used by check_citrix and check_lotus (/contrib) to 
replay a packet to simulate some part of a real clients interaction with 
the server (this is only useful for protocols such as ICA and Lotus 
Notes that are both proprietary [& undocumented] and binary).

dump($) takes a scalar containing a string and outputs in the 
tethereal/hexdump -C style.

Ratioanale:

These functions are part of _two_ contributed (one of which at least is 
used) plugins that currently duplicate this code. Code duplication leads 
to inconsistency and minimises re-use.

Yours sincerely.

 -- 
Stanley Hopcroft

Network specialist, IT Infrastructure
IP Australia
Ph: (02) 6283 3189  Fax: (02) 6281 1353
PO Box 200 Woden  ACT 2606
http://www.ipaustralia.gov.au


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________________
Nagios Plugin Development Mailing List
Nagiosplug-devel at lists.sourceforge.net
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-----------------------------------------
This private and confidential e-mail has been sent to you by Egg.  The Egg
group of companies includes Egg Banking plc registered no. 2999842), Egg
Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd
(registered no. 3403963) which is authorised and regulated by the Financial
Services Authority. Egg Investments Ltd. is entered in the FSA register
under number 190518.     Registered in England and Wales. Registered
offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA.    If you
are not the intended recipient of this e-mail and have received it in
error, please notify the sender by replying with 'received in error' as the
subject and then delete it from your mailbox.





More information about the Devel mailing list