Net::DRI::DRD::ICANN - ICANN policies for Net::DRI


Net-DRI documentation Contained in the Net-DRI distribution.

Index


Code Index:

NAME

Top

Net::DRI::DRD::ICANN - ICANN policies for Net::DRI

VERSION

Top

This documentation refers to Net::DRI::DRD::ICANN version 1.14

SYNOPSIS

Top

This module is never used directly, it is used by other DRD modules for registries that follow ICANN policies on syntax of domain names.

More precisely, it is called from subroutine _verify_name_rules in Net::DRI::DRD.

DESCRIPTION

Top

This module implements ICANN rules on domain names such as minimum and maximum length, allowed characters, etc...

EXAMPLES

Top

None.

SUBROUTINES/METHODS

Top

is_reserved_name()

returns 1 if the name passed violates some ICANN policy on domain name, 0 otherwise.

DIAGNOSTICS

Top

None.

CONFIGURATION AND ENVIRONMENT

Top

None.

DEPENDENCIES

Top

This module has to be used inside the Net::DRI framework and does not have any dependency.

INCOMPATIBILITIES

Top

None.

BUGS AND LIMITATIONS

Top

No known bugs. Please report problems to author (see below) or use CPAN RT system. Patches are welcome.

xn--something domain names are currently allowed as a temporary passthrough until Net::DRI gets full IDN support.

SUPPORT

Top

For now, support questions should be sent to:

<netdri@dotandco.com>

Please also see the SUPPORT file in the distribution.

SEE ALSO

Top

<http://www.dotandco.com/services/software/Net-DRI/>

AUTHOR

Top

Patrick Mevzek, <netdri@dotandco.com>

LICENSE AND COPYRIGHT

Top


Net-DRI documentation Contained in the Net-DRI distribution.

## Domain Registry Interface, ICANN policy on reserved names
##
## Copyright (c) 2005-2010 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
##
## This file is part of Net::DRI
##
## Net::DRI is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## See the LICENSE file that comes with this distribution for more details.
#
# 
#
####################################################################################################

package Net::DRI::DRD::ICANN;

use strict;
use warnings;

our $VERSION=do { my @r=(q$Revision: 1.14 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); };

## See http://www.icann.org/registries/rsep/submitted_app.html for changes
our %ALLOW1=map { $_ => 1 } qw/mobi coop biz pro cat/; ## Pending ICANN review: travel (#2009003) info
our %ALLOW2=map { $_ => 1 } qw/mobi coop name jobs biz pro cat/; ## Pending ICANN review: travel (#2009003) info

## See http://www.icann.org/tlds/agreements/verisign/registry-agmt-appk-net-org-16apr01.htm & same
## Updated to http://www.icann.org/tlds/agreements/tel/appendix-6-07apr06.htm
sub is_reserved_name
{
 my ($domain,$op)=@_;
 my @d=split(/\./,lc($domain));

 ## Tests at all levels
 foreach my $d (@d)
 {
  ## §A (ICANN+IANA reserved)
  return 1 if ($d=~m/^(?:aso|dnso|gnso|icann|internic|ccnso|pso|afrinic|apnic|arin|example|gtld-servers|iab|iana|iana-servers|iesg|ietf|irtf|istf|lacnic|latnic|rfc-editor|ripe|root-servers)$/o);

  ## §C (tagged domain names)
  return 1 if (length($d)>3 && (substr($d,2,2) eq '--') && ($d!~/^xn--/));
 }

 if ($op eq 'create')
 {
  ## §B.1 (additional second level)
  return 1 if (length($d[-2])==1 && ! exists($ALLOW1{$d[-2]}));
  ## §B.2
  return 1 if (length($d[-2])==2 && ! exists($ALLOW2{$d[-2]}));
 }
 ## §B.3
 ## Restriction lifted in newer gTLD
 unless ($d[0]=~m/^(?:travel|mobi|cat|tel)$/o)
 {
  return 1 if ($d[-2]=~m/^(?:aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro)$/o);
 }
 ## §D (reserved for Registry operations)
 return 1 if ($d[-2]=~m/^(?:nic|whois|www)$/o);

 return 0;
}

####################################################################################################
1;

__END__