class Scriptroute::ICMP6unreach

Attributes

contents[R]

@return [IPv4] The packet header embedded within the ICMP unreachable error message.

Public Class Methods

new(string) click to toggle source

Can create an unreachable only from string contents, never from filling in fields given a size. param string [String] the contents of the received packet.

Calls superclass method Scriptroute::ICMP6::new
# File lib/scriptroute/packets.rb, line 860
def initialize(string) 
  # first four are code, type, checksum.
  # second four are undefined
  @contents = IPv6.creator(string[8..-1])
  super(string)
end

Public Instance Methods

marshal() click to toggle source

Cannot marshal an unreachable packet for transmission; raises an exception. @return [void]

# File lib/scriptroute/packets.rb, line 868
def marshal
  raise "not supported"
end
to_s() click to toggle source

@return [String] formats the packet and the embedded packet as a string.

Calls superclass method Scriptroute::ICMP6#to_s
# File lib/scriptroute/packets.rb, line 872
def to_s
  super + " ( " + @contents.to_s + " )"
end