Acme-RFC4824

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Acme-RFC4824

0.02    2007/04/25
        - Corrected ASCII art that is incorrect in the RFC (see
          http://lists.mur.at/pipermail/ip-sfs/2007-April/000052.html)
        - fixed IPv6 support
        - added example scripts and documentation for them

0.01    2007/04/06
        - First version, does not support fragmenting, checksums or
          gzipped frames (yet).

lib/Acme/RFC4824.pm  view on Meta::CPAN

        croak "CRC 16 support not implemented (yet).";
    }
    elsif ($checksum > 1) {
        croak "Invalid checksum type";
    }

    my $framesize = $self->{default_framesize};
    if (exists $arg_ref->{FRAMESIZE}) {
        $framesize = $arg_ref->{FRAMESIZE};
    }
    # TODO - implement fragmenting
    # note: honor DF bit in IP packets
    if (length($packet) > $framesize) {
        croak "Fragmenting not implemented (yet).";
    }

    # TODO - implement support for gzipped frames
    my $gzip = $arg_ref->{GZIP};
    if ($gzip) {
        croak "GZIP support not implemented (yet).";
    }

lib/Acme/RFC4824.pm  view on Meta::CPAN


=item * 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).

=back

=head2 encode

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:

=over 4

=item * TYPE

Determines the output format. Can either be 'ASCII' or 'ASCII art'.

lib/Acme/RFC4824.pm  view on Meta::CPAN


The IP packet that you want to convert

=item * CHECKSUM (optional)

The checksum algorithm. Only 0 (no checksum) is implemented at the moment.

=item * 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.

=item * GZIP (optional)

Not implemented yet, meant to support the gzipped frame variant of RFC 4824.

=back

=head2 decode

Decodes one or more SFS frame into an IP datagram.



( run in 0.712 second using v1.01-cache-2.11-cpan-b16cb0d3907 )