Source File
duplicate.go
Belonging Package
github.com/miekg/dns
package dns//go:generate go run duplicate_generate.go// IsDuplicate checks of r1 and r2 are duplicates of each other, excluding the TTL.// So this means the header data is equal *and* the RDATA is the same. Returns true// if so, otherwise false. It's a protocol violation to have identical RRs in a message.func (, RR) bool {// Check whether the record header is identical.if !.Header().isDuplicate(.Header()) {return false}// Check whether the RDATA is identical.return .isDuplicate()}func ( *RR_Header) ( RR) bool {, := .(*RR_Header)if ! {return false}if .Class != .Class {return false}if .Rrtype != .Rrtype {return false}if !isDuplicateName(.Name, .Name) {return false}// ignore TTLreturn true}// isDuplicateName checks if the domain names s1 and s2 are equal.func isDuplicateName(, string) bool { return equal(, ) }
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |