zduplicate.go (21767B)
1 // Code generated by "go run duplicate_generate.go"; DO NOT EDIT. 2 3 package dns 4 5 // isDuplicate() functions 6 7 func (r1 *A) isDuplicate(_r2 RR) bool { 8 r2, ok := _r2.(*A) 9 if !ok { 10 return false 11 } 12 _ = r2 13 if !r1.A.Equal(r2.A) { 14 return false 15 } 16 return true 17 } 18 19 func (r1 *AAAA) isDuplicate(_r2 RR) bool { 20 r2, ok := _r2.(*AAAA) 21 if !ok { 22 return false 23 } 24 _ = r2 25 if !r1.AAAA.Equal(r2.AAAA) { 26 return false 27 } 28 return true 29 } 30 31 func (r1 *AFSDB) isDuplicate(_r2 RR) bool { 32 r2, ok := _r2.(*AFSDB) 33 if !ok { 34 return false 35 } 36 _ = r2 37 if r1.Subtype != r2.Subtype { 38 return false 39 } 40 if !isDuplicateName(r1.Hostname, r2.Hostname) { 41 return false 42 } 43 return true 44 } 45 46 func (r1 *AMTRELAY) isDuplicate(_r2 RR) bool { 47 r2, ok := _r2.(*AMTRELAY) 48 if !ok { 49 return false 50 } 51 _ = r2 52 if r1.Precedence != r2.Precedence { 53 return false 54 } 55 if r1.GatewayType != r2.GatewayType { 56 return false 57 } 58 switch r1.GatewayType { 59 case IPSECGatewayIPv4, IPSECGatewayIPv6: 60 if !r1.GatewayAddr.Equal(r2.GatewayAddr) { 61 return false 62 } 63 case IPSECGatewayHost: 64 if !isDuplicateName(r1.GatewayHost, r2.GatewayHost) { 65 return false 66 } 67 } 68 69 return true 70 } 71 72 func (r1 *ANY) isDuplicate(_r2 RR) bool { 73 r2, ok := _r2.(*ANY) 74 if !ok { 75 return false 76 } 77 _ = r2 78 return true 79 } 80 81 func (r1 *APL) isDuplicate(_r2 RR) bool { 82 r2, ok := _r2.(*APL) 83 if !ok { 84 return false 85 } 86 _ = r2 87 if len(r1.Prefixes) != len(r2.Prefixes) { 88 return false 89 } 90 for i := 0; i < len(r1.Prefixes); i++ { 91 if !r1.Prefixes[i].equals(&r2.Prefixes[i]) { 92 return false 93 } 94 } 95 return true 96 } 97 98 func (r1 *AVC) isDuplicate(_r2 RR) bool { 99 r2, ok := _r2.(*AVC) 100 if !ok { 101 return false 102 } 103 _ = r2 104 if len(r1.Txt) != len(r2.Txt) { 105 return false 106 } 107 for i := 0; i < len(r1.Txt); i++ { 108 if r1.Txt[i] != r2.Txt[i] { 109 return false 110 } 111 } 112 return true 113 } 114 115 func (r1 *CAA) isDuplicate(_r2 RR) bool { 116 r2, ok := _r2.(*CAA) 117 if !ok { 118 return false 119 } 120 _ = r2 121 if r1.Flag != r2.Flag { 122 return false 123 } 124 if r1.Tag != r2.Tag { 125 return false 126 } 127 if r1.Value != r2.Value { 128 return false 129 } 130 return true 131 } 132 133 func (r1 *CDNSKEY) isDuplicate(_r2 RR) bool { 134 r2, ok := _r2.(*CDNSKEY) 135 if !ok { 136 return false 137 } 138 _ = r2 139 if r1.Flags != r2.Flags { 140 return false 141 } 142 if r1.Protocol != r2.Protocol { 143 return false 144 } 145 if r1.Algorithm != r2.Algorithm { 146 return false 147 } 148 if r1.PublicKey != r2.PublicKey { 149 return false 150 } 151 return true 152 } 153 154 func (r1 *CDS) isDuplicate(_r2 RR) bool { 155 r2, ok := _r2.(*CDS) 156 if !ok { 157 return false 158 } 159 _ = r2 160 if r1.KeyTag != r2.KeyTag { 161 return false 162 } 163 if r1.Algorithm != r2.Algorithm { 164 return false 165 } 166 if r1.DigestType != r2.DigestType { 167 return false 168 } 169 if r1.Digest != r2.Digest { 170 return false 171 } 172 return true 173 } 174 175 func (r1 *CERT) isDuplicate(_r2 RR) bool { 176 r2, ok := _r2.(*CERT) 177 if !ok { 178 return false 179 } 180 _ = r2 181 if r1.Type != r2.Type { 182 return false 183 } 184 if r1.KeyTag != r2.KeyTag { 185 return false 186 } 187 if r1.Algorithm != r2.Algorithm { 188 return false 189 } 190 if r1.Certificate != r2.Certificate { 191 return false 192 } 193 return true 194 } 195 196 func (r1 *CNAME) isDuplicate(_r2 RR) bool { 197 r2, ok := _r2.(*CNAME) 198 if !ok { 199 return false 200 } 201 _ = r2 202 if !isDuplicateName(r1.Target, r2.Target) { 203 return false 204 } 205 return true 206 } 207 208 func (r1 *CSYNC) isDuplicate(_r2 RR) bool { 209 r2, ok := _r2.(*CSYNC) 210 if !ok { 211 return false 212 } 213 _ = r2 214 if r1.Serial != r2.Serial { 215 return false 216 } 217 if r1.Flags != r2.Flags { 218 return false 219 } 220 if len(r1.TypeBitMap) != len(r2.TypeBitMap) { 221 return false 222 } 223 for i := 0; i < len(r1.TypeBitMap); i++ { 224 if r1.TypeBitMap[i] != r2.TypeBitMap[i] { 225 return false 226 } 227 } 228 return true 229 } 230 231 func (r1 *DHCID) isDuplicate(_r2 RR) bool { 232 r2, ok := _r2.(*DHCID) 233 if !ok { 234 return false 235 } 236 _ = r2 237 if r1.Digest != r2.Digest { 238 return false 239 } 240 return true 241 } 242 243 func (r1 *DLV) isDuplicate(_r2 RR) bool { 244 r2, ok := _r2.(*DLV) 245 if !ok { 246 return false 247 } 248 _ = r2 249 if r1.KeyTag != r2.KeyTag { 250 return false 251 } 252 if r1.Algorithm != r2.Algorithm { 253 return false 254 } 255 if r1.DigestType != r2.DigestType { 256 return false 257 } 258 if r1.Digest != r2.Digest { 259 return false 260 } 261 return true 262 } 263 264 func (r1 *DNAME) isDuplicate(_r2 RR) bool { 265 r2, ok := _r2.(*DNAME) 266 if !ok { 267 return false 268 } 269 _ = r2 270 if !isDuplicateName(r1.Target, r2.Target) { 271 return false 272 } 273 return true 274 } 275 276 func (r1 *DNSKEY) isDuplicate(_r2 RR) bool { 277 r2, ok := _r2.(*DNSKEY) 278 if !ok { 279 return false 280 } 281 _ = r2 282 if r1.Flags != r2.Flags { 283 return false 284 } 285 if r1.Protocol != r2.Protocol { 286 return false 287 } 288 if r1.Algorithm != r2.Algorithm { 289 return false 290 } 291 if r1.PublicKey != r2.PublicKey { 292 return false 293 } 294 return true 295 } 296 297 func (r1 *DS) isDuplicate(_r2 RR) bool { 298 r2, ok := _r2.(*DS) 299 if !ok { 300 return false 301 } 302 _ = r2 303 if r1.KeyTag != r2.KeyTag { 304 return false 305 } 306 if r1.Algorithm != r2.Algorithm { 307 return false 308 } 309 if r1.DigestType != r2.DigestType { 310 return false 311 } 312 if r1.Digest != r2.Digest { 313 return false 314 } 315 return true 316 } 317 318 func (r1 *EID) isDuplicate(_r2 RR) bool { 319 r2, ok := _r2.(*EID) 320 if !ok { 321 return false 322 } 323 _ = r2 324 if r1.Endpoint != r2.Endpoint { 325 return false 326 } 327 return true 328 } 329 330 func (r1 *EUI48) isDuplicate(_r2 RR) bool { 331 r2, ok := _r2.(*EUI48) 332 if !ok { 333 return false 334 } 335 _ = r2 336 if r1.Address != r2.Address { 337 return false 338 } 339 return true 340 } 341 342 func (r1 *EUI64) isDuplicate(_r2 RR) bool { 343 r2, ok := _r2.(*EUI64) 344 if !ok { 345 return false 346 } 347 _ = r2 348 if r1.Address != r2.Address { 349 return false 350 } 351 return true 352 } 353 354 func (r1 *GID) isDuplicate(_r2 RR) bool { 355 r2, ok := _r2.(*GID) 356 if !ok { 357 return false 358 } 359 _ = r2 360 if r1.Gid != r2.Gid { 361 return false 362 } 363 return true 364 } 365 366 func (r1 *GPOS) isDuplicate(_r2 RR) bool { 367 r2, ok := _r2.(*GPOS) 368 if !ok { 369 return false 370 } 371 _ = r2 372 if r1.Longitude != r2.Longitude { 373 return false 374 } 375 if r1.Latitude != r2.Latitude { 376 return false 377 } 378 if r1.Altitude != r2.Altitude { 379 return false 380 } 381 return true 382 } 383 384 func (r1 *HINFO) isDuplicate(_r2 RR) bool { 385 r2, ok := _r2.(*HINFO) 386 if !ok { 387 return false 388 } 389 _ = r2 390 if r1.Cpu != r2.Cpu { 391 return false 392 } 393 if r1.Os != r2.Os { 394 return false 395 } 396 return true 397 } 398 399 func (r1 *HIP) isDuplicate(_r2 RR) bool { 400 r2, ok := _r2.(*HIP) 401 if !ok { 402 return false 403 } 404 _ = r2 405 if r1.HitLength != r2.HitLength { 406 return false 407 } 408 if r1.PublicKeyAlgorithm != r2.PublicKeyAlgorithm { 409 return false 410 } 411 if r1.PublicKeyLength != r2.PublicKeyLength { 412 return false 413 } 414 if r1.Hit != r2.Hit { 415 return false 416 } 417 if r1.PublicKey != r2.PublicKey { 418 return false 419 } 420 if len(r1.RendezvousServers) != len(r2.RendezvousServers) { 421 return false 422 } 423 for i := 0; i < len(r1.RendezvousServers); i++ { 424 if !isDuplicateName(r1.RendezvousServers[i], r2.RendezvousServers[i]) { 425 return false 426 } 427 } 428 return true 429 } 430 431 func (r1 *HTTPS) isDuplicate(_r2 RR) bool { 432 r2, ok := _r2.(*HTTPS) 433 if !ok { 434 return false 435 } 436 _ = r2 437 if r1.Priority != r2.Priority { 438 return false 439 } 440 if !isDuplicateName(r1.Target, r2.Target) { 441 return false 442 } 443 if len(r1.Value) != len(r2.Value) { 444 return false 445 } 446 if !areSVCBPairArraysEqual(r1.Value, r2.Value) { 447 return false 448 } 449 return true 450 } 451 452 func (r1 *IPSECKEY) isDuplicate(_r2 RR) bool { 453 r2, ok := _r2.(*IPSECKEY) 454 if !ok { 455 return false 456 } 457 _ = r2 458 if r1.Precedence != r2.Precedence { 459 return false 460 } 461 if r1.GatewayType != r2.GatewayType { 462 return false 463 } 464 if r1.Algorithm != r2.Algorithm { 465 return false 466 } 467 switch r1.GatewayType { 468 case IPSECGatewayIPv4, IPSECGatewayIPv6: 469 if !r1.GatewayAddr.Equal(r2.GatewayAddr) { 470 return false 471 } 472 case IPSECGatewayHost: 473 if !isDuplicateName(r1.GatewayHost, r2.GatewayHost) { 474 return false 475 } 476 } 477 478 if r1.PublicKey != r2.PublicKey { 479 return false 480 } 481 return true 482 } 483 484 func (r1 *KEY) isDuplicate(_r2 RR) bool { 485 r2, ok := _r2.(*KEY) 486 if !ok { 487 return false 488 } 489 _ = r2 490 if r1.Flags != r2.Flags { 491 return false 492 } 493 if r1.Protocol != r2.Protocol { 494 return false 495 } 496 if r1.Algorithm != r2.Algorithm { 497 return false 498 } 499 if r1.PublicKey != r2.PublicKey { 500 return false 501 } 502 return true 503 } 504 505 func (r1 *KX) isDuplicate(_r2 RR) bool { 506 r2, ok := _r2.(*KX) 507 if !ok { 508 return false 509 } 510 _ = r2 511 if r1.Preference != r2.Preference { 512 return false 513 } 514 if !isDuplicateName(r1.Exchanger, r2.Exchanger) { 515 return false 516 } 517 return true 518 } 519 520 func (r1 *L32) isDuplicate(_r2 RR) bool { 521 r2, ok := _r2.(*L32) 522 if !ok { 523 return false 524 } 525 _ = r2 526 if r1.Preference != r2.Preference { 527 return false 528 } 529 if !r1.Locator32.Equal(r2.Locator32) { 530 return false 531 } 532 return true 533 } 534 535 func (r1 *L64) isDuplicate(_r2 RR) bool { 536 r2, ok := _r2.(*L64) 537 if !ok { 538 return false 539 } 540 _ = r2 541 if r1.Preference != r2.Preference { 542 return false 543 } 544 if r1.Locator64 != r2.Locator64 { 545 return false 546 } 547 return true 548 } 549 550 func (r1 *LOC) isDuplicate(_r2 RR) bool { 551 r2, ok := _r2.(*LOC) 552 if !ok { 553 return false 554 } 555 _ = r2 556 if r1.Version != r2.Version { 557 return false 558 } 559 if r1.Size != r2.Size { 560 return false 561 } 562 if r1.HorizPre != r2.HorizPre { 563 return false 564 } 565 if r1.VertPre != r2.VertPre { 566 return false 567 } 568 if r1.Latitude != r2.Latitude { 569 return false 570 } 571 if r1.Longitude != r2.Longitude { 572 return false 573 } 574 if r1.Altitude != r2.Altitude { 575 return false 576 } 577 return true 578 } 579 580 func (r1 *LP) isDuplicate(_r2 RR) bool { 581 r2, ok := _r2.(*LP) 582 if !ok { 583 return false 584 } 585 _ = r2 586 if r1.Preference != r2.Preference { 587 return false 588 } 589 if !isDuplicateName(r1.Fqdn, r2.Fqdn) { 590 return false 591 } 592 return true 593 } 594 595 func (r1 *MB) isDuplicate(_r2 RR) bool { 596 r2, ok := _r2.(*MB) 597 if !ok { 598 return false 599 } 600 _ = r2 601 if !isDuplicateName(r1.Mb, r2.Mb) { 602 return false 603 } 604 return true 605 } 606 607 func (r1 *MD) isDuplicate(_r2 RR) bool { 608 r2, ok := _r2.(*MD) 609 if !ok { 610 return false 611 } 612 _ = r2 613 if !isDuplicateName(r1.Md, r2.Md) { 614 return false 615 } 616 return true 617 } 618 619 func (r1 *MF) isDuplicate(_r2 RR) bool { 620 r2, ok := _r2.(*MF) 621 if !ok { 622 return false 623 } 624 _ = r2 625 if !isDuplicateName(r1.Mf, r2.Mf) { 626 return false 627 } 628 return true 629 } 630 631 func (r1 *MG) isDuplicate(_r2 RR) bool { 632 r2, ok := _r2.(*MG) 633 if !ok { 634 return false 635 } 636 _ = r2 637 if !isDuplicateName(r1.Mg, r2.Mg) { 638 return false 639 } 640 return true 641 } 642 643 func (r1 *MINFO) isDuplicate(_r2 RR) bool { 644 r2, ok := _r2.(*MINFO) 645 if !ok { 646 return false 647 } 648 _ = r2 649 if !isDuplicateName(r1.Rmail, r2.Rmail) { 650 return false 651 } 652 if !isDuplicateName(r1.Email, r2.Email) { 653 return false 654 } 655 return true 656 } 657 658 func (r1 *MR) isDuplicate(_r2 RR) bool { 659 r2, ok := _r2.(*MR) 660 if !ok { 661 return false 662 } 663 _ = r2 664 if !isDuplicateName(r1.Mr, r2.Mr) { 665 return false 666 } 667 return true 668 } 669 670 func (r1 *MX) isDuplicate(_r2 RR) bool { 671 r2, ok := _r2.(*MX) 672 if !ok { 673 return false 674 } 675 _ = r2 676 if r1.Preference != r2.Preference { 677 return false 678 } 679 if !isDuplicateName(r1.Mx, r2.Mx) { 680 return false 681 } 682 return true 683 } 684 685 func (r1 *NAPTR) isDuplicate(_r2 RR) bool { 686 r2, ok := _r2.(*NAPTR) 687 if !ok { 688 return false 689 } 690 _ = r2 691 if r1.Order != r2.Order { 692 return false 693 } 694 if r1.Preference != r2.Preference { 695 return false 696 } 697 if r1.Flags != r2.Flags { 698 return false 699 } 700 if r1.Service != r2.Service { 701 return false 702 } 703 if r1.Regexp != r2.Regexp { 704 return false 705 } 706 if !isDuplicateName(r1.Replacement, r2.Replacement) { 707 return false 708 } 709 return true 710 } 711 712 func (r1 *NID) isDuplicate(_r2 RR) bool { 713 r2, ok := _r2.(*NID) 714 if !ok { 715 return false 716 } 717 _ = r2 718 if r1.Preference != r2.Preference { 719 return false 720 } 721 if r1.NodeID != r2.NodeID { 722 return false 723 } 724 return true 725 } 726 727 func (r1 *NIMLOC) isDuplicate(_r2 RR) bool { 728 r2, ok := _r2.(*NIMLOC) 729 if !ok { 730 return false 731 } 732 _ = r2 733 if r1.Locator != r2.Locator { 734 return false 735 } 736 return true 737 } 738 739 func (r1 *NINFO) isDuplicate(_r2 RR) bool { 740 r2, ok := _r2.(*NINFO) 741 if !ok { 742 return false 743 } 744 _ = r2 745 if len(r1.ZSData) != len(r2.ZSData) { 746 return false 747 } 748 for i := 0; i < len(r1.ZSData); i++ { 749 if r1.ZSData[i] != r2.ZSData[i] { 750 return false 751 } 752 } 753 return true 754 } 755 756 func (r1 *NS) isDuplicate(_r2 RR) bool { 757 r2, ok := _r2.(*NS) 758 if !ok { 759 return false 760 } 761 _ = r2 762 if !isDuplicateName(r1.Ns, r2.Ns) { 763 return false 764 } 765 return true 766 } 767 768 func (r1 *NSAPPTR) isDuplicate(_r2 RR) bool { 769 r2, ok := _r2.(*NSAPPTR) 770 if !ok { 771 return false 772 } 773 _ = r2 774 if !isDuplicateName(r1.Ptr, r2.Ptr) { 775 return false 776 } 777 return true 778 } 779 780 func (r1 *NSEC) isDuplicate(_r2 RR) bool { 781 r2, ok := _r2.(*NSEC) 782 if !ok { 783 return false 784 } 785 _ = r2 786 if !isDuplicateName(r1.NextDomain, r2.NextDomain) { 787 return false 788 } 789 if len(r1.TypeBitMap) != len(r2.TypeBitMap) { 790 return false 791 } 792 for i := 0; i < len(r1.TypeBitMap); i++ { 793 if r1.TypeBitMap[i] != r2.TypeBitMap[i] { 794 return false 795 } 796 } 797 return true 798 } 799 800 func (r1 *NSEC3) isDuplicate(_r2 RR) bool { 801 r2, ok := _r2.(*NSEC3) 802 if !ok { 803 return false 804 } 805 _ = r2 806 if r1.Hash != r2.Hash { 807 return false 808 } 809 if r1.Flags != r2.Flags { 810 return false 811 } 812 if r1.Iterations != r2.Iterations { 813 return false 814 } 815 if r1.SaltLength != r2.SaltLength { 816 return false 817 } 818 if r1.Salt != r2.Salt { 819 return false 820 } 821 if r1.HashLength != r2.HashLength { 822 return false 823 } 824 if r1.NextDomain != r2.NextDomain { 825 return false 826 } 827 if len(r1.TypeBitMap) != len(r2.TypeBitMap) { 828 return false 829 } 830 for i := 0; i < len(r1.TypeBitMap); i++ { 831 if r1.TypeBitMap[i] != r2.TypeBitMap[i] { 832 return false 833 } 834 } 835 return true 836 } 837 838 func (r1 *NSEC3PARAM) isDuplicate(_r2 RR) bool { 839 r2, ok := _r2.(*NSEC3PARAM) 840 if !ok { 841 return false 842 } 843 _ = r2 844 if r1.Hash != r2.Hash { 845 return false 846 } 847 if r1.Flags != r2.Flags { 848 return false 849 } 850 if r1.Iterations != r2.Iterations { 851 return false 852 } 853 if r1.SaltLength != r2.SaltLength { 854 return false 855 } 856 if r1.Salt != r2.Salt { 857 return false 858 } 859 return true 860 } 861 862 func (r1 *NULL) isDuplicate(_r2 RR) bool { 863 r2, ok := _r2.(*NULL) 864 if !ok { 865 return false 866 } 867 _ = r2 868 if r1.Data != r2.Data { 869 return false 870 } 871 return true 872 } 873 874 func (r1 *OPENPGPKEY) isDuplicate(_r2 RR) bool { 875 r2, ok := _r2.(*OPENPGPKEY) 876 if !ok { 877 return false 878 } 879 _ = r2 880 if r1.PublicKey != r2.PublicKey { 881 return false 882 } 883 return true 884 } 885 886 func (r1 *PTR) isDuplicate(_r2 RR) bool { 887 r2, ok := _r2.(*PTR) 888 if !ok { 889 return false 890 } 891 _ = r2 892 if !isDuplicateName(r1.Ptr, r2.Ptr) { 893 return false 894 } 895 return true 896 } 897 898 func (r1 *PX) isDuplicate(_r2 RR) bool { 899 r2, ok := _r2.(*PX) 900 if !ok { 901 return false 902 } 903 _ = r2 904 if r1.Preference != r2.Preference { 905 return false 906 } 907 if !isDuplicateName(r1.Map822, r2.Map822) { 908 return false 909 } 910 if !isDuplicateName(r1.Mapx400, r2.Mapx400) { 911 return false 912 } 913 return true 914 } 915 916 func (r1 *RFC3597) isDuplicate(_r2 RR) bool { 917 r2, ok := _r2.(*RFC3597) 918 if !ok { 919 return false 920 } 921 _ = r2 922 if r1.Rdata != r2.Rdata { 923 return false 924 } 925 return true 926 } 927 928 func (r1 *RKEY) isDuplicate(_r2 RR) bool { 929 r2, ok := _r2.(*RKEY) 930 if !ok { 931 return false 932 } 933 _ = r2 934 if r1.Flags != r2.Flags { 935 return false 936 } 937 if r1.Protocol != r2.Protocol { 938 return false 939 } 940 if r1.Algorithm != r2.Algorithm { 941 return false 942 } 943 if r1.PublicKey != r2.PublicKey { 944 return false 945 } 946 return true 947 } 948 949 func (r1 *RP) isDuplicate(_r2 RR) bool { 950 r2, ok := _r2.(*RP) 951 if !ok { 952 return false 953 } 954 _ = r2 955 if !isDuplicateName(r1.Mbox, r2.Mbox) { 956 return false 957 } 958 if !isDuplicateName(r1.Txt, r2.Txt) { 959 return false 960 } 961 return true 962 } 963 964 func (r1 *RRSIG) isDuplicate(_r2 RR) bool { 965 r2, ok := _r2.(*RRSIG) 966 if !ok { 967 return false 968 } 969 _ = r2 970 if r1.TypeCovered != r2.TypeCovered { 971 return false 972 } 973 if r1.Algorithm != r2.Algorithm { 974 return false 975 } 976 if r1.Labels != r2.Labels { 977 return false 978 } 979 if r1.OrigTtl != r2.OrigTtl { 980 return false 981 } 982 if r1.Expiration != r2.Expiration { 983 return false 984 } 985 if r1.Inception != r2.Inception { 986 return false 987 } 988 if r1.KeyTag != r2.KeyTag { 989 return false 990 } 991 if !isDuplicateName(r1.SignerName, r2.SignerName) { 992 return false 993 } 994 if r1.Signature != r2.Signature { 995 return false 996 } 997 return true 998 } 999 1000 func (r1 *RT) isDuplicate(_r2 RR) bool { 1001 r2, ok := _r2.(*RT) 1002 if !ok { 1003 return false 1004 } 1005 _ = r2 1006 if r1.Preference != r2.Preference { 1007 return false 1008 } 1009 if !isDuplicateName(r1.Host, r2.Host) { 1010 return false 1011 } 1012 return true 1013 } 1014 1015 func (r1 *SIG) isDuplicate(_r2 RR) bool { 1016 r2, ok := _r2.(*SIG) 1017 if !ok { 1018 return false 1019 } 1020 _ = r2 1021 if r1.TypeCovered != r2.TypeCovered { 1022 return false 1023 } 1024 if r1.Algorithm != r2.Algorithm { 1025 return false 1026 } 1027 if r1.Labels != r2.Labels { 1028 return false 1029 } 1030 if r1.OrigTtl != r2.OrigTtl { 1031 return false 1032 } 1033 if r1.Expiration != r2.Expiration { 1034 return false 1035 } 1036 if r1.Inception != r2.Inception { 1037 return false 1038 } 1039 if r1.KeyTag != r2.KeyTag { 1040 return false 1041 } 1042 if !isDuplicateName(r1.SignerName, r2.SignerName) { 1043 return false 1044 } 1045 if r1.Signature != r2.Signature { 1046 return false 1047 } 1048 return true 1049 } 1050 1051 func (r1 *SMIMEA) isDuplicate(_r2 RR) bool { 1052 r2, ok := _r2.(*SMIMEA) 1053 if !ok { 1054 return false 1055 } 1056 _ = r2 1057 if r1.Usage != r2.Usage { 1058 return false 1059 } 1060 if r1.Selector != r2.Selector { 1061 return false 1062 } 1063 if r1.MatchingType != r2.MatchingType { 1064 return false 1065 } 1066 if r1.Certificate != r2.Certificate { 1067 return false 1068 } 1069 return true 1070 } 1071 1072 func (r1 *SOA) isDuplicate(_r2 RR) bool { 1073 r2, ok := _r2.(*SOA) 1074 if !ok { 1075 return false 1076 } 1077 _ = r2 1078 if !isDuplicateName(r1.Ns, r2.Ns) { 1079 return false 1080 } 1081 if !isDuplicateName(r1.Mbox, r2.Mbox) { 1082 return false 1083 } 1084 if r1.Serial != r2.Serial { 1085 return false 1086 } 1087 if r1.Refresh != r2.Refresh { 1088 return false 1089 } 1090 if r1.Retry != r2.Retry { 1091 return false 1092 } 1093 if r1.Expire != r2.Expire { 1094 return false 1095 } 1096 if r1.Minttl != r2.Minttl { 1097 return false 1098 } 1099 return true 1100 } 1101 1102 func (r1 *SPF) isDuplicate(_r2 RR) bool { 1103 r2, ok := _r2.(*SPF) 1104 if !ok { 1105 return false 1106 } 1107 _ = r2 1108 if len(r1.Txt) != len(r2.Txt) { 1109 return false 1110 } 1111 for i := 0; i < len(r1.Txt); i++ { 1112 if r1.Txt[i] != r2.Txt[i] { 1113 return false 1114 } 1115 } 1116 return true 1117 } 1118 1119 func (r1 *SRV) isDuplicate(_r2 RR) bool { 1120 r2, ok := _r2.(*SRV) 1121 if !ok { 1122 return false 1123 } 1124 _ = r2 1125 if r1.Priority != r2.Priority { 1126 return false 1127 } 1128 if r1.Weight != r2.Weight { 1129 return false 1130 } 1131 if r1.Port != r2.Port { 1132 return false 1133 } 1134 if !isDuplicateName(r1.Target, r2.Target) { 1135 return false 1136 } 1137 return true 1138 } 1139 1140 func (r1 *SSHFP) isDuplicate(_r2 RR) bool { 1141 r2, ok := _r2.(*SSHFP) 1142 if !ok { 1143 return false 1144 } 1145 _ = r2 1146 if r1.Algorithm != r2.Algorithm { 1147 return false 1148 } 1149 if r1.Type != r2.Type { 1150 return false 1151 } 1152 if r1.FingerPrint != r2.FingerPrint { 1153 return false 1154 } 1155 return true 1156 } 1157 1158 func (r1 *SVCB) isDuplicate(_r2 RR) bool { 1159 r2, ok := _r2.(*SVCB) 1160 if !ok { 1161 return false 1162 } 1163 _ = r2 1164 if r1.Priority != r2.Priority { 1165 return false 1166 } 1167 if !isDuplicateName(r1.Target, r2.Target) { 1168 return false 1169 } 1170 if len(r1.Value) != len(r2.Value) { 1171 return false 1172 } 1173 if !areSVCBPairArraysEqual(r1.Value, r2.Value) { 1174 return false 1175 } 1176 return true 1177 } 1178 1179 func (r1 *TA) isDuplicate(_r2 RR) bool { 1180 r2, ok := _r2.(*TA) 1181 if !ok { 1182 return false 1183 } 1184 _ = r2 1185 if r1.KeyTag != r2.KeyTag { 1186 return false 1187 } 1188 if r1.Algorithm != r2.Algorithm { 1189 return false 1190 } 1191 if r1.DigestType != r2.DigestType { 1192 return false 1193 } 1194 if r1.Digest != r2.Digest { 1195 return false 1196 } 1197 return true 1198 } 1199 1200 func (r1 *TALINK) isDuplicate(_r2 RR) bool { 1201 r2, ok := _r2.(*TALINK) 1202 if !ok { 1203 return false 1204 } 1205 _ = r2 1206 if !isDuplicateName(r1.PreviousName, r2.PreviousName) { 1207 return false 1208 } 1209 if !isDuplicateName(r1.NextName, r2.NextName) { 1210 return false 1211 } 1212 return true 1213 } 1214 1215 func (r1 *TKEY) isDuplicate(_r2 RR) bool { 1216 r2, ok := _r2.(*TKEY) 1217 if !ok { 1218 return false 1219 } 1220 _ = r2 1221 if !isDuplicateName(r1.Algorithm, r2.Algorithm) { 1222 return false 1223 } 1224 if r1.Inception != r2.Inception { 1225 return false 1226 } 1227 if r1.Expiration != r2.Expiration { 1228 return false 1229 } 1230 if r1.Mode != r2.Mode { 1231 return false 1232 } 1233 if r1.Error != r2.Error { 1234 return false 1235 } 1236 if r1.KeySize != r2.KeySize { 1237 return false 1238 } 1239 if r1.Key != r2.Key { 1240 return false 1241 } 1242 if r1.OtherLen != r2.OtherLen { 1243 return false 1244 } 1245 if r1.OtherData != r2.OtherData { 1246 return false 1247 } 1248 return true 1249 } 1250 1251 func (r1 *TLSA) isDuplicate(_r2 RR) bool { 1252 r2, ok := _r2.(*TLSA) 1253 if !ok { 1254 return false 1255 } 1256 _ = r2 1257 if r1.Usage != r2.Usage { 1258 return false 1259 } 1260 if r1.Selector != r2.Selector { 1261 return false 1262 } 1263 if r1.MatchingType != r2.MatchingType { 1264 return false 1265 } 1266 if r1.Certificate != r2.Certificate { 1267 return false 1268 } 1269 return true 1270 } 1271 1272 func (r1 *TSIG) isDuplicate(_r2 RR) bool { 1273 r2, ok := _r2.(*TSIG) 1274 if !ok { 1275 return false 1276 } 1277 _ = r2 1278 if !isDuplicateName(r1.Algorithm, r2.Algorithm) { 1279 return false 1280 } 1281 if r1.TimeSigned != r2.TimeSigned { 1282 return false 1283 } 1284 if r1.Fudge != r2.Fudge { 1285 return false 1286 } 1287 if r1.MACSize != r2.MACSize { 1288 return false 1289 } 1290 if r1.MAC != r2.MAC { 1291 return false 1292 } 1293 if r1.OrigId != r2.OrigId { 1294 return false 1295 } 1296 if r1.Error != r2.Error { 1297 return false 1298 } 1299 if r1.OtherLen != r2.OtherLen { 1300 return false 1301 } 1302 if r1.OtherData != r2.OtherData { 1303 return false 1304 } 1305 return true 1306 } 1307 1308 func (r1 *TXT) isDuplicate(_r2 RR) bool { 1309 r2, ok := _r2.(*TXT) 1310 if !ok { 1311 return false 1312 } 1313 _ = r2 1314 if len(r1.Txt) != len(r2.Txt) { 1315 return false 1316 } 1317 for i := 0; i < len(r1.Txt); i++ { 1318 if r1.Txt[i] != r2.Txt[i] { 1319 return false 1320 } 1321 } 1322 return true 1323 } 1324 1325 func (r1 *UID) isDuplicate(_r2 RR) bool { 1326 r2, ok := _r2.(*UID) 1327 if !ok { 1328 return false 1329 } 1330 _ = r2 1331 if r1.Uid != r2.Uid { 1332 return false 1333 } 1334 return true 1335 } 1336 1337 func (r1 *UINFO) isDuplicate(_r2 RR) bool { 1338 r2, ok := _r2.(*UINFO) 1339 if !ok { 1340 return false 1341 } 1342 _ = r2 1343 if r1.Uinfo != r2.Uinfo { 1344 return false 1345 } 1346 return true 1347 } 1348 1349 func (r1 *URI) isDuplicate(_r2 RR) bool { 1350 r2, ok := _r2.(*URI) 1351 if !ok { 1352 return false 1353 } 1354 _ = r2 1355 if r1.Priority != r2.Priority { 1356 return false 1357 } 1358 if r1.Weight != r2.Weight { 1359 return false 1360 } 1361 if r1.Target != r2.Target { 1362 return false 1363 } 1364 return true 1365 } 1366 1367 func (r1 *X25) isDuplicate(_r2 RR) bool { 1368 r2, ok := _r2.(*X25) 1369 if !ok { 1370 return false 1371 } 1372 _ = r2 1373 if r1.PSDNAddress != r2.PSDNAddress { 1374 return false 1375 } 1376 return true 1377 } 1378 1379 func (r1 *ZONEMD) isDuplicate(_r2 RR) bool { 1380 r2, ok := _r2.(*ZONEMD) 1381 if !ok { 1382 return false 1383 } 1384 _ = r2 1385 if r1.Serial != r2.Serial { 1386 return false 1387 } 1388 if r1.Scheme != r2.Scheme { 1389 return false 1390 } 1391 if r1.Hash != r2.Hash { 1392 return false 1393 } 1394 if r1.Digest != r2.Digest { 1395 return false 1396 } 1397 return true 1398 }