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::PACKET::DESCL4 (3)

.ds Aq ’

NAME

Net::Packet::DescL4 - object for a transport layer (layer 4) descriptor

CONTENTS

SYNOPSIS



   require Net::Packet::DescL4;

   # Get NP_DESC_* constants
   use Net::Packet::Consts qw(:desc :layer);

   # Usually, you use it to send TCP and UDP frames over IPv4
   my $d4 = Net::Packet::DescL4->new(
      target   => 192.168.0.1,
      protocol => NP_DESC_IPPROTO_TCP,
      family   => NP_LAYER_IPv4,
   );

   $d4->send($rawStringToNetwork);



DESCRIPTION

See also <B>Net::Packet::DescB> for other attributes and methods.

ATTRIBUTES

<B>targetB> IPv4 address of the target host. You must set it to be able to send frames.
<B>protocolB> Transport protocol to use, see NP_DESC_IPPROTO_* constants in <B>Net::Packet::DescB>. You must set it to be able to send frames.
<B>familyB> The family address of <B>targetB> attribute. It is either <B>NP_LAYER_IPv4B> or <B>NP_LAYER_IPv6B>.

METHODS

<B>newB> Create the object, using default <B>B>$Env<B>B> object values for <B>devB>, <B>ipB>, <B>ip6B> and <B>macB> (see <B>Net::Packet::EnvB>). When the object is created, the <B>B>$Env<B>B> global object has its <B>descB> attributes set to it. You can avoid this behaviour by setting <B>noDescAutoSetB> in <B>B>$Env<B>B> object (see <B>Net::Packet::EnvB>).

Default values for attributes:

dev: $Env->dev

ip: $Env->ip

ip6: $Env->ip6

mac: $Env->mac

protocol: NP_DESC_IPPROTO_TCP

family: NP_LAYER_IPv4

<B>isFamilyIpv4B>
<B>isFamilyIpv6B>
<B>isFamilyIpB> - either one of two previous Helper method to know about the layer 3 type.
<B>isProtocolTcpB>
<B>isProtocolUdpB>
<B>isProtocolIcmpv4B> Returns if the protocol attribute is of specified type.

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Copyright (c) 2004-2009, Patrice <GomoR> Auffret

You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.

RELATED MODULES

NetPacket, Net::RawIP, Net::RawSock
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::PACKET::DESCL4 (3) 2009-11-09

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