summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2005-08-26 08:41:46 +0000
committerspz <spz@pkgsrc.org>2005-08-26 08:41:46 +0000
commit4d68d81842e3dd334a64faead7231278192d7e73 (patch)
treeb554181d3e0b7e0fc56594aff5b58fc73de4e49a /net
parent7d42b0666057eded6c8a26b4856493f078e46ab9 (diff)
downloadpkgsrc-4d68d81842e3dd334a64faead7231278192d7e73.tar.gz
make configure-option --enable-debug compile
make RtConfig -config junos work fix a bug regarding Cisco export filters in RtConfig
Diffstat (limited to 'net')
-rw-r--r--net/irrtoolset-nox11/Makefile8
-rw-r--r--net/irrtoolset-nox11/distinfo19
-rw-r--r--net/irrtoolset-nox11/patches/patch-ak14
-rw-r--r--net/irrtoolset-nox11/patches/patch-bt26
-rw-r--r--net/irrtoolset-nox11/patches/patch-bw13
-rw-r--r--net/irrtoolset-nox11/patches/patch-bx36
-rw-r--r--net/irrtoolset-nox11/patches/patch-by17
-rw-r--r--net/irrtoolset-nox11/patches/patch-bz724
-rw-r--r--net/irrtoolset-nox11/patches/patch-ca87
-rw-r--r--net/irrtoolset-nox11/patches/patch-cb13
-rw-r--r--net/irrtoolset-nox11/patches/patch-cc16
-rw-r--r--net/irrtoolset-nox11/patches/patch-cd16
-rw-r--r--net/irrtoolset-nox11/patches/patch-cf191
-rw-r--r--net/irrtoolset-nox11/patches/patch-cg233
-rw-r--r--net/irrtoolset-nox11/patches/patch-ch301
-rw-r--r--net/irrtoolset-nox11/patches/patch-ci91
-rw-r--r--net/irrtoolset-nox11/patches/patch-cj50
17 files changed, 1846 insertions, 9 deletions
diff --git a/net/irrtoolset-nox11/Makefile b/net/irrtoolset-nox11/Makefile
index 047293bc6e2..bce4216a226 100644
--- a/net/irrtoolset-nox11/Makefile
+++ b/net/irrtoolset-nox11/Makefile
@@ -1,18 +1,20 @@
-# $NetBSD: Makefile,v 1.3 2005/06/21 05:25:45 spz Exp $
+# $NetBSD: Makefile,v 1.4 2005/08/26 08:41:46 spz Exp $
#
DISTNAME= IRRToolSet-4.8.2
+PKGREVISION= 1
CATEGORIES= net
-MASTER_SITES= ftp://ftp.isc.org/isc/IRRToolSet/IRRToolSet-4.8.2/
+MASTER_SITES= ftp://ftp.isc.org/isc/IRRToolSet/IRRToolSet-4.8.2/
MAINTAINER= spz@NetBSD.org
HOMEPAGE= http://www.isc.org/index.pl?/sw/IRRToolSet/
COMMENT= The Internet Routing Registry Toolset - client to IRRd
+
LICENSE= no-commercial-use
USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --without-x
+CONFIGURE_ARGS+= --without-x
.include "../../mk/bsd.pkg.mk"
diff --git a/net/irrtoolset-nox11/distinfo b/net/irrtoolset-nox11/distinfo
index 8d3dbf5f3bd..f971d1c3e8d 100644
--- a/net/irrtoolset-nox11/distinfo
+++ b/net/irrtoolset-nox11/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2005/05/25 13:13:30 wiz Exp $
+$NetBSD: distinfo,v 1.6 2005/08/26 08:41:46 spz Exp $
SHA1 (IRRToolSet-4.8.2.tar.gz) = f60a03cb6585503f1ef0b8b7c0a2ce7c39ce999c
RMD160 (IRRToolSet-4.8.2.tar.gz) = 00332f7fe1144b56c93dc327126ec51aa094b6ab
@@ -13,7 +13,7 @@ SHA1 (patch-ag) = d7eef2f41932977650ed3cd68fe0bf852745d444
SHA1 (patch-ah) = 8641120cfd49797d4fd2fca53a7f11f04c8fb5b4
SHA1 (patch-ai) = ec16a78eb24c0a78846bfa370ca11fba09b60f0c
SHA1 (patch-aj) = bdd8215f482ea203a3387345640b87b421fbfe82
-SHA1 (patch-ak) = 4a47bfdb462b2ec0beaa8dce028be569bc1d4e1e
+SHA1 (patch-ak) = 1646dc6f95abb477779fc396d04f5456292b8af7
SHA1 (patch-al) = 83ee86276245a4431f963d8b6db8feb04598a5ad
SHA1 (patch-am) = ae4d07005d20275a3b6a683ba04e5fc8aa84292d
SHA1 (patch-an) = 19e899a3bf0bab28e5a9322e6001f59643ffe897
@@ -48,6 +48,19 @@ SHA1 (patch-bp) = 5944c48114743a2771f3044beb84d767abe538df
SHA1 (patch-bq) = 17523090fd787ce7f585060d49c92b0b1e64430e
SHA1 (patch-br) = 72e7b86a31851a437dff832206c8d96f263a6b15
SHA1 (patch-bs) = ff8b504a8b8aedb49bdc27bffc50f58c5878c5c6
-SHA1 (patch-bt) = 878e6723901f2f7e02416a2a7bbee0f2f4605af8
+SHA1 (patch-bt) = 1597f361bc791c41bfb770cfb07b31432e34c779
SHA1 (patch-bu) = ea10d9cafc9032bd9f50ea6b81cab58779f6890e
SHA1 (patch-bv) = d0584058eaddce6a03a7b90e5f44997d70afc51d
+SHA1 (patch-bw) = 647544abdbc27886946a37d4f7d7cfb461addc1e
+SHA1 (patch-bx) = 8923f6d3f267b415468b31a3bbd8eb62f821d4a6
+SHA1 (patch-by) = 25af58ff132815c580edfc3dd6b4d1a9b2a464e4
+SHA1 (patch-bz) = 336c6714f3573e93ef2705f15094811dbf177bfc
+SHA1 (patch-ca) = 2285b293abb2c43b12b0aa43c19524f559131fba
+SHA1 (patch-cb) = a3ab7b8c11d913b25f795f59767c884e3a9605a0
+SHA1 (patch-cc) = 3c9395751b58cff9cfc808c91b04a6548f2daf38
+SHA1 (patch-cd) = 8ddbb605d40988378875de80390b09203c61212e
+SHA1 (patch-cf) = 3ec8166b3282364b082bcec666ad79f51ffb8e74
+SHA1 (patch-cg) = 0df548f8a560044b5eaeaaac1b25beadd4850ff0
+SHA1 (patch-ch) = 40ee868bdb7ecb73cb279e5e9f1ff546ab4a4ffe
+SHA1 (patch-ci) = 2e0104e01b7c8beb9d9feab837520014ad6b63e4
+SHA1 (patch-cj) = 86950483f15144510fab6f46cfd36a1759eb3bb4
diff --git a/net/irrtoolset-nox11/patches/patch-ak b/net/irrtoolset-nox11/patches/patch-ak
index 2a1655fbd62..458e2007417 100644
--- a/net/irrtoolset-nox11/patches/patch-ak
+++ b/net/irrtoolset-nox11/patches/patch-ak
@@ -1,4 +1,4 @@
-$NetBSD: patch-ak,v 1.1.1.1 2005/02/28 12:37:30 spz Exp $
+$NetBSD: patch-ak,v 1.2 2005/08/26 08:41:46 spz Exp $
--- src/Core/util/List.hh.orig 2004-07-30 12:58:10.000000000 +0200
+++ src/Core/util/List.hh
@@ -11,7 +11,7 @@ $NetBSD: patch-ak,v 1.1.1.1 2005/02/28 12:37:30 spz Exp $
T* operator-> () const { return (T*)const_ListIterator<T>::operator->(); }
ListIterator& operator++ () { // prefix ++
const_ListIterator<T>::operator++();
-@@ -185,9 +185,9 @@ public:
+@@ -185,17 +185,17 @@ public:
const_ListSearchIterator& operator++ () { // prefix ++
for (const_ListIterator<T>::operator++();
@@ -23,6 +23,16 @@ $NetBSD: patch-ak,v 1.1.1.1 2005/02/28 12:37:30 spz Exp $
}
return *this;
}
+ const_ListSearchIterator& operator-- () { // prefix --
+ for (const_ListIterator<T>::operator--();
+- ptr_!=(ListNode*)list_;
++ const_ListIterator<T>::ptr_!=(ListNode*)const_ListIterator<T>::list_;
+ const_ListIterator<T>::operator--()) {
+- if (((T*)ptr_)->isKey(key_)) break;
++ if (((T*)const_ListIterator<T>::ptr_)->isKey(key_)) break;
+ }
+ return *this;
+ }
@@ -212,7 +212,7 @@ public:
: const_ListSearchIterator<T, Key>(k, l, p?p:(ListNode*)&l) {}
diff --git a/net/irrtoolset-nox11/patches/patch-bt b/net/irrtoolset-nox11/patches/patch-bt
index ba2c234c07a..210dda4d8b8 100644
--- a/net/irrtoolset-nox11/patches/patch-bt
+++ b/net/irrtoolset-nox11/patches/patch-bt
@@ -1,4 +1,4 @@
-$NetBSD: patch-bt,v 1.1 2005/03/06 11:40:21 spz Exp $
+$NetBSD: patch-bt,v 1.2 2005/08/26 08:41:46 spz Exp $
--- src/RtConfig/command.y.orig 2004-07-30 12:58:11.000000000 +0200
+++ src/RtConfig/command.y
@@ -14,3 +14,27 @@ $NetBSD: patch-bt,v 1.1 2005/03/06 11:40:21 spz Exp $
#include <cstring>
#include <cstdlib>
#include <cctype>
+@@ -174,7 +178,7 @@ input_line: import_line
+ | pkt_filter_line
+ | outbound_pkt_filter_line
+ | cisco_map_name_line
+-//| junos_policy_name_line
++| junos_policy_name_line
+ | cisco_map_inc_line
+ | cisco_map_start_line
+ | cisco_access_list_no_line
+@@ -333,14 +337,12 @@ cisco_map_name_line: KW_SET KW_CISCO_MAP
+ << CiscoConfig::mapNameFormat << "'" << std::endl;
+ }
+ ;
+-/*
+ junos_policy_name_line: KW_SET KW_JUNOS_POLICY_NAME '=' TKN_STR {
+ strcpy(JunosConfig::mapNameFormat, $4);
+ Trace(TR_INPUT) << "RtConfig: junos_policy_name '"
+ << JunosConfig::mapNameFormat << "'" << endl;
+ }
+ ;
+-*/
+ cisco_map_inc_line: KW_SET KW_CISCO_MAP_INC '=' TKN_INT {
+ CiscoConfig::mapIncrements = $4;
+ Trace(TR_INPUT) << "RtConfig: cisco_map_increment_by '"
diff --git a/net/irrtoolset-nox11/patches/patch-bw b/net/irrtoolset-nox11/patches/patch-bw
new file mode 100644
index 00000000000..06a00b1f974
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-bw
@@ -0,0 +1,13 @@
+$NetBSD: patch-bw,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/RtConfig/f_cisco.cc.orig 2004-07-30 12:58:11.000000000 +0200
++++ src/RtConfig/f_cisco.cc
+@@ -1879,7 +1879,7 @@ void CiscoConfig::exportGroup(ASt asno,
+ sprintf(mapName, mapNameFormat, asno, mapCount++);
+ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
+ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), ~0);
+- last = print(ne, fa->action, IMPORT, (ItemAFI *) afi);;
++ last = print(ne, fa->action, EXPORT, (ItemAFI *) afi);;
+ delete ne;
+ }
+ }
diff --git a/net/irrtoolset-nox11/patches/patch-bx b/net/irrtoolset-nox11/patches/patch-bx
new file mode 100644
index 00000000000..a0c29e951d3
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-bx
@@ -0,0 +1,36 @@
+$NetBSD: patch-bx,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/RtConfig/RtConfig.cc.orig 2004-07-30 12:58:10.000000000 +0200
++++ src/RtConfig/RtConfig.cc
+@@ -111,8 +111,8 @@ typedef struct {
+ } config_format_type;
+
+ CiscoConfig ciscoConfig;
+-/*
+ JunosConfig junosConfig;
++/*
+ GatedConfig gatedConfig;
+ RSdConfig rsdConfig;
+ BccConfig bccConfig;
+@@ -122,7 +122,7 @@ config_format_type config_formats[] = {
+ // { "rsd", &rsdConfig },
+ // { "gated", &gatedConfig },
+ { "cisco", &ciscoConfig },
+-// { "junos", &junosConfig },
++ { "junos", &junosConfig },
+ // { "bcc", &bccConfig },
+ // { "rsd", rsd_process_line },
+ { "", 0 }
+@@ -214,11 +214,9 @@ void init_and_set_options (int argc, cha
+ {"-cisco_empty_lists", ARGV_BOOL,
+ (char *) NULL, (char *) &CiscoConfig::emptyLists,
+ "Generate access lists for ANY and NOT ANY prefix filters.\n\t\t\t\tCisco only."},
+-
+-/* {"-junos_no_compress_acls", ARGV_BOOL,
++ {"-junos_no_compress_acls", ARGV_BOOL,
+ (char *) NULL, (char *) &JunosConfig::compressAcls,
+ "Do not combine multiple route-filter lines into a single line whenever possible.\n\t\t\t\tJunos only."},
+-*/
+ {(char *) NULL, ARGV_END, (char *) NULL, (char *) NULL,
+ (char *) NULL}
+ };
diff --git a/net/irrtoolset-nox11/patches/patch-by b/net/irrtoolset-nox11/patches/patch-by
new file mode 100644
index 00000000000..3141dfb3792
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-by
@@ -0,0 +1,17 @@
+$NetBSD: patch-by,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/RtConfig/Makefile.in.orig 2004-07-16 18:41:50.000000000 +0200
++++ src/RtConfig/Makefile.in
+@@ -6,9 +6,9 @@ GOAL = RtConfig
+ #SRCS = RtConfig.cc command.y.cc command.l.cc f_bcc.cc f_cisco.cc f_gated.cc f_rsd.cc f_junos.cc
+ #HFILES = RtConfig.hh command.y.hh command.l.hh f_bcc.hh f_cisco.hh f_gated.hh f_rsd.hh f_junos.hh
+
+-OBJS = RtConfig.o command.y.o command.l.o f_cisco.o
+-SRCS = RtConfig.cc command.y.cc command.l.cc f_cisco.cc
+-HFILES = RtConfig.hh command.y.hh command.l.hh f_cisco.hh
++OBJS = RtConfig.o command.y.o command.l.o f_cisco.o f_junos.o
++SRCS = RtConfig.cc command.y.cc command.l.cc f_cisco.cc f_junos.cc
++HFILES = RtConfig.hh command.y.hh command.l.hh f_cisco.hh f_junos.hh
+
+
+ OTHERS = command.l command.y
diff --git a/net/irrtoolset-nox11/patches/patch-bz b/net/irrtoolset-nox11/patches/patch-bz
new file mode 100644
index 00000000000..e61664d7730
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-bz
@@ -0,0 +1,724 @@
+$NetBSD: patch-bz,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/RtConfig/f_junos.cc.orig 2003-07-24 13:20:48.000000000 +0200
++++ src/RtConfig/f_junos.cc
+@@ -53,10 +53,9 @@
+
+ #include "config.h"
+ #include <cstring>
+-#include <iostream.h>
+-#include <strstream.h>
+-#include <iomanip.h>
+-#include <strstream.h>
++#include <iostream>
++#include <sstream>
++#include <iomanip>
+ #include <cctype>
+ #include "normalform/NE.hh"
+ #include "irr/irr.hh"
+@@ -66,6 +65,8 @@
+ #include "f_junos.hh"
+ #include "rpsl/schema.hh"
+
++using namespace std;
++
+ #define DBG_JUNOS 7
+ #define EXPORT 0
+ #define IMPORT 1
+@@ -85,12 +86,14 @@ bool JunosConfig::exportStatics = false;
+
+ //////////////////////////// caches ////////////////////////////////
+
++// most of these are already defined in f_cisco.cc
+ //AccessListManager<regexp_nf> aspathMgr;
+ //AccessListManager<SetOfPrefix> prefixMgr(100);
+-//AccessListManager<SetOfPrefix> pktFilterMgr(100);
++//AccessListManager<SetOfIPv6Prefix> ipv6prefixMgr(100);
+ //AccessListManager<FilterOfCommunity> communityMgr;
++AccessListManager<CommunitySet> communityMgr2;
++//AccessListManager<SetOfPrefix> pktFilterMgr(100);
+
+-AccessListManager<CommunitySet> communityMgr2;
+
+ void JunosConfig::printMartians() {
+ static int done = 0;
+@@ -101,21 +104,21 @@ void JunosConfig::printMartians() {
+ done = 1;
+
+ // print martians
+- char *martians = "
+- route-filter 127.0.0.0/8 orlonger reject;
+- route-filter 10.0.0.0/8 orlonger reject;
+- route-filter 172.16.0.0/12 orlonger reject;
+- route-filter 192.168.0.0/16 orlonger reject;
+- route-filter 192.0.2.0/24 orlonger reject;
+- route-filter 128.0.0.0/16 orlonger reject;
+- route-filter 191.255.0.0/16 orlonger reject;
+- route-filter 192.0.0.0/24 orlonger reject;
+- route-filter 223.255.255.0/24 orlonger reject;
+- route-filter 224.0.0.0/3 orlonger reject;
+- route-filter 169.254.0.0/16 orlonger reject;
+- route-filter 0.0.0.0/0 upto /31 next policy;
+- route-filter 0.0.0.0/0 upto /32 reject;
+-";
++ char *martians =
++ "route-filter 127.0.0.0/8 orlonger reject;\n"
++ "route-filter 10.0.0.0/8 orlonger reject;\n"
++ "route-filter 172.16.0.0/12 orlonger reject;\n"
++ "route-filter 192.168.0.0/16 orlonger reject;\n"
++ "route-filter 192.0.2.0/24 orlonger reject;\n"
++ "route-filter 128.0.0.0/16 orlonger reject;\n"
++ "route-filter 191.255.0.0/16 orlonger reject;\n"
++ "route-filter 192.0.0.0/24 orlonger reject;\n"
++ "route-filter 223.255.255.0/24 orlonger reject;\n"
++ "route-filter 224.0.0.0/3 orlonger reject;\n"
++ "route-filter 169.254.0.0/16 orlonger reject;\n"
++ "route-filter 0.0.0.0/0 upto /31 next policy;\n"
++ "route-filter 0.0.0.0/0 upto /32 reject;\n"
++ ;
+
+ cout << " policy-statement supress-martians {\n"
+ << " term martians {\n"
+@@ -126,6 +129,93 @@ void JunosConfig::printMartians() {
+ << " }\n\n";
+ }
+
++ListOf2Ints *JunosConfig::printRoutes(SetOfIPv6Prefix& nets) {
++
++ // return the access list number if something is printed
++ ListOf2Ints *result;
++
++ if (nets.universal())
++ return NULL;
++
++ // check to see if we already printed an identical access list
++ if (useAclCaches && (result = ipv6prefixMgr.search(nets)))
++ return result;
++
++ result = ipv6prefixMgr.add(nets);
++ int aclID = ipv6prefixMgr.newID();
++ result->add(aclID, aclID);
++
++ int allow_flag = 1;
++ if (nets.negated())
++ allow_flag = 0;
++
++ char *permitOrDeny = " reject;";
++ char *negatedPermitOrDeny = " accept;";
++ if (allow_flag) {
++ permitOrDeny = " accept;";
++ negatedPermitOrDeny = " reject;";
++ }
++
++ cout << " policy-statement prefix-list-" << aclID << " {\n"
++ << " term prefixes {\n"
++ << " from {\n";
++
++ IPv6RadixSet::SortedPrefixIterator itr(&nets.members);
++ ipv6_addr_t addr;
++ u_int leng;
++ char buffer[256];
++ /*
++ if (compressAcls) {
++ u_int start;
++ u_int end;
++ for (bool ok = itr.first(addr, leng, start, end);
++ ok;
++ ok = itr.next(addr, leng, start, end)) {
++ for (unsigned int sibling=0; sibling < (1<<(start-leng)); ++sibling)
++{
++ unsigned int siblingMask = sibling << (128 - start);
++ ipv6_addr_t siblingAddr = addr | siblingMask;
++
++ cout << " route-filter ";
++ cout << ipv62hex(&siblingAddr, buffer) << "/" << start;
++
++ if (end != start)
++ cout << " upto /" << end;
++ else
++ cout << " exact";
++
++ cout << permitOrDeny << "\n";
++ }
++ }
++ } else {
++ */
++ for (bool ok = itr.first(addr, leng);
++ ok;
++ ok = itr.next(addr, leng)) {
++ cout << " route-filter ";
++
++ cout << ipv62hex(&addr, buffer) << "/" << leng;
++
++ cout << " exact" << permitOrDeny << "\n";
++ }
++/* } */
++
++ cout << " }\n"
++ << " }\n"
++ << " term catch-rest {\n";
++
++ // terminate the acess lis
++ if (allow_flag)
++ cout << " then reject;\n";
++ else
++ cout << " then accept;\n";
++
++ cout << " }\n"
++ << " }\n\n";
++
++ return result;
++}
++
+ ListOf2Ints *JunosConfig::printRoutes(SetOfPrefix& nets) {
+ // return the access list number if something is printed
+ ListOf2Ints *result;
+@@ -330,18 +420,17 @@ int JunosConfig::printRE_(ostream& os, c
+ }
+
+ int JunosConfig::printRE(ostream& os, const regexp& r) {
+- strstream sout;
++ ostringstream out;
+ bool hasBOL = false;
+ bool hasEOL = false;
+- printRE_(sout, r, hasBOL, hasEOL);
+- sout << ends;
++ printRE_(out, r, hasBOL, hasEOL);
++ out << ends;
+
+ if (!hasBOL)
+ os << ".* ";
+- os << sout.str();
++ os << out.str();
+ if (!hasEOL)
+ os << " .*";
+- sout.freeze(0);
+
+ return 1;
+ }
+@@ -465,8 +554,8 @@ int JunosConfig::printCommunitySet(ostre
+ ListOf2Ints *JunosConfig::printCommunities(FilterOfCommunity& cm) {
+ // return the access list numbers if something is printed
+ ListOf2Ints *result;
+- ostrstream lastCout;
+- ostrstream midCout;
++ ostringstream lastCout;
++ ostringstream midCout;
+ int term = 0;
+ int id;
+
+@@ -575,13 +664,11 @@ ListOf2Ints *JunosConfig::printCommuniti
+
+ midCout << ends;
+ cout << midCout.str();
+- midCout.freeze(0);
+
+ cout << " }\n\n";
+
+ lastCout << ends;
+ cout << "\n" << lastCout.str();
+- lastCout.freeze(0);
+
+ for (int i = 1; i <= count; ++i)
+ cout << " term comm-" << aclID << "-" << ++term << " {\n"
+@@ -592,11 +679,9 @@ ListOf2Ints *JunosConfig::printCommuniti
+ } else {
+ lastCout << ends;
+ cout << "\n" << lastCout.str();
+- lastCout.freeze(0);
+
+ midCout << ends;
+ cout << midCout.str();
+- midCout.freeze(0);
+ }
+
+ cout << " term community-" << aclID << "-catch-rest {\n"
+@@ -607,7 +692,7 @@ ListOf2Ints *JunosConfig::printCommuniti
+ return result;
+ }
+
+-void JunosConfig::printActions(ostream &os, PolicyActionList *actions) {
++void JunosConfig::printActions(ostream &os, PolicyActionList *actions, ItemAFI *afi) {
+ #define UNIMPLEMENTED_METHOD \
+ cerr << "Warning: unimplemented method " \
+ << actn->rp_attr->name << "." << actn->rp_method->name << endl
+@@ -625,10 +710,19 @@ void JunosConfig::printActions(ostream &
+
+ if (actn->rp_attr == dctn_rp_nhop) {
+ if (actn->rp_method == dctn_rp_nhop_set) {
+- char buffer[32];
+- IPAddr *ip = ((ItemIPV4 *) actn->args->head())->ipv4;
+- ip->get_text(buffer);
+- os << " nexthop " << buffer << ";\n";
++ if (afi->is_ipv4() && (typeid(*(actn->args->head())) == typeid(ItemIPV4))) {
++ char buffer[32];
++ IPAddr *ip = ((ItemIPV4 *) actn->args->head())->ipv4;
++ ip->get_text(buffer);
++ os << " nexthop " << buffer << ";\n";
++ } else if (afi->is_ipv6() && (typeid(*(actn->args->head())) == typeid(ItemIPV6))) {
++ char buffer[50];
++ IPv6Addr *ip = ((ItemIPV6 *) actn->args->head())->ipv6;
++ ip->get_text(buffer);
++ os << " set ipv6 next-hop " << buffer << "\n";
++ } else {
++ cout << "Warning: next-hop address family doesn't match protocol address family, ignoring next-hop..." << endl;
++ }
+ } else
+ UNIMPLEMENTED_METHOD;
+ continue;
+@@ -719,13 +813,14 @@ int JunosConfig::printDeclarations(Norma
+ (void) printCommunities(nt->community);
+ (void) printASPaths(nt->as_path);
+ (void) printRoutes(nt->prfx_set);
++ (void) printRoutes(nt->ipv6_prfx_set);
+ }
+
+ return 1;
+ }
+
+ int JunosConfig::print(NormalExpression *ne, PolicyActionList *actn,
+- int import_flag) {
++ int import_flag, ItemAFI *afi) {
+ int last = 0;
+ static ListOf2Ints empty_list(1);
+
+@@ -745,7 +840,14 @@ int JunosConfig::print(NormalExpression
+ for (NormalTerm *nt = ne->first(); nt; nt = ne->next()) {
+ ListOf2Ints *aspath_acls = printASPaths(nt->as_path);
+ ListOf2Ints *comm_acls = printCommunities(nt->community);
+- ListOf2Ints *prfx_acls = printRoutes(nt->prfx_set);
++ ListOf2Ints *prfx_acls;
++
++ if (afi->is_ipv4()) {
++ prfx_acls = printRoutes(nt->prfx_set);
++ } else if (afi->is_ipv6()) {
++ prfx_acls = printRoutes(nt->ipv6_prfx_set);
++ }
++
+
+ if (!aspath_acls)
+ aspath_acls = &empty_list;
+@@ -779,7 +881,7 @@ int JunosConfig::print(NormalExpression
+
+ cout << " }\n"
+ << " then {\n";
+- JunosConfig::printActions(cout, actn);
++ JunosConfig::printActions(cout, actn, afi);
+ cout << " }\n";
+ cout << " }\n\n";
+ }
+@@ -791,11 +893,18 @@ int JunosConfig::print(NormalExpression
+ return last;
+ }
+
+-bool JunosConfig::printNeighbor(int import,
+- ASt peerAS, char *neighbor, bool peerGroup) {
++bool JunosConfig::printNeighbor(int import, ASt asno,
++ ASt peerAS, char *neighbor, bool peerGroup,
++ ItemAFI *peer_afi, ItemAFI *filter_afi) {
++ bool afi_activate = false;
++
+ if (! printRouteMap)
+ return false;
+
++ if (!peerGroup && (!filter_afi->is_default() || !peer_afi->is_default()))
++ afi_activate = true;
++
++ const char *indent = (afi_activate) ? " " : "";
+ const char *direction = (import == IMPORT) ? "import" : "export";
+
+ cout << "protocols {\n"
+@@ -822,6 +931,12 @@ bool JunosConfig::printNeighbor(int impo
+ setMEDtoIGP = false;
+ }
+
++ if (afi_activate) {
++ cout << " family " << (AddressFamily &) *filter_afi << " { "<< endl;
++ cout << " any;" << endl;
++ cout << " } " << endl;
++ }
++
+ cout << " }\n"
+ << " }\n"
+ << " }\n"
+@@ -830,11 +945,11 @@ bool JunosConfig::printNeighbor(int impo
+ return true;
+ }
+
+-void JunosConfig::exportP(ASt asno, IPAddr *addr,
+- ASt peerAS, IPAddr *peer_addr) {
++void JunosConfig::exportP(ASt asno, MPPrefix *addr,
++ ASt peerAS, MPPrefix *peer_addr) {
+
+ // Made asno part of the map name if it's not changed by users
+- sprintf(mapName, mapNameFormat, asno, mapCount++);
++ sprintf(mapName, mapNameFormat, peerAS, mapCount++);
+
+ // get the aut-num object
+ const AutNum *autnum = irr->getAutNum(asno);
+@@ -847,32 +962,52 @@ void JunosConfig::exportP(ASt asno, IPAd
+ // get matching export attributes
+ AutNumSelector<AttrExport> itr(autnum, "export",
+ NULL, peerAS, peer_addr, addr);
+- const FilterAction *fa = itr.first();
++ AutNumSelector<AttrExport> itr1(autnum, "mp-export",
++ NULL, peerAS, peer_addr, addr);
++
++ List<FilterAction> *common_list = itr.get_fa_list();
++ common_list->splice(*(itr1.get_fa_list()));
++
++ FilterAction *fa = common_list->head();
+ if (! fa) {
+- printPolicyWarning(asno, addr, peerAS, peer_addr, "export");
++ printPolicyWarning(asno, addr, peerAS, peer_addr, "export/mp-export");
+ return;
+ }
+
++ ItemList *afi_list = itr.get_afi_list();
++ afi_list->merge(*(itr1.get_afi_list()));
++
++ if (afi_list->isEmpty()) {
++ cout << "Warning: No AFI resulted from policy" << endl;
++ }
++
+ cout << "policy-options {\n";
+ printMartians();
+
+ NormalExpression *ne;
+- int last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, peerAS);
+- last = printDeclarations(ne, fa->action, EXPORT);
+- delete ne;
++ NormalExpression done;
++ int last;
++
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), peerAS);
++ last = printDeclarations(ne, fa->action, EXPORT);
++ delete ne;
++ }
+ }
+
+ cout << " policy-statement " << mapName << " {\n";
+
+- fa = itr.first();
+- last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, peerAS);
+- last = print(ne, fa->action, EXPORT);
+- delete ne;
+- }
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), peerAS);
++ last = print(ne, fa->action, EXPORT, (ItemAFI *) afi);
++ delete ne;
++ }
++ }
+
+ cout << " term " << mapName << "-catch-rest {\n"
+ << " then reject;\n"
+@@ -880,14 +1015,16 @@ void JunosConfig::exportP(ASt asno, IPAd
+ << " }\n"
+ << "}\n\n";
+
+- printNeighbor(EXPORT, peerAS, peer_addr->get_text(), false);
++ ItemAFI *peer_afi = new ItemAFI(peer_addr->get_afi());
++
++ printNeighbor(EXPORT, asno, peerAS, peer_addr->get_ip_text(), false, (ItemAFI *) peer_afi, (ItemAFI *) afi_list);
+ }
+
+-void JunosConfig::importP(ASt asno, IPAddr *addr,
+- ASt peerAS, IPAddr *peer_addr) {
++void JunosConfig::importP(ASt asno, MPPrefix *addr,
++ ASt peerAS, MPPrefix *peer_addr) {
+
+ // Made asno part of the map name if it's not changed by users
+- sprintf(mapName, mapNameFormat, asno, mapCount++);
++ sprintf(mapName, mapNameFormat, peerAS, mapCount++);
+
+ // get the aut-num object
+ const AutNum *autnum = irr->getAutNum(asno);
+@@ -901,31 +1038,47 @@ void JunosConfig::importP(ASt asno, IPAd
+ // get matching import attributes
+ AutNumSelector<AttrImport> itr(autnum, "import",
+ NULL, peerAS, peer_addr, addr);
+- const FilterAction *fa = itr.first();
+- if (! fa) {
+- printPolicyWarning(asno, addr, peerAS, peer_addr, "import");
+- return;
++ AutNumSelector<AttrExport> itr1(autnum, "mp-import",
++ NULL, peerAS, peer_addr, addr);
++
++ List<FilterAction> *common_list = itr.get_fa_list();
++ common_list->splice(*(itr1.get_fa_list()));
++
++ FilterAction *fa = common_list->head();
++ if (! fa) {
++ printPolicyWarning(asno, addr, peerAS, peer_addr, "import/mp-import");
++ return;
+ }
+
++ ItemList *afi_list = itr.get_afi_list();
++ afi_list->merge(*(itr1.get_afi_list()));
++
+ cout << "policy-options {\n";
+ printMartians();
+
+ NormalExpression *ne;
+- int last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, peerAS);
+- last = printDeclarations(ne, fa->action, IMPORT);
+- delete ne;
++ NormalExpression done;
++ int last;
++
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), peerAS);
++ last = printDeclarations(ne, fa->action, IMPORT);
++ delete ne;
++ }
+ }
+
+ cout << " policy-statement " << mapName << " {\n";
+
+- fa = itr.first();
+- last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, peerAS);
+- last = print(ne, fa->action, IMPORT);
+- delete ne;
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), peerAS);
++ last = print(ne, fa->action, IMPORT, (ItemAFI *) afi);
++ delete ne;
++ }
+ }
+
+ cout << " term " << mapName << "-catch-rest {\n"
+@@ -934,11 +1087,14 @@ void JunosConfig::importP(ASt asno, IPAd
+ << " }\n"
+ << "}\n\n";
+
+- printNeighbor(IMPORT, peerAS, peer_addr->get_text(), false);
++ ItemAFI *peer_afi = new ItemAFI(peer_addr->get_afi());
++
++ printNeighbor(IMPORT, asno, peerAS, peer_addr->get_text(), false, (ItemAFI *) peer_afi, (ItemAFI *) afi_list);
+ }
+
+-void JunosConfig::static2bgp(ASt asno, IPAddr *addr) {
+- // Made asno part of the map name if it's not changed by users
++void JunosConfig::static2bgp(ASt asno, MPPrefix *addr) {
++
++ // make static2bgp map obvious
+ strcpy(mapName, "static2bgp");
+
+ // get the aut-num object
+@@ -952,30 +1108,45 @@ void JunosConfig::static2bgp(ASt asno, I
+ // get matching import attributes
+ AutNumSelector<AttrImport> itr(autnum, "import",
+ NULL, asno, addr, addr, "STATIC");
+- const FilterAction *fa = itr.first();
++ AutNumSelector<AttrImport> itr1(autnum, "mp-import",
++ NULL, asno, addr, addr, "STATIC");
++
++ List<FilterAction> *common_list = itr.get_fa_list();
++ common_list->splice(*(itr1.get_fa_list()));
++
++ const FilterAction *fa = common_list->head();
+ if (! fa)
+ cerr << "Warning: AS" << asno
+ << " has no static2bgp policy for AS" << asno << endl;
+
++ ItemList *afi_list = itr.get_afi_list();
++ afi_list->merge(*(itr1.get_afi_list()));
++
+ cout << "policy-options {\n";
+ printMartians();
+
+ NormalExpression *ne;
+- int last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, asno);
+- last = printDeclarations(ne, fa->action, STATIC);
+- delete ne;
++ NormalExpression done;
++ int last;
++
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), asno);
++ last = printDeclarations(ne, fa->action, STATIC);
++ delete ne;
++ }
+ }
+
+ cout << " policy-statement static2bgp {\n";
+
+- fa = itr.first();
+- last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, asno);
+- last = print(ne, fa->action, STATIC);
+- delete ne;
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), asno);
++ last = print(ne, fa->action, STATIC, (ItemAFI *) afi);
++ delete ne;
++ }
+ }
+
+ cout << " term static2bgp-catch-rest {\n"
+@@ -1004,7 +1175,23 @@ void JunosConfig::networks(ASt asno) {
+ }
+ }
+
++void JunosConfig::IPv6networks(ASt asno) {
++ static char buffer[128];
++ static char buffer2[128];
++ const MPPrefixRanges *nets = irr->expandAS(asno);
++ MPPrefixRanges::const_iterator p;
++
++ for (p = nets->begin(); p != nets->end(); ++p) {
++ if (p->ipv6) {
++ cout << "network " << p->ipv6->get_ip_text()
++ << " mask " << p->ipv6->get_mask()
++ << ";\n";
++ }
++ }
++}
++
+ void JunosConfig::exportGroup(ASt asno, char * pset) {
++
+ // Made asno part of the map name if it's not changed by users
+ sprintf(mapName, mapNameFormat, asno, mapCount++);
+
+@@ -1019,30 +1206,43 @@ void JunosConfig::exportGroup(ASt asno,
+ SymID psetID = symbols.symID(pset);
+ // get matching export attributes
+ AutNumSelector<AttrExport> itr(autnum, "export", psetID, ~0, NULL, NULL);
+- const FilterAction *fa = itr.first();
++ AutNumSelector<AttrExport> itr1(autnum, "mp-export", psetID, ~0, NULL, NULL);
++
++ List<FilterAction> *common_list = itr.get_fa_list();
++ common_list->splice(*(itr1.get_fa_list()));
++
++ FilterAction *fa = common_list->head();
+ if (! fa)
+ cerr << "Warning: AS" << asno
+- << " has no export policy for " << pset << endl;
++ << " has no export/mp-export policy for " << pset << endl;
++
++ ItemList *afi_list = itr.get_afi_list();
++ afi_list->merge(*(itr1.get_afi_list()));
+
+ cout << "policy-options {\n";
+ printMartians();
+
+ NormalExpression *ne;
+- int last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, ~0);
+- last = printDeclarations(ne, fa->action, EXPORT);
+- delete ne;
++ int last;
++
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), ~0);
++ last = printDeclarations(ne, fa->action, EXPORT);
++ delete ne;
++ }
+ }
+
+ cout << " policy-statement " << mapName << " {\n";
+
+- fa = itr.first();
+- last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, ~0);
+- last = print(ne, fa->action, EXPORT);
+- delete ne;
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), ~0);
++ last = print(ne, fa->action, EXPORT, (ItemAFI *) afi);
++ delete ne;
++ }
+ }
+
+ cout << " term " << mapName << "-catch-rest {\n"
+@@ -1117,30 +1317,44 @@ void JunosConfig::importGroup(ASt asno,
+ SymID psetID = symbols.symID(pset);
+ // get matching import attributes
+ AutNumSelector<AttrImport> itr(autnum, "import", psetID, ~0, NULL, NULL);
+- const FilterAction *fa = itr.first();
++ AutNumSelector<AttrExport> itr1(autnum, "mp-import", psetID, ~0, NULL, NULL);
++
++ List<FilterAction> *common_list = itr.get_fa_list();
++ common_list->splice(*(itr1.get_fa_list()));
++
++ FilterAction *fa = common_list->head();
++
+ if (! fa)
+ cerr << "Warning: AS" << asno
+- << " has no import policy for " << pset << endl;
++ << " has no import/mp-import policy for " << pset << endl;
++
++ ItemList *afi_list = itr.get_afi_list();
++ afi_list->merge(*(itr1.get_afi_list()));
+
+ cout << "policy-options {\n";
+ printMartians();
+
+ NormalExpression *ne;
+- int last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, ~0);
+- last = printDeclarations(ne, fa->action, IMPORT);
+- delete ne;
++ int last;
++
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), ~0);
++ last = printDeclarations(ne, fa->action, IMPORT);
++ delete ne;
++ }
+ }
+
+ cout << " policy-statement " << mapName << " {\n";
+
+- fa = itr.first();
+- last = 0;
+- for (; fa && !last; fa = itr.next()) {
+- ne = NormalExpression::evaluate(fa->filter, ~0);
+- last = print(ne, fa->action, IMPORT);
+- delete ne;
++ for (Item *afi = afi_list->head(); afi; afi = afi_list->next(afi)) {
++ last = 0;
++ for (fa = common_list->head(); fa && !last; fa = common_list->next(fa)) {
++ ne = NormalExpression::evaluate(new FilterAFI((ItemAFI *) afi->dup(), fa->filter), ~0);
++ last = print(ne, fa->action, IMPORT, (ItemAFI *) afi);
++ delete ne;
++ }
+ }
+
+ cout << " term " << mapName << "-catch-rest {\n"
diff --git a/net/irrtoolset-nox11/patches/patch-ca b/net/irrtoolset-nox11/patches/patch-ca
new file mode 100644
index 00000000000..36229c00b52
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-ca
@@ -0,0 +1,87 @@
+$NetBSD: patch-ca,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/RtConfig/f_junos.hh.orig 2002-04-09 13:48:46.000000000 +0200
++++ src/RtConfig/f_junos.hh
+@@ -57,9 +57,12 @@
+ #include "config.h"
+ #include "util/List.hh"
+ #include "normalform/FilterOfASPath.hh"
++#include "irr/irr.hh"
++#include "irr/autnum.hh"
++
++#include <sstream>
+
+ class FilterOfCommunity;
+-class ostream;
+ class RangeList;
+ class regexp;
+ class PolicyAction;
+@@ -78,12 +81,13 @@ public:
+ distributeListNo = -1;
+ routeMapID = 1;
+ }
+- void importP(ASt as, IPAddr* addr, ASt peerAS, IPAddr* peerAddr);
+- void exportP(ASt as, IPAddr* addr, ASt peerAS, IPAddr* peerAddr);
++ void importP(ASt as, MPPrefix* addr, ASt peerAS, MPPrefix* peerAddr);
++ void exportP(ASt as, MPPrefix* addr, ASt peerAS, MPPrefix* peerAddr);
+ void exportGroup(ASt as, char *pset);
+ void importGroup(ASt as, char *pset);
+- void static2bgp(ASt as, IPAddr* addr);
++ void static2bgp(ASt as, MPPrefix* addr);
+ void networks(ASt as);
++ void IPv6networks(ASt as);
+
+ public:
+ // options
+@@ -106,19 +110,26 @@ private:
+ bool reSplittable;
+
+ private:
++ ListOf2Ints *printRoutes(SetOfIPv6Prefix& nets);
+ ListOf2Ints *printRoutes(SetOfPrefix& nets);
+ ListOf2Ints *printCommunities(FilterOfCommunity& cm);
+ ListOf2Ints *printASPaths(FilterOfASPath& path);
+
+- inline void printCommunity(ostream &os, unsigned int i);
+- int printCommunityList(ostream &os, ItemList *args);
+- int printCommunitySet(ostream &os, CommunitySet *set, bool exact);
+- void printActions(ostream &os, PolicyActionList *action);
++ inline void printCommunity(std::ostream &os, unsigned int i);
++ int printCommunityList(std::ostream &os, ItemList *args);
++ int printCommunitySet(std::ostream &os, CommunitySet *set, bool exact);
++ void printActions(std::ostream &os, PolicyActionList *action, ItemAFI *afi);
+ void printMartians();
+- int print(NormalExpression *ne, PolicyActionList *actn, int import_flag);
++ int print(NormalExpression *ne, PolicyActionList *actn, int import_flag, ItemAFI *afi);
+ int printDeclarations(NormalExpression *ne, PolicyActionList *actn, int import_flag);
+- bool printNeighbor(int import, ASt asno, char *neighbor,
+- bool peerGroup);
++ bool printNeighbor(int import, ASt asno, ASt peerAS, char *neighbor,
++ bool peerGroup, ItemAFI *peer_afi, ItemAFI *filter_afi);
++ void printAccessList(SetOfIPv6Prefix& nets) {
++ bool save = useAclCaches;
++ useAclCaches = false;
++ printRoutes(nets);
++ useAclCaches = save;
++ }
+ void printAccessList(SetOfPrefix& nets) {
+ bool save = useAclCaches;
+ useAclCaches = false;
+@@ -131,13 +142,14 @@ private:
+ printASPaths(path);
+ useAclCaches = save;
+ }
+- void printREASno(ostream& out, const RangeList &no);
+- int printRE_(ostream& os, const regexp& r, bool &hasBOL, bool &hasEOL);
+- int printRE(ostream& os, const regexp& r);
++ void printREASno(std::ostream& out, const RangeList &no);
++ int printRE_(std::ostream& os, const regexp& r, bool &hasBOL, bool &hasEOL);
++ int printRE(std::ostream& os, const regexp& r);
+ };
+
+ extern AccessListManager<regexp_nf> aspathMgr;
+ extern AccessListManager<SetOfPrefix> prefixMgr;
++extern AccessListManager<SetOfIPv6Prefix> ipv6prefixMgr;
+ extern AccessListManager<SetOfPrefix> pktFilterMgr;
+ extern AccessListManager<FilterOfCommunity> communityMgr;
+
diff --git a/net/irrtoolset-nox11/patches/patch-cb b/net/irrtoolset-nox11/patches/patch-cb
new file mode 100644
index 00000000000..33cb601b000
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cb
@@ -0,0 +1,13 @@
+$NetBSD: patch-cb,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/util/debug.cc.orig 2002-04-09 13:48:49.000000000 +0200
++++ src/util/debug.cc
+@@ -108,7 +108,7 @@ void Abort() {
+ }
+
+ void copy_constructor(char *p) {
+- cerr << "Copy constructor called for " << p << "\n";
++ std::cerr << "Copy constructor called for " << p << std::endl;
+ }
+
+ #endif /* DEBUG */
diff --git a/net/irrtoolset-nox11/patches/patch-cc b/net/irrtoolset-nox11/patches/patch-cc
new file mode 100644
index 00000000000..1609367355d
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cc
@@ -0,0 +1,16 @@
+$NetBSD: patch-cc,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/util/debug.hh.orig 2002-04-09 13:48:49.000000000 +0200
++++ src/util/debug.hh
+@@ -75,7 +75,11 @@
+
+ #include "config.h"
+ #ifdef DEBUG
++#if (__GNUC__ > 2)
++#include <iostream>
++#else
+ #include <iostream.h>
++#endif
+
+ #define DBG_ERR 1
+ #define DBG_INFO 2
diff --git a/net/irrtoolset-nox11/patches/patch-cd b/net/irrtoolset-nox11/patches/patch-cd
new file mode 100644
index 00000000000..4d03932f2ca
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cd
@@ -0,0 +1,16 @@
+$NetBSD: patch-cd,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/Core/util/debug.hh.orig 2002-04-09 13:48:45.000000000 +0200
++++ src/Core/util/debug.hh
+@@ -75,7 +75,11 @@
+
+ #include "config.h"
+ #ifdef DEBUG
++#if (__GNUC__ > 2)
++#include <iostream>
++#else
+ #include <iostream.h>
++#endif
+
+ #define DBG_ERR 1
+ #define DBG_INFO 2
diff --git a/net/irrtoolset-nox11/patches/patch-cf b/net/irrtoolset-nox11/patches/patch-cf
new file mode 100644
index 00000000000..636e7576a0c
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cf
@@ -0,0 +1,191 @@
+$NetBSD: patch-cf,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/rpsl/rpsl/rpsl_attr.hh.orig 2004-07-30 12:58:15.000000000 +0200
++++ src/rpsl/rpsl/rpsl_attr.hh
+@@ -131,7 +131,7 @@ public:
+ return "Attr";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "(*** Need more work here ***)" << endl;
++ INDENT(indent); os << "(*** Need more work here ***)" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -311,7 +311,7 @@ public:
+ return "AttrAttr";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "_name = \"" << name() << "\"" << endl;
++ INDENT(indent); os << "_name = \"" << name() << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -370,7 +370,7 @@ public:
+ return "AttrClass";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "(*** Need more work here ***)" << endl;
++ INDENT(indent); os << "(*** Need more work here ***)" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -400,9 +400,9 @@ public:
+ return "AttrGeneric";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "type" << endl;
++ INDENT(indent); os << "type" << std::endl;
+ type->printClass(os, indent + 2);
+- INDENT(indent); os << "items (" << items->className() << " *)" << endl;
++ INDENT(indent); os << "items (" << items->className() << " *)" << std::endl;
+ items->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -583,7 +583,7 @@ public:
+ return "AttrProtocol";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "name = \"" << name << "\"" << endl;
++ INDENT(indent); os << "name = \"" << name << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -620,19 +620,19 @@ public:
+ return "AttrImport";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "fromProt" << endl;
++ INDENT(indent); os << "fromProt" << std::endl;
+ if (fromProt)
+ fromProt->printClass(os, indent + 2);
+ else {
+- INDENT(indent); os << " NULL" << endl;
++ INDENT(indent); os << " NULL" << std::endl;
+ }
+- INDENT(indent); os << "intoProt" << endl;
++ INDENT(indent); os << "intoProt" << std::endl;
+ if (intoProt)
+ intoProt->printClass(os, indent + 2);
+ else {
+- INDENT(indent); os << " NULL" << endl;
++ INDENT(indent); os << " NULL" << std::endl;
+ }
+- INDENT(indent); os << "policy (" << policy->className() << " *)" << endl;
++ INDENT(indent); os << "policy (" << policy->className() << " *)" << std::endl;
+ policy->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -668,19 +668,19 @@ public:
+ return "AttrExport";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "fromProt" << endl;
++ INDENT(indent); os << "fromProt" << std::endl;
+ if (fromProt)
+ fromProt->printClass(os, indent + 2);
+ else {
+- INDENT(indent); os << " NULL" << endl;
++ INDENT(indent); os << " NULL" << std::endl;
+ }
+- INDENT(indent); os << "intoProt" << endl;
++ INDENT(indent); os << "intoProt" << std::endl;
+ if (intoProt)
+ intoProt->printClass(os, indent + 2);
+ else {
+- INDENT(indent); os << " NULL" << endl;
++ INDENT(indent); os << " NULL" << std::endl;
+ }
+- INDENT(indent); os << "policy (" << policy->className() << " *)" << endl;
++ INDENT(indent); os << "policy (" << policy->className() << " *)" << std::endl;
+ policy->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -725,11 +725,11 @@ public:
+ return "AttrDefault";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "peering (PolicyPeering *)" << endl;
++ INDENT(indent); os << "peering (PolicyPeering *)" << std::endl;
+ peering->printClass(os, indent + 2);
+- INDENT(indent); os << "action (PolicyActionList *)" << endl;
++ INDENT(indent); os << "action (PolicyActionList *)" << std::endl;
+ action->printClass(os, indent + 2);
+- INDENT(indent); os << "filter (Filter *)" << endl;
++ INDENT(indent); os << "filter (Filter *)" << std::endl;
+ filter->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -757,7 +757,7 @@ public:
+ return "AttrFilter";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "filter (Filter *)" << endl;
++ INDENT(indent); os << "filter (Filter *)" << std::endl;
+ filter->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -785,7 +785,7 @@ public:
+ return "AttrMPPeval";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "mp-peval (Filter *)" << endl;
++ INDENT(indent); os << "mp-peval (Filter *)" << std::endl;
+ filter->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -815,7 +815,7 @@ public:
+ return "AttrPeering";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "peering (PolicyPeering *)" << endl;
++ INDENT(indent); os << "peering (PolicyPeering *)" << std::endl;
+ peering->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -852,9 +852,9 @@ public:
+ // ??? This causes a lot of warning mesg right now
+ // It's hard to fix since it involves modification to
+ // hundred of places across the whole src tree
+- // os << "ifaddr = " << ifaddr << endl;
++ // os << "ifaddr = " << ifaddr << std::endl;
+ os << "(*** Need to fix const declaration in the extraction operator ***)"
+- << endl;
++ << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -922,9 +922,9 @@ public:
+ // ??? This causes a lot of warning mesg right now
+ // It's hard to fix since it involves modification to
+ // hundred of places across the whole src tree
+- // os << "ifaddr = " << ifaddr << endl;
++ // os << "ifaddr = " << ifaddr << std::endl;
+ os << "(*** Need to fix const declaration in the extraction operator ***)"
+- << endl;
++ << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -960,15 +960,15 @@ public:
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+ // For rp_attr
+- INDENT(indent); os << "rp_attr" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
+- INDENT(indent); os << " methods (RPMethod *)" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_attr" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
++ INDENT(indent); os << " methods (RPMethod *)" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_method
+- INDENT(indent); os << "rp_method" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_method" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_args
+- INDENT(indent); os << "args (ItemList *)" << endl;
++ INDENT(indent); os << "args (ItemList *)" << std::endl;
+ args->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
diff --git a/net/irrtoolset-nox11/patches/patch-cg b/net/irrtoolset-nox11/patches/patch-cg
new file mode 100644
index 00000000000..bf93ad7254c
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cg
@@ -0,0 +1,233 @@
+$NetBSD: patch-cg,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/rpsl/rpsl/rpsl_filter.hh.orig 2005-08-25 12:41:52.000000000 +0200
++++ src/rpsl/rpsl/rpsl_filter.hh
+@@ -92,8 +92,8 @@
+ virtual Filter* dup() const = 0;
+ #ifdef DEBUG
+ virtual const char *className(void) const = 0;
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "(*** Need more work here ***)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); print(os); os << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -125,10 +125,10 @@
+ virtual const char *className(void) const {
+ return "FilterOR";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "f1 (" << f1->className() << " *)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "f1 (" << f1->className() << " *)" << std::endl;
+ f1->printClass(os, indent + 2);
+- INDENT(indent); os << "f2 (" << f2->className() << " *)" << endl;
++ INDENT(indent); os << "f2 (" << f2->className() << " *)" << std::endl;
+ f2->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -157,10 +157,10 @@
+ virtual const char *className(void) const {
+ return "FilterAND";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "f1" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "f1" << std::endl;
+ f1->printClass(os, indent + 2);
+- INDENT(indent); os << "f2" << endl;
++ INDENT(indent); os << "f2" << std::endl;
+ f2->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -186,8 +186,8 @@
+ virtual const char *className(void) const {
+ return "FilterNOT";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "f1 (NOT)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "f1 (NOT)" << std::endl;
+ f1->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -216,10 +216,10 @@
+ virtual const char *className(void) const {
+ return "FilterEXCEPT";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "f1" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "f1" << std::endl;
+ f1->printClass(os, indent + 2);
+- INDENT(indent); os << "f2" << endl;
++ INDENT(indent); os << "f2" << std::endl;
+ f2->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -256,8 +256,8 @@
+ virtual const char *className(void) const {
+ return "FilterMS";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "f1 (" << f1->className() << " *)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "f1 (" << f1->className() << " *)" << std::endl;
+ f1->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -279,8 +279,8 @@
+ virtual const char *className(void) const {
+ return "FilterASNO";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "asno = " << asno << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "asno = " << asno << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -301,8 +301,8 @@
+ virtual const char *className(void) const {
+ return "FilterASNAME";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "asname = \"" << asname << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "asname = \"" << asname << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -323,8 +323,8 @@
+ virtual const char *className(void) const {
+ return "FilterRSNAME";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "rsname = \"" << rsname << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "rsname = \"" << rsname << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -345,8 +345,8 @@
+ virtual const char *className(void) const {
+ return "FilterRTRSNAME";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "rtrsname = \"" << rtrsname << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "rtrsname = \"" << rtrsname << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -368,7 +368,7 @@
+ return "FilterFLTRNAME";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "fltrname = \"" << fltrname << "\"" << endl;
++ INDENT(indent); os << "fltrname = \"" << fltrname << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -386,8 +386,8 @@
+ virtual const char *className(void) const {
+ return "FilterANY";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "ANY" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "ANY" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -405,8 +405,8 @@
+ virtual const char *className(void) const {
+ return "FilterPeerAS";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "peerAS" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "peerAS" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -432,8 +432,8 @@
+ virtual const char *className(void) const {
+ return "FilterASPath";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "re = ..." << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "re = ..." << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -452,8 +452,8 @@
+ virtual const char *className(void) const {
+ return "FilterPRFXList";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << *this << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << *this << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -477,8 +477,8 @@
+ virtual const char *className(void) const {
+ return "FilterMPPRFXList";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << *this << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); print(os); os << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -516,8 +516,8 @@
+ virtual const char *className(void) const {
+ return "FilterAFI";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << *this << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << *this << std::endl;
+ }
+ #endif // DEBUG
+
+@@ -554,17 +554,17 @@
+ virtual const char *className(void) const {
+ return "FilterRPAttribute";
+ }
+- virtual void printClass(ostream &os, int indent) const {
++ virtual void printClass(std::ostream &os, int indent) const {
+ // For rp_attr
+- INDENT(indent); os << "rp_attr" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
+- INDENT(indent); os << " methods (RPMethod *)" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_attr" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
++ INDENT(indent); os << " methods (RPMethod *)" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_method
+- INDENT(indent); os << "rp_method" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_method" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_args
+- INDENT(indent); os << "args (ItemList *)" << endl;
++ INDENT(indent); os << "args (ItemList *)" << std::endl;
+ args->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -722,7 +722,7 @@
+ return "FilterRouterName";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "name = \"" << name << "\"" << endl;
++ INDENT(indent); os << "name = \"" << name << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
diff --git a/net/irrtoolset-nox11/patches/patch-ch b/net/irrtoolset-nox11/patches/patch-ch
new file mode 100644
index 00000000000..27939c56041
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-ch
@@ -0,0 +1,301 @@
+$NetBSD: patch-ch,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/rpsl/rpsl/rpsl_item.hh.orig 2004-07-30 12:58:15.000000000 +0200
++++ src/rpsl/rpsl/rpsl_item.hh
+@@ -100,8 +100,8 @@ public:
+ virtual Buffer *bufferize(Buffer *buf = NULL, bool lcase = false) const = 0;
+ #ifdef DEBUG
+ virtual const char *className(void) const = 0;
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "(*** Need more work here ***)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "(*** Need more work here ***)" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -131,8 +131,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemASNO";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "asno = " << asno << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "asno = " << asno << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -188,8 +188,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemFilter";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "filter = " << filter << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "filter = " << filter << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -213,8 +213,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemINT";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "i = " << i << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "i = " << i << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -238,8 +238,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemTimeStamp";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "stamp = " << stamp << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "stamp = " << stamp << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -263,8 +263,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemREAL";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "real = " << real << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "real = " << real << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -295,8 +295,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemSTRING";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "string = \"" << string << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "string = \"" << string << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -326,8 +326,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemBLOB";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "blob = \"" << blob << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "blob = \"" << blob << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -358,8 +358,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemBUFFER";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "buffer = \"" << buffer << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "buffer = \"" << buffer << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -391,7 +391,7 @@ public:
+ return "ItemIPV4";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "ipv4 = \"" << *ipv4 << "\"" << endl;
++ INDENT(indent); os << "ipv4 = \"" << *ipv4 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -424,8 +424,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemPRFXV4";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "prfxv4 = \"" << *prfxv4 << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "prfxv4 = \"" << *prfxv4 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -460,8 +460,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemPRFXV4Range";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "prfxv4 = \"" << *prfxv4 << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "prfxv4 = \"" << *prfxv4 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -493,8 +493,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemIPV6";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "ipv6 = \"" << *ipv6 << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "ipv6 = \"" << *ipv6 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -526,8 +526,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemPRFXV6";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "prfxv6 = \"" << *prfxv6 << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "prfxv6 = \"" << *prfxv6 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -563,8 +563,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemPRFXV6Range";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "prfxrangev6 = \"" << *prfxv6 << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "prfxrangev6 = \"" << *prfxv6 << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -596,8 +596,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemAFI";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "afi = \"" << *afi << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "afi = \"" << *afi << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ int operator==(ItemAFI &af) {
+@@ -642,10 +642,10 @@ public:
+ virtual const char *className(void) const {
+ return "ItemConnection";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "ip = \"" << *ip << "\"" << endl;
+- INDENT(indent); os << "host = \"" << host << "\"" << endl;
+- INDENT(indent); os << "port = \"" << port << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "ip = \"" << *ip << "\"" << std::endl;
++ INDENT(indent); os << "host = \"" << host << "\"" << std::endl;
++ INDENT(indent); os << "port = \"" << port << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -667,8 +667,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemSID";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "name (SymID) = \"" << name << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "name (SymID) = \"" << name << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -718,8 +718,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemBOOLEAN";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "i = " << i << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "i = " << i << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -754,8 +754,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemWORD";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "word = \"" << word << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "word = \"" << word << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -782,8 +782,8 @@ public:
+ virtual const char *className(void) const {
+ return "ItemEMAIL";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "email = \"" << email << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "email = \"" << email << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -805,7 +805,7 @@ public:
+ virtual const char *className(void) const {
+ return "ItemFREETEXT";
+ }
+- virtual void printClass(ostream &os, int indent) const {
++ virtual void printClass(std::ostream &os, int indent) const {
+ INDENT(indent); os << "\"";
+ #define DISPLAYFREETEXTLENGTH 63
+ if (length > DISPLAYFREETEXTLENGTH) {
+@@ -813,7 +813,7 @@ public:
+ strncpy(buf, text, DISPLAYFREETEXTLENGTH - 3);
+ buf[DISPLAYFREETEXTLENGTH - 3] = 0;
+ strcat(buf, "...");
+- os << buf << endl;
++ os << buf << std::endl;
+ } else {
+ for (int i = 0; i < length; i++) {
+ char ch = *(text + i);
+@@ -823,7 +823,7 @@ public:
+ os << ch;
+ }
+ }
+- os << "\"" << endl;
++ os << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -902,9 +902,9 @@ public:
+ virtual const char *className(void) const {
+ return "ItemList";
+ }
+- virtual void printClass(ostream &os, int indent) const {
++ virtual void printClass(std::ostream &os, int indent) const {
+ for (Item *item = head(); item; item = next(item)) {
+- INDENT(indent); os << item->className() << endl;
++ INDENT(indent); os << item->className() << std::endl;
+ item->printClass(os, indent + 2);
+ }
+ }
+@@ -935,9 +935,9 @@ public:
+ virtual const char *className(void) const {
+ return "ItemRange";
+ }
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "begin = \"" << "\"" << endl;
+- INDENT(indent); os << "end = \"" << "\"" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "begin = \"" << "\"" << std::endl;
++ INDENT(indent); os << "end = \"" << "\"" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -968,9 +968,9 @@ public:
+ virtual const char *className(void) const {
+ return "ItemSequence";
+ }
+- virtual void printClass(ostream &os, int indent) const {
++ virtual void printClass(std::ostream &os, int indent) const {
+ for (Item *item = head(); item; item = next(item)) {
+- INDENT(indent); os << item->className() << endl;
++ INDENT(indent); os << item->className() << std::endl;
+ item->printClass(os, indent + 2);
+ }
+ }
diff --git a/net/irrtoolset-nox11/patches/patch-ci b/net/irrtoolset-nox11/patches/patch-ci
new file mode 100644
index 00000000000..95a0912aa90
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-ci
@@ -0,0 +1,91 @@
+$NetBSD: patch-ci,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/rpsl/rpsl/rpsl_policy.hh.orig 2004-07-30 12:58:15.000000000 +0200
++++ src/rpsl/rpsl/rpsl_policy.hh
+@@ -91,8 +91,8 @@ public:
+
+ #ifdef DEBUG
+ virtual const char *className(void) const = 0;
+- virtual void printClass(ostream &os, int indent) const {
+- INDENT(indent); os << "(*** Need more work here ***)" << endl;
++ virtual void printClass(std::ostream &os, int indent) const {
++ INDENT(indent); os << "(*** Need more work here ***)" << std::endl;
+ }
+ #endif // DEBUG
+ };
+@@ -170,15 +170,15 @@ public:
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+ // For rp_attr
+- INDENT(indent); os << "rp_attr" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
+- INDENT(indent); os << " methods (RPMethod *)" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_attr" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
++ INDENT(indent); os << " methods (RPMethod *)" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_method
+- INDENT(indent); os << "rp_method" << endl;
+- INDENT(indent); os << " _name = \"" << "\"" << endl;
++ INDENT(indent); os << "rp_method" << std::endl;
++ INDENT(indent); os << " _name = \"" << "\"" << std::endl;
+ // For rp_args
+- INDENT(indent); os << "args (ItemList *)" << endl;
++ INDENT(indent); os << "args (ItemList *)" << std::endl;
+ args->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -231,9 +231,9 @@ public:
+ return "PolicyPeeringAction";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "peering (PolicyPeering *)" << endl;
++ INDENT(indent); os << "peering (PolicyPeering *)" << std::endl;
+ peering->printClass(os, indent + 2);
+- INDENT(indent); os << "action (PolicyActionList *)" << endl;
++ INDENT(indent); os << "action (PolicyActionList *)" << std::endl;
+ action->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -265,14 +265,14 @@ public:
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+ // Action
+- INDENT(indent); os << "peeringActionList" << endl;
++ INDENT(indent); os << "peeringActionList" << std::endl;
+ for (PolicyPeeringAction *pc = peeringActionList->head();
+ pc;
+ pc = peeringActionList->next(pc)) {
+ pc->printClass(os, indent + 2);
+ }
+ // Filter
+- INDENT(indent); os << "filter (Filter *)" << endl;
++ INDENT(indent); os << "filter (Filter *)" << std::endl;
+ filter->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -327,9 +327,9 @@ public:
+ return "PolicyRefine";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "left" << endl;
++ INDENT(indent); os << "left" << std::endl;
+ left->printClass(os, indent + 2);
+- INDENT(indent); os << "right" << endl;
++ INDENT(indent); os << "right" << std::endl;
+ right->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
+@@ -358,9 +358,9 @@ public:
+ return "PolicyExcept";
+ }
+ virtual void printClass(std::ostream &os, int indent) const {
+- INDENT(indent); os << "left" << endl;
++ INDENT(indent); os << "left" << std::endl;
+ left->printClass(os, indent + 2);
+- INDENT(indent); os << "right" << endl;
++ INDENT(indent); os << "right" << std::endl;
+ right->printClass(os, indent + 2);
+ }
+ #endif // DEBUG
diff --git a/net/irrtoolset-nox11/patches/patch-cj b/net/irrtoolset-nox11/patches/patch-cj
new file mode 100644
index 00000000000..92265c85f9b
--- /dev/null
+++ b/net/irrtoolset-nox11/patches/patch-cj
@@ -0,0 +1,50 @@
+$NetBSD: patch-cj,v 1.1 2005/08/26 08:41:46 spz Exp $
+
+--- src/rpslcheck/rpslcheck.cc.orig 2004-07-30 12:58:15.000000000 +0200
++++ src/rpslcheck/rpslcheck.cc
+@@ -129,12 +129,12 @@ void init_and_set_options (int argc, cha
+ IRR::handleEnvironmentVariables(envp);
+
+ if (ParseArgv(&argc, argv, argTable, ARGV_NO_LEFTOVERS) != ARGV_OK) {
+- cerr << endl;
++ std::cerr << std::endl;
+ exit(1);
+ }
+
+ if (! (irr = IRR::newClient())) {
+- cerr << "Unknown protocol!" << endl;
++ std::cerr << "Unknown protocol!" << std::endl;
+ exit(1);
+ }
+
+@@ -166,7 +166,7 @@ main(int argc, char **argv, char **envp)
+ myAS = atoi(opt_my_as + 2);
+ const AutNum *autnum = irr->getAutNum(myAS);
+ if (!autnum) {
+- cerr << "Error: no object for AS " << myAS << endl;
++ std::cerr << "Error: no object for AS " << myAS << std::endl;
+ exit(1);
+ }
+ o = new Object((Object &) *autnum);
+@@ -180,10 +180,10 @@ main(int argc, char **argv, char **envp)
+ }
+
+ if (opt_echo && code)
+- cout << *o;
++ std::cout << *o;
+
+ if (!o->has_error && code)
+- cout << "Congratulations no errors were found" << endl;
++ std::cout << "Congratulations no errors were found" << std::endl;
+
+ delete o;
+
+@@ -197,7 +197,7 @@ main(int argc, char **argv, char **envp)
+ schema.printClassStats();
+
+ if (opt_prompt)
+- cout << endl;
++ std::cout << std::endl;
+
+ if (opt_rusage)
+ clog << ru;