Class Racket::L4::ICMPGeneric
In: lib/racket/l4/icmp.rb  (CVS)
Parent: RacketPart

Internet Control Message Protcol.

RFC792 (www.faqs.org/rfcs/rfc792.html)

Generic ICMP class from which all ICMP variants spawn. This should never be used directly.

Methods

checksum!   checksum?   fix!   new  

Constants

ICMP_TYPE_ECHO_REPLY = 0
ICMP_TYPE_DESTINATION_UNREACHABLE = 3
ICMP_TYPE_SOURCE_QUENCH = 4
ICMP_TYPE_REDIRECT = 5
ICMP_TYPE_ECHO_REQUEST = 8
ICMP_TYPE_MOBILE_IP_ADVERTISEMENT = 9
ICMP_TYPE_ROUTER_SOLICITATION = 10
ICMP_TYPE_TIME_EXCEEDED = 11
ICMP_TYPE_PARAMETER_PROBLEM = 12
ICMP_TYPE_TIMESTAMP_REQUEST = 13
ICMP_TYPE_TIMESTAMP_REPLY = 14
ICMP_TYPE_INFO_REQUEST = 15
ICMP_TYPE_INFO_REPLY = 16
ICMP_TYPE_ADDRESS_MASK_REQUEST = 17
ICMP_TYPE_ADDRESS_MASK_REPLY = 18

Attributes

checksum    Checksum
code    Code
message   
type    Type

Public Class methods

[Source]

# File lib/racket/l4/icmp.rb, line 65
  def initialize(*args)
    super(*args)
    @autofix = false
  end

Public Instance methods

compute and set the checksum for this ICMP packet

[Source]

# File lib/racket/l4/icmp.rb, line 72
  def checksum!
    self.checksum = compute_checksum
  end

check the checksum for this ICMP packet

[Source]

# File lib/racket/l4/icmp.rb, line 61
  def checksum?
    self.checksum == compute_checksum
  end

‘fix’ this ICMP packet up for sending. (really, just set the checksum)

[Source]

# File lib/racket/l4/icmp.rb, line 78
  def fix!
    self.checksum!
  end

[Validate]