Acme::RFC4824 - Internet Protocol over Semaphore Flag Signaling System (SFSS)
Version 0.01
This module is used to help you implement RFC 4824 - The Transmission of IP Datagrams over the Semaphore Flag Signaling System (SFSS).
It can be used to convert IP datagrams to SFS frames and the other way round. Furthemore, it can be used to display an ASCII art representation of the SFS frame.
use Acme::RFC4824; my $sfss = Acme::RFC4824->new(); # get IP datagram from somewhere (for example Net::Pcap) # print a representation of the SFS frame print $sfss->encode({ TYPE => 'ASCII art', PACKET => $datagram, }); # get an ASCII representation of the SFS frame my $sfs_frame = $sfss->encode({ TYPE => 'ASCII', PACKET => $datagram, }); # get an SFS frame from somewhere # (for example from someone signaling you) # get an IP datagram from the frame my $datagram = $sfss->decode({ FRAME => $frame, });
As this module is supposed to be used in an object oriented fashion, it does not export anything.
see new()
Constructs a new object for you. Takes the following named parameters:
DEFAULT_FRAMESIZE (optional)
The framesize in bytes that is used whenever the FRAMESIZE paramter is not given for encode. Defaults to 255 bytes (the maximum SFS frame size).
Encodes an IP datagram into one or more SFS frames. Currently, fragmenting is not (yet) supported, so it will always encode into one frame (or complain that the IP packet is too large to encode into one frame).
Takes the following named parameters:
TYPE
Determines the output format. Can either be 'ASCII' or 'ASCII art'. In the first case, a string representation of the SFS frame is returned. In the second case, an ASCII art representation is returned - as an array of ASCII art strings in list context or as the concatenation in scalar context.
PACKET
The IP packet that you want to convert
CHECKSUM (optional)
The checksum algorithm. Only 0 (no checksum) is implemented at the moment.
FRAMESIZE (optional)
The optional maximal frame size of the SFS frame. Will later be used to fragment, currently only limits the size of the packet you can encode.
GZIP (optional)
Not implemented yet, meant to support the gzipped frame variant of RFC 4824.
Decodes one or more SFS frame into an IP datagram.
FRAME
An ASCII representation of the SFS frame which you would like to decode into an IP datagram.
Read-only accessor for the attribute with the same name. Returns a hash reference that maps SFS ASCII characters to an ASCII art representation of the given character. There is probably no need to use this from the outside.
Read-only accessor for the attribute with the same name. Returns the default SFS framesize. There is probably no need to use this from the outside.
From Moose.pm: This is a method which provides access to the current class's meta-class. Only used internally.
Alexander Klink, <alech at cpan.org>
<alech at cpan.org>
Please report any bugs or feature requests to bug-acme-rfc4824 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-RFC4824. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-acme-rfc4824 at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Acme::RFC4824
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Acme-RFC4824
CPAN Ratings
http://cpanratings.perl.org/d/Acme-RFC4824
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-RFC4824
Search CPAN
http://search.cpan.org/dist/Acme-RFC4824
Thanks to the RFC 4824 authors for letting me use their ASCII art in this module.
Copyright 2007 Alexander Klink, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Acme::RFC4824, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::RFC4824
CPAN shell
perl -MCPAN -e shell install Acme::RFC4824
For more information on module installation, please visit the detailed CPAN module installation guide.