func (header *Header) EqualsTo(otherHeader *Header) bool {
	if otherHeader == nil {
		return false
	}
	// TLVs only exist for version 2
	if header.Version == 2 && !bytes.Equal(header.rawTLVs, otherHeader.rawTLVs) {
		return false
	}
	if header.Version != otherHeader.Version || header.Command != otherHeader.Command || header.TransportProtocol != otherHeader.TransportProtocol {
		return false
	}
	// Return early for header with ProtocolVersionAndCommandLocal command, which contains no address information
	if header.Command == ProtocolVersionAndCommandLocal {
		return true
	}
	return header.SourceAddr.String() == otherHeader.SourceAddr.String() &&
		header.DestinationAddr.String() == otherHeader.DestinationAddr.String()
}
// EqualsTo returns true if headers are equivalent, false otherwise.
EqualsTo returns true if headers are equivalent, false otherwise.
// EqualsTo returns true if headers are equivalent false otherwise .
func (header *Header) EqualsTo(otherHeader *Header) bool {
	if otherHeader == nil {
		return false
	}
	if header.Version == 2 && !bytes.Equal(header.rawTLVs, otherHeader.rawTLVs) {
		return false
	}
	if header.Version != otherHeader.Version || header.Command != otherHeader.Command || header.TransportProtocol != otherHeader.TransportProtocol {
		return false
	}
	if header.Command == ProtocolVersionAndCommandLocal {
		return true
	}
	return header.SourceAddr.String() == otherHeader.SourceAddr.String() &&
		header.DestinationAddr.String() == otherHeader.DestinationAddr.String()
}
func ( header * Header ) EqualsTo ( otherHeader * Header ) bool { if otherHeader == nil { return false } if header . Version == 2 && ! bytes . Equal ( header . rawTLVs , otherHeader . rawTLVs ) { return false } if header . Version != otherHeader . Version || header . Command != otherHeader . Command || header . TransportProtocol != otherHeader . TransportProtocol { return false } if header . Command == ProtocolVersionAndCommandLocal { return true } return header . SourceAddr . String ( ) == otherHeader . SourceAddr . String ( ) && header . DestinationAddr . String ( ) == otherHeader . DestinationAddr . String ( ) }
EqualsTo returns true if headers are equivalent, false otherwise.
EqualsTo returns true if headers are equivalent false otherwise .
// TLVs only exist for version 2 // Return early for header with ProtocolVersionAndCommandLocal command, which contains no address information