From: Paul B. S. <pa...@us...> - 2001-10-03 17:45:56
|
Update of /cvsroot/linux-atm/linux-atm/src/extra/ANS In directory usw-pr-cvs1:/tmp/cvs-serv3891/src/extra/ANS Added Files: Tag: V2_4_0 127.0.0 192.168.27 atm atm-reverse bind-498-REL.patch e164_cc hosts2ans.pl named.conf pdf2e164_cc.pl README README.DNS resolv.conf Log Message: Here is the ANS stuff coalesced(sp?) into a single directory now... Updated the bind patch so that it applies against the latest BIND 4... For the record, I have not tested this... I don't know if anybody is even using this... --- NEW FILE: 127.0.0 --- @ IN SOA ns.atm. hostmaster.atm. ( 1999102501 ; Serial 8H ; Refresh 2H ; Retry 1W ; Expire 1D ) ; Minimum TTL NS ns.atm. 1 PTR localhost. --- NEW FILE: 192.168.27 --- @ IN SOA obelix-atm.atm. hostmaster.obelix-atm.atm. ( 1999102201 ; serial, YYYYMMDDnn 8H ; refresh, seconds 2H ; retry, seconds 1W ; expire, seconds 1D ) ; minimum, seconds NS obelix-atm.atm. ; ; Hosts ; 72 PTR obelix-atm.atm. 96 PTR pong-atm.atm. 81 PTR osteolito-atm.atm. --- NEW FILE: atm --- @ IN SOA obelix-atm.atm. hostmaster.obelix-atm.atm. ( 1999102201 ; serial, YYYYMMDDnn 8H ; refresh, seconds 2H ; retry, seconds 1W ; expire, seconds 1D ) ; minimum, seconds NS obelix-atm MX 10 mail.my.domain. TXT "My organisation's ATM network" localhost A 127.0.0.1 atm. A 192.168.27.72 ; ; Hosts on 192.168.27.0 CLIP network ; obelix-atm A 192.168.27.72 pong-atm A 192.168.27.96 osteolito-atm A 192.168.27.81 ; ; NSAPs - ATM addresses ; obelix-atm IN NSAP 47000580FFE1000000F20F400F0020480E306E00 pong-atm IN NSAP 47000580FFE1000000F21A2F5C0020480E042f00 osteolito-atm IN NSAP 47000580FFE1000000F21A2F5C002048089A9200 --- NEW FILE: atm-reverse --- @ IN SOA obelix-atm.atm. rprior.obelix-atm.atm. ( 1999102201 ; serial, YYYYMMDDnn 8H ; refresh, seconds 2H ; retry, seconds 1W ; expire, seconds 1D ) ; minimum, seconds NS obelix-atm.atm. ; ; Hosts ; 0.0.E.6.0.3.E.0.8.4.0.2.0.0.F.0.0.4.F.0.2.F IN PTR obelix-atm.atm. 0.0.F.2.4.0.E.0.8.4.0.2.0.0.C.5.F.2.A.1.2.F IN PTR pong-atm.atm. 0.0.2.9.A.9.8.0.8.4.0.2.0.0.C.5.F.2.A.1.2.F IN PTR osteolito-atm.atm. --- NEW FILE: bind-498-REL.patch --- diff -urN bind-498-REL.orig/Makefile bind-498-REL/Makefile --- bind-498-REL.orig/Makefile Sat Jan 27 17:29:22 2001 +++ bind-498-REL/Makefile Tue Oct 2 17:21:47 2001 @@ -107,20 +107,20 @@ #(Linux - on modern systems, all you need to do is rename or remove # compat/include/sys/cdefs.h. See doc/info/Linux for more information.) -#CC = gcc $(CPPFLAGS) -#CDEBUG = -g -#CPPFLAGS = -DSYSV -#LEX=flex -8 -I -#INSTALL_COMPAT = install-compat -#LIBS = -lfl -#DESTEXEC = /usr/sbin -#DESTMAN = /usr/man -#MANDIR = man -#MANROFF = cat -#DESTHELP = /usr/lib -#CATEXT = $$$$N [...2014 lines suppressed...] + cp++; + break; + } +#endif + case T_AAAA: { char t[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"]; diff -urN bind-498-REL.orig/tools/nslookup/nslookup.help bind-498-REL/tools/nslookup/nslookup.help --- bind-498-REL.orig/tools/nslookup/nslookup.help Mon Oct 7 23:51:08 1996 +++ bind-498-REL/tools/nslookup/nslookup.help Tue Oct 2 17:21:56 2001 @@ -16,7 +16,7 @@ root=NAME - set root server to NAME retry=X - set number of retries to X timeout=X - set initial time-out interval to X seconds - querytype=X - set query type, e.g., A,ANY,CNAME,HINFO,MX,PX,NS,PTR,SOA,TXT,WKS,SRV,NAPTR + querytype=X - set query type, e.g., A,ANY,CNAME,HINFO,MX,PX,NS,PTR,SOA,TXT,WKS,SRV,NAPTR,ATMA port=X - set port number to send query on type=X - synonym for querytype class=X - set query class to one of IN (Internet), CHAOS, HESIOD or ANY --- NEW FILE: e164_cc --- 93 Afghanistan (Islamic State of) 355 Albania (Republic of) 213 Algeria (People's Democratic Republic of) 684 American Samoa 376 Andorra (Principality of) 244 Angola (Republic of) 1 Anguilla 1 Antigua and Barbuda 54 Argentine Republic 374 Armenia (Republic of) 297 Aruba 247 Ascension 61 Australia 672 Australian External Territories 43 Austria 994 Azerbaijani Republic 1 Bahamas (Commonwealth of the) 973 Bahrain (State of) 880 Bangladesh (People's Republic of) 1 Barbados 375 Belarus (Republic of) 32 Belgium 501 Belize 229 Benin (Republic of) 1 Bermuda 975 Bhutan (Kingdom of) 591 Bolivia (Republic of) 387 Bosnia and Herzegovina 267 Botswana (Republic of) 55 Brazil (Federative Republic of) 1 British Virgin Islands 673 Brunei Darussalam 359 Bulgaria (Republic of) 226 Burkina Faso 257 Burundi (Republic of) 855 Cambodia (Kingdom of) 237 Cameroon (Republic of) 1 Canada 238 Cape Verde (Republic of) 1 Cayman Islands 236 Central African Republic 235 Chad (Republic of) 56 Chile 86 China (People's Republic of) 57 Colombia (Republic of) 269 Comoros (Islamic Federal Republic of the) 242 Congo (Republic of the) 682 Cook Islands 506 Costa Rica 225 Côte d'Ivoire (Republic of) 385 Croatia (Republic of) 53 Cuba 357 Cyprus (Republic of) 420 Czech Republic 850 Democratic People's Republic of Korea 243 Democratic Republic of the Congo 45 Denmark 246 Diego Garcia 253 Djibouti (Republic of) 1 Dominica (Commonwealth of) 1 Dominican Republic 670 East Timor 593 Ecuador 20 Egypt (Arab Republic of) 503 El Salvador (Republic of) 240 Equatorial Guinea (Republic of) 291 Eritrea 372 Estonia (Republic of) 251 Ethiopia (Federal Democratic Republic of) 500 Falkland Islands (Malvinas) 298 Faroe Islands 679 Fiji (Republic of) 358 Finland 33 France 594 French Guiana (French Department of) 689 French Polynesia (Territoire français d'outre-mer) 241 Gabonese Republic 220 Gambia (Republic of the) 995 Georgia 49 Germany (Federal Republic of) 233 Ghana 350 Gibraltar 881 Global Mobile Satellite System (GMSS), shared code 30 Greece 299 Greenland (Denmark) 1 Grenada 388 Group of countries, shared code 590 Guadeloupe (French Department of) 1 Guam 502 Guatemala (Republic of) 224 Guinea (Republic of) 245 Guinea-Bissau (Republic of) 592 Guyana 509 Haiti (Republic of) 504 Honduras (Republic of) 852 Hongkong 36 Hungary (Republic of) 354 Iceland 91 India (Republic of) 62 Indonesia (Republic of) 871 Inmarsat (Atlantic Ocean-East) 874 Inmarsat (Atlantic Ocean-West) 873 Inmarsat (Indian Ocean) 872 Inmarsat (Pacific Ocean) 870 Inmarsat SNAC 800 International Freephone Service 882 International Networks, shared code 98 Iran (Islamic Republic of) 964 Iraq (Republic of) 353 Ireland 972 Israel (State of) 39 Italy 1 Jamaica 81 Japan 962 Jordan (Hashemite Kingdom of) 7 Kazakstan (Republic of) 254 Kenya (Republic of) 686 Kiribati (Republic of) 82 Korea (Republic of) 965 Kuwait (State of) 996 Kyrgyz Republic 856 Lao People's Democratic Republic 371 Latvia (Republic of) 961 Lebanon 266 Lesotho (Kingdom of) 231 Liberia (Republic of) 218 Libya (Socialist People's Libyan Arab Jamahiriya) 423 Liechtenstein (Principality of) 370 Lithuania (Republic of) 352 Luxembourg 853 Macau 261 Madagascar (Republic of) 265 Malawi 60 Malaysia 960 Maldives (Republic of) 223 Mali (Republic of) 356 Malta 692 Marshall Islands (Republic of the) 596 Martinique (French Department of) 222 Mauritania (Islamic Republic of) 230 Mauritius (Republic of) 269 Mayotte (Collectivité territoriale de la République française) 52 Mexico 691 Micronesia (Federated States of) 373 Moldova (Republic of) 377 Monaco (Principality of) 976 Mongolia 1 Montserrat 212 Morocco (Kingdom of) 258 Mozambique (Republic of) 95 Myanmar (Union of) 264 Namibia (Republic of) 674 Nauru (Republic of) 977 Nepal 31 Netherlands (Kingdom of the) 599 Netherlands Antilles 687 New Caledonia (Territoire français d'outre-mer) 64 New Zealand 505 Nicaragua 227 Niger (Republic of the) 234 Nigeria (Federal Republic of) 683 Niue 1 Northern Mariana Islands (Commonwealth of the) 47 Norway 968 Oman (Sultanate of) 92 Pakistan (Islamic Republic of) 680 Palau (Republic of) 507 Panama (Republic of) 675 Papua New Guinea 595 Paraguay (Republic of) 51 Peru 63 Philippines (Republic of the) 48 Poland (Republic of) 351 Portugal 1 Puerto Rico 974 Qatar (State of) 262 Reunion (French Department of) 40 Romania 7 Russian Federation 250 Rwandese Republic 290 Saint Helena 1 Saint Kitts and Nevis 1 Saint Lucia 508 Saint Pierre and Miquelon (Collectivité territoriale de la République 1 Saint Vincent and the Grenadines 685 Samoa (Independent State of) 378 San Marino (Republic of) 239 Sao Tome and Principe (Democratic Republic of) 966 Saudi Arabia (Kingdom of) 221 Senegal (Republic of) 248 Seychelles (Republic of) 232 Sierra Leone 65 Singapore (Republic of) 421 Slovak Republic 386 Slovenia (Republic of) 677 Solomon Islands 252 Somali Democratic Republic 27 South Africa (Republic of) 34 Spain 94 Sri Lanka (Democratic Socialist Republic of) 249 Sudan (Republic of the) 597 Suriname (Republic of) 268 Swaziland (Kingdom of) 46 Sweden 41 Switzerland (Confederation of) 963 Syrian Arab Republic 992 Tajikistan (Republic of) 255 Tanzania (United Republic of) 66 Thailand 389 The Former Yugoslav Republic of Macedonia 228 Togolese Republic 690 Tokelau 676 Tonga (Kingdom of) 991 Trial of a proposed new international telecommunication public 1 Trinidad and Tobago 216 Tunisia 90 Turkey 993 Turkmenistan 1 Turks and Caicos Islands 688 Tuvalu 256 Uganda (Republic of) 380 Ukraine 971 United Arab Emirates 44 United Kingdom of Great Britain and Northern Ireland 1 United States of America 1 United States Virgin Islands 598 Uruguay (Eastern Republic of) 998 Uzbekistan (Republic of) 678 Vanuatu (Republic of) 379 Vatican City State 39 Vatican City State 58 Venezuela (Bolivarian Republic of) 84 Viet Nam (Socialist Republic of) 681 Wallis and Futuna (Territoire français d'outre-mer) 967 Yemen (Republic of) 381 Yugoslavia (Federal Republic of) 260 Zambia (Republic of) 263 Zimbabwe (Republic of) 0 Reserved 886 Reserved 970 Reserved 875 Reserved - Maritime Mobile Service Applications 876 Reserved - Maritime Mobile Service Applications 877 Reserved - Maritime Mobile Service Applications 969 Reserved - reservation currently under investigation 878 Reserved - Universal Personal Telecommunication Service (UPT) 888 Reserved for future global service 808 Reserved for International Shared Cost Service (ISCS) 879 Reserved for national non-commercial purposes 979 Reserved for the International Premium Rate Service (IPRS) 210 Spare code 211 Spare code 214 Spare code 215 Spare code 217 Spare code 219 Spare code 259 Spare code 280 Spare code 281 Spare code 282 Spare code 283 Spare code 284 Spare code 285 Spare code 286 Spare code 287 Spare code 288 Spare code 289 Spare code 292 Spare code 293 Spare code 294 Spare code 295 Spare code 296 Spare code 382 Spare code 383 Spare code 384 Spare code 422 Spare code 424 Spare code 425 Spare code 426 Spare code 427 Spare code 428 Spare code 429 Spare code 671 Spare code 693 Spare code 694 Spare code 695 Spare code 696 Spare code 697 Spare code 698 Spare code 699 Spare code 801 Spare code 802 Spare code 803 Spare code 804 Spare code 805 Spare code 806 Spare code 807 Spare code 809 Spare code 830 Spare code 831 Spare code 832 Spare code 833 Spare code 834 Spare code 835 Spare code 836 Spare code 837 Spare code 838 Spare code 839 Spare code 851 Spare code 854 Spare code 857 Spare code 858 Spare code 859 Spare code 883 Spare code 884 Spare code 885 Spare code 887 Spare code 889 Spare code 890 Spare code 891 Spare code 892 Spare code 893 Spare code 894 Spare code 895 Spare code 896 Spare code 897 Spare code 898 Spare code 899 Spare code 978 Spare code 990 Spare code 997 Spare code 999 Spare code --- NEW FILE: hosts2ans.pl --- #!/usr/bin/perl # # Usage: # # hosts2ans.pl [-r] [ domain [ host [ email ] ] ] </etc/hosts.atm >zonefile # # Where domain is the name of the domain to create, e.g. lrc.epfl.ch (if # omitted, hostname -d is used) # host is the name of the primary DNS server of that domain, e.g. # lrcpcs.epfl.ch (if omitted, hostname -f is used) # email is the e-mail address of the DNS administrator of that # domain, e.g. ro...@lr... (if omitted, root@host is used) # zonefile is the name of the output file, e.g. lrc.zone # # Trailing dots in domain, host, and email are silently removed. # # With -r, the reverse mapping (PTR) is created. Otherwise, the forward mapping # (ATMA) is created. # # Example: host2ans.pl lrc.epfl.ch </etc/hosts.atm >/etc/named/lrc.zone if ($ARGV[0] eq "-r") { shift(@ARGV); $rev = 1; } $master = $tmp = `hostname -f` unless defined($master = $ARGV[1]); $master =~ s/\n//; $master =~ s/\.$//; ($domain = $master) =~ s/^[^.]*\.// unless defined($domain = $ARGV[0]); $domain =~ s/\.$//; $email = "root\@$master" unless defined($email = $ARGV[2]); $email =~ s/@/\./; $email =~ s/\.$//; print "; ".($rev ? "Reverse mapping" : "Authoritative data")." for $domain". "\n\n"; print "@\t\tIN\tSOA\t$master. $email. (\n"; @t = localtime(time); $t[5] += 1900 if $t[5] < 100; # Perl bug ? printf("\t\t\t\t%04d%02d%02d%02d\t; Serial\n",$t[5],$t[4],$t[3],$t[2]); print "\t\t\t\t10800\t\t; Refresh (3h)\n"; print "\t\t\t\t3600\t\t; Retry (1h)\n"; print "\t\t\t\t3600000\t\t; Expire (1000h)\n"; print "\t\t\t\t86400 )\t\t; Minimum (24h)\n"; print "\t\tIN\tNS\t$master.\n"; print "localhost\tIN\tA\t127.0.0.1\n" unless $rev; while (<STDIN>) { chop; s/#.*//; s/\s+$//; s/^\s+//; next if /^$/; ($addr,$host) = split(/\s+/); $addr =~ s/\.//g; $host =~ s/\..*//; $host =~ s/\.$//; if ($rev) { $pfx = substr($addr,0,26); $tail = substr($addr,26,14); if ($pfx ne $origin) { $origin = $pfx; $single = substr($pfx,6,20); print "\$ORIGIN ".join(".",reverse split("",substr($pfx,6,20))). ".".substr($pfx,2,4).".".substr($pfx,0,2).".AESA.ATMA.INT.\n"; } print substr($tail,12,2).".".substr($tail,0,12)."\tIN\tPTR\t$host.". $domain.".\n"; } else { print $host.(length($host) < 8 ? "\t" : "")."\tIN\tATMA\t$addr\n"; } } --- NEW FILE: named.conf --- options { directory "/var/named"; }; zone "0.0.127.in-addr.arpa" { type master; file "zone/127.0.0"; }; zone "atm" { notify no; type master; file "zone/atm"; }; zone "27.168.192.in-addr.arpa" { notify no; type master; file "zone/192.168.27"; }; zone "0.0.0.0.0.0.1.E.F.F.0.8.5.0.0.0.7.4.nsap.int" { notify no; type master; file "zone/atm-reverse"; }; --- NEW FILE: pdf2e164_cc.pl --- #!/usr/bin/perl # # The E.164 country code listing "List of ITU-T Recommendation E.164 Assigned # Country Codes" can be obtained from # The International Telecommunications Union (ITU) http://www.itu.org/ # at http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_717.html # # Usage of this program: # perl pdf2e164_cc.pl e164_xxx.pdf >/etc/e164_cc # open(PDF2TXT, "pdftotext -raw $ARGV[0] - |"); while(<PDF2TXT>) { next unless /^(\d+)\s+(.+)\s+/; last if $1 == 999; } while(<PDF2TXT>) { next unless /^(\d+)\s+(.+)\s+/; ($country, $junk) = split(/\s{2,}/, $2, 2); printf("%-3d %s\n", $1, $country) || die "printf: $!"; last if $1 == 999; } close(PDF2TXT); --- NEW FILE: README --- E.164 Country Codes ------------------- The file e164_cc is provided for those performing reverse lookups with the ATM Name Service (ANS). It can be installed via: cp e164_cc /etc The latest "List of ITU-T Recommendation E.164 Assigned Country Codes" can be obtained from the International Telecommunications Union (ITU) (http://www.itu.org/) in PDF or Word format (http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_717.html). The pdf2e164_cc.pl script, which is included in this directory, can be used to convert this file into the proper text format: perl pdf2e164_cc.pl >/etc/e164_cc Installing BIND --------------- BIND 4.9.8 can be gotten from the Internet Software Consortium (ISC) (http://www.isc.org/products/BIND/). The patch included in this directory (bind-498-REL.patch) is based upon version 4 (http://www.isc.org/products/BIND/bind4.html). After downloading BIND, unbundle it like so: mkdir /usr/src/bind-498-REL tar xzvf bind-498-REL.tar.gz -C /usr/src/bind-498-REL Apply the patch with: cp bind-498-REL.patch /usr/src cd /usr/src patch -p0 <bind-498-REL.patch or: cp bind-498-REL.patch /usr/src/bind-498-REL cd /usr/src/bind-498-REL patch -p1 <bind-498-REL.patch Then follow the instructions as outlined in the INSTALL file provided with the distribution. If you followed the instructions as outlined above, that will be /usr/src/bind-498-REL/INSTALL. See the README.DNS file in this directory for further instructions. --- NEW FILE: README.DNS --- **************************** * * * DNS access for linux-atm * (by Rui Prior) * * **************************** This package is meant for using the NSAP mapping capability of standard DNS servers (bind-8.2) for the direct and reverse translation of private ATM addresses. It doesn't break compatibility with ANS service. In fact, the resolution functions try to use the ANS service first, and only if it fails DNS is attempted. INSTALLATION: ------------- Install the bind package. I provide some examples of configuration files for you to modify as needed. These files assume you're currently in a domain named "my.domain" and are going to create a dummy domain named "atm". Your newly configured DNS server is going to act as a root server for this domain. The files are in subdirectory "bind-files". "named.conf" and "resolv.conf" should go in "/etc", and all other files should go in "/var/named/zone". "127.0.0" is for mapping localhost, and you may copy is as is. "192.168.27" is for reverse lookup of IP hosts on the ATM network (in my case, the network is the experimental 192.168.27.0). "atm" contains direct IP and NSAP mapping for hosts on the dummy domain "atm". "atm-reverse" contains reverse NSAP mapping. Please notice how the order of the nibbles is inverted, and each nibble is separated by one dot. After you install all the files, don't forget to do "ndc restart" in order to inform named of the updates. You should do this every time you modify the configuration files. After having all this installed (and, just in case, rebooting :-) you may test the setup using the provided test program. Go to the "debug" subdirectory and type "make dnstest". Now test the setup using "dnstest <host>", where <host> is one of the hosts in your bind configuration files. IMPORTANT NOTICE: ----------------- I strongly advise you to keep the arpserver on "/etc/hosts.atm". --- NEW FILE: resolv.conf --- search my.domain atm ; The host where we're running the nameserver: nameserver 192.168.27.72 ; The nameservers for my.domain nameserver xxx.xxx.xxx.xxx nameserver yyy.yyy.yyy.yyy |