Class PacketFu::IPv6Header
In: lib/packetfu/ipv6.rb
Parent: Struct.new(:ipv6_v, :ipv6_class, :ipv6_label, :ipv6_len, :ipv6_next, :ipv6_hop, :ipv6_src, :ipv6_dst, :body)

IPv6Header is complete IPv6 struct, used in IPv6Packet.

Header Definition

 Fixnum (4 bits)   :ipv6_v      Default: 6     # Versiom
 Fixnum (8 bits)   :ipv6_class  Defualt: 0     # Class
 Fixnum (20 bits)  :ipv6_label  Defualt: 0     # Label
 Int16             :ipv6_len    Default: calc  # Payload length
 Int8              :ipv6_next                  # Next Header
 Int8              :ipv6_hop    Default: 0xff  # Hop limit
 AddrIpv6          :ipv6_src
 AddrIpv6          :ipv6_dst
 String            :body

Methods

Included Modules

StructFu

Public Class methods

Public Instance methods

Calculates the payload length.

Getter for the traffic class.

Setter for the traffic class.

Get the destination address in a more readable form.

Set the destination address in a more readable form.

Getter for the destination address.

Setter for the destination address.

Getter for the hop limit.

Setter for the hop limit.

Getter for the flow label.

Setter for the flow label.

Getter for the payload length.

Setter for the payload length.

Getter for the next protocol header.

Setter for the next protocol header.

Recalculates the calculatable fields for this object.

Get the source address in a more readable form.

Set the source address in a more readable form.

Getter for the source address.

Setter for the source address.

Getter for the version (usually, 6).

Setter for the version (usually, 6).

Reads a string to populate the object.

Returns the object in string form.

[Validate]