$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;
 
