GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::SAP::PACKET (3)

.ds Aq ’

NAME

Net::SAP::Packet - A SAP Packet

CONTENTS

SYNOPSIS



  use Net::SAP::Packet;

  my $packet = new Net::SAP::Packet();

  $packet->type( advertisement );
  $packet->compressed( 0 );
  $packet->payload( $sdp_data );



DESCRIPTION

The Net::SAP::Packet class represents a single SAP Packet. It provides methods for getting and setting the properties of the packet.

    METHODS

<B>new( [$binary_data] )B> Creates a new Net::SAP::Packet object with default values for all the properties. Takes an optional parameter which is passed straight to parse() if given.
<B>parse( B>$binary_data<B> )B> Parses a binary packet (as received from the network) and stores its data in the object. Returns non-zero if the binary data is invalid.
<B>B>generate()<B>B> Generates a binary packet from the properties stored in the perl object. Returned undefined if there is a problem creating the packet. This method also calculates the message id hash field for the packet and compresses it if the compressed() field is set.
<B>B>origin_address_type()<B>B> Get or Set the family of the origin address (either ipv4 or ipv6).

Example:



        $type = $packet->origin_address_type();
        $packet->origin_address_type( ipv6 );



<B>B>origin_address()<B>B> Get or Set the origin address (IPv4 or IPv6 address of the host sending the packet). Be sure to also set the address type using origin_address_type().

Example:



        $origin = $packet->origin_address();
        $packet->origin_address( 152.78.104.83 );



<B>B>compressed()<B>B> Get or Set wether the packet was, or should be compressed. Note that the payload of the SAP packet should be no more than 1024 bytes. So compression should be used is the raw data is more than that.

Example:



        $compressed = $packet->compressed();
        $packet->compressed( 1 );



<B>B>type()<B>B> Get or Set the packet type - advertisement or deletion. A delete packet is used to instruct clients that a previously advertised session is now no longer valid.

Example:



        $type = $packet->type();
        $packet->type( advertisement );
        $packet->type( deletion );



<B>B>version()<B>B> Get the SAP version number of a received packet. Usually 1 or 0. See the end of RFC2974 for a description of the difference between packet versions. All packets created using Net::SAP are version 1.
<B>B>message_id_hash()<B>B> Get the Message ID Hash for the packet. The hash for a new packet is calculated when calling generate(). The hash is a 16-bit unsigned integer (0 to 65535).
<B>B>encrypted()<B>B> Gets whether a packet is encrypted or not. Note that Net::SAP can’t currently encrypt or de-crypt packets.
<B>B>encryption_key_length()<B>B> Gets the length of the packet’s encryption key. Note that Net::SAP can’t currently encrypt or decrypt packets.
<B>B>encryption_key()<B>B> Gets the encryption key for a packet. Returns undefined value if there is no encryption key for the packet. Note that Net::SAP can’t currently encrypt or de-crypt packets.
<B>B>payload_type()<B>B> Get or Set the packet’s payload type. This field should be a MIME type. The default MIME type for packets is ’application/sdp’.

Example:



        $mime = $packet->payload_type();
        $packet->payload_type( application/sdp );



<B>B>payload()<B>B> Get or Set the packet’s payload.

Example:



        $payload = $packet->payload();
        $packet->payload( $sdp_data );



SEE ALSO

Net::SAP, Net::SDP, perl(1)

<http://www.ietf.org/rfc/rfc2974.txt>

BUGS

Please report any bugs or feature requests to bug-net-sap@rt.cpan.org, or through the web interface at <http://rt.cpan.org>. I will be notified, and then you will automatically be notified of progress on your bug as I make changes.

AUTHOR

Nicholas Humfrey, njh@ecs.soton.ac.uk

COPYRIGHT AND LICENSE

Copyright (C) 2004-2006 University of Southampton

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.005 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::SAP::PACKET (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.