Class: Racket::L4::IGMPv1

Inherits:
RacketPart show all
Defined in:
lib/racket/l4/igmpv1.rb

Overview

Instance Attribute Summary

Attributes inherited from RacketPart

#autofix

Instance Method Summary collapse

Methods inherited from RacketPart

#autofix?, #initialize, #pretty

Constructor Details

This class inherits a constructor from Racket::RacketPart

Instance Method Details

#checksum!Object

Compute and set the checkum for this IGMP message



54
55
56
# File 'lib/racket/l4/igmpv1.rb', line 54

def checksum!
  self.checksum = compute_checksum
end

#checksum?Boolean

Check the checksum for this IGMP message

Returns:

  • (Boolean)


49
50
51
# File 'lib/racket/l4/igmpv1.rb', line 49

def checksum?
  self.checksum == 0 || (self.checksum == compute_checksum)
end

#fix!Object

Do whatever ‘fixing’ is neccessary in preparation for being sent



60
61
62
# File 'lib/racket/l4/igmpv1.rb', line 60

def fix!
  self.checksum!
end