Hi, I admit I'm a bit confused.
> # 4> Check L1 == "tv". If so, getDomain returns L2.L1; exit. > # "tv" is a special-case "completely flat" ccTLD for historical > reasons. ... > # 6> Check if L2 in gTLD list "com,edu,net,org,gov,mil,int". If so, > # getDomain returns L3.L2.L1; exit. > # gTLDs, when they appear immediately left of a ccTLD (modulo > exception in > # step 4), are considered a part of the TLD. > if ($labels[-2] =~ /^(com|edu|net|org|gov|mil|int)$/) { ... > # 7> If L1 is in the list "GR,PL" AND L2 is NOT in the gTLD list, > getDomain > # returns L2.L1; exit. > # GR and PL are considered "flat" ccTLDs EXCEPT when a gTLD appears > in L2. > # getDomain("a.pl") returns "a.pl" > # getDomain("a.uk") returns "" > # GRM NOTE: no check on L2 because it's caught by code above > if ($labels[-1] =~ /^(gr|pl)$/) { ... > # 8> If Len(L2) < 3 getDomain returns L3.L2.L1; exit. > # getDomain("aa.bb.cc") returns "aa.bb.cc" > if (length($labels[-2]) < 3) { > print STDERR "Rule 8: length(L2) < 3.\n"; > return 3; > } ... > # 9> Otherwise, getDomain returns L2.L1 > # getDomain("aa.bbb.cc") returns "bbb.cc" > print STDERR "Rule 9: default.\n"; > return 2; What is this code trying to do? Thanks, -drc _______________________________________________ DNSOP mailing list DNSOP@ietf.org https://www.ietf.org/mailman/listinfo/dnsop