See also B<Net::Frame::Layer> for other attributes and methods.
=head1 ATTRIBUTES
=over 4
=item B<id>
IP ID of the datagram.
=item B<ttl>
Time to live.
=item B<src>
=item B<dst>
Source and destination IP addresses.
=item B<protocol>
Of which type the layer 4 is.
=item B<checksum>
IP checksum.
=item B<flags>
IP Flags.
=item B<offset>
IP fragment offset.
=item B<version>
IP version, here it is 4.
=item B<tos>
Type of service flag.
=item B<length>
Total length in bytes of the packet, including IP headers (that is, layer 3 + layer 4 + layer 7).
=item B<hlen>
Header length in number of words, including IP options.
=item B<options>
IP options, as a hexadecimal string.
=item B<noFixLen>
Since the byte ordering of B<length> attribute varies from system to system, a subroutine inside this module detects which byte order to use. Sometimes, like when you build B<Net::Frame::Layer::8021Q> layers, you may have the need to avoid this. So set it to 1 in order to avoid fixing. Default is 0 (that is to fix).
=back
The following are inherited attributes. See B<Net::Frame::Layer> for more information.
=over 4
=item B<raw>
=item B<payload>
=item B<nextLayer>
=back
=head1 METHODS
=over 4
=item B<new>
=item B<new> (hash)
Object constructor. You can pass attributes that will overwrite default ones. See B<SYNOPSIS> for default values.
=item B<getHeaderLength>
Returns the header length in bytes, not including IP options.
=item B<getOptionsLength>
Returns the length in bytes of IP options. 0 if none.
=item B<computeLengths> ({ payloadLength => VALUE })
In order to compute lengths attributes within IPv4 header, you need to pass via a hashref the number of bytes contained in IPv4 payload (that is, the sum of all layers after the IPv4 one).
=item B<computeChecksums>
Computes the IPv4 checksum.
=back
The following are inherited methods. Some of them may be overriden in this layer, and some others may not be meaningful in this layer. See B<Net::Frame::Layer> for more information.
=over 4
=item B<layer>
=item B<computeLengths>
=item B<computeChecksums>
=item B<pack>
=item B<unpack>
=item B<encapsulate>
=item B<getLength>
=item B<getPayloadLength>
=item B<print>
=item B<dump>
=back
=head1 CONSTANTS
Load them: use Net::Frame::Layer::IPv4 qw(:consts);