Class: Racket::L4::IGMPv2

Inherits:
RacketPart show all
Defined in:
lib/racket/l4/igmpv2.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

Set the checksum of this IGMPv2 message



51
52
53
# File 'lib/racket/l4/igmpv2.rb', line 51

def checksum!
  self.checksum = compute_checksum
end

#checksum?Boolean

Is the checksum of this IGMPv2 message correct

Returns:

  • (Boolean)


46
47
48
# File 'lib/racket/l4/igmpv2.rb', line 46

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

#fix!Object

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



57
58
59
# File 'lib/racket/l4/igmpv2.rb', line 57

def fix!
  checksum!
end