The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::SixXS::Data::Tunnel - configuration data about a SixXS TIC tunnel

SYNOPSIS

  use Net::SixXS::Data::Tunnel;

  my $tun = Net::SixXS::Data::Tunnel->new(id => 'T00001', password => 'pass',
      type => 'ayiya', mtu => '1280',
      ipv6_local => '2001:0200:0:22::2', ipv6_pop => '2001:0200:0:22::1',
      ipv4_local => 'ayiya', ipv4_pop => '10.0.2.15');

  say for $tun->to_text_lines;
  # ...or...
  say $tun->to_text;

DESCRIPTION

The Net::SixXS::Data::Tunnel class encapsulates information about a SixXS IPv6-over-IPv4 tunnel as supplied by a TIC server. Its data members correspond to the fields in a TIC tunnel's description as used by e.g. the SixXS AICCU client tool.

ATTRIBUTES

The Net::SixXS::Data::Tunnel class has the following attributes with the corresponding full-text fields in the TIC protocol response:

id

TunnelId - the short text identifier of the tunnel, e.g. "T22928".

password

Password - the text string to be hashed and used as the authentication token in the AYIYA protocol packets.

type

Type - the short text identifier of the tunnel type, e.g. "ayiya".

mtu

Tunnel MTU - the network Maximum Transfer Unit for the tunnel.

ipv6_local

IPv6 Endpoint - the IPv6 address of the local tunnel endpoint.

ipv6_pop

IPv6 POP - the IPv6 address of the server's endpoint of the tunnel.

ipv4_local

IPv4 Endpoint - usually the string "ayiya", but sometimes an IPv4 address to be used as the local external tunnel endpoint.

ipv4_pop

IPv4 POP - an IPv4 address to connect to as the server's endpoint of the tunnel.

METHODS

The Net::SixXS::Data::Tunnel class contains the following methods for creating objects and examining the objects' data:

from_json (hashref)

Inherited from MooseX::Role::JSONObject.

Create a Net::SixXS::Data::Tunnel object with attributes specified as the full-text descriptions in the TIC protocol, e.g. IPv4 Endpoint for ipv4_local.

to_json ()

Inherited from MooseX::Role::JSONObject.

Store the data of a Net::SixXS::Data::Tunnel object into a hash with the full-text descriptions in the TIC protocols as key names.

to_text_lines ()

Return a reference to an array of text strings, each one representing a single attribute's TIC full-text name and value.

to_text ()

Return a string representing a text description of the tunnel: a line containing the tunnel identifier, then lines corresponding to each of the array elements from the to_text_lines() method.

SEE ALSO

The TIC client class: Net::SixXS::TIC::Client

The TIC server class: Net::SixXS::TIC::Server

LICENSE

Copyright (C) 2015 Peter Pentchev <roam@ringlet.net>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Peter Pentchev <roam@ringlet.net>