*** rancid-2.3.1/bin/rancid	Thu Oct  6 22:40:22 2005
--- /usr/local/rancid/bin/rancid	Sat Oct  8 22:23:41 2005
***************
*** 578,583 ****
--- 578,698 ----
      return;
  }
  
+ # Local modification - 02/18/03 - dlp
+ # This routine prints the IP routing table on core, non-border routers
+ sub ShowIPRouteConnected {
+     print STDERR "    In ShowIPRouteConnected: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);   
+         if ($_ =~ /^C|^\s+\[/) {
+           #$_ = (split(",",$_,2))[0]."\n";               
+         } else {
+           next;
+         }           
+         ProcessHistory("ROUTES","numsort","","!Connected Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ 
+ sub ShowIPRouteStatic {
+     print STDERR "    In ShowIPRouteStatic: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);
+         if ($_ =~ /^S|^\s+\[/) {
+           #$_ = (split(",",$_,2))[0]."\n";
+         } else {
+           next;
+         }
+         ProcessHistory("ROUTES","numsort","","!Static Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ 
+ sub ShowIPRouteRIP {
+     print STDERR "    In ShowIPRouteRIP: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);
+         if ($_ =~ /^R|^\s+\[/) {
+           $_ = (split(",",$_,2))[0]."\n";
+         } else {
+           next;
+         }
+         ProcessHistory("ROUTES","numsort","","!RIP Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ 
+ sub ShowIPRouteIGRP {
+     print STDERR "    In ShowIPRouteIGRP: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);
+         if ($_ =~ /^I|^\s+\[/) {
+           $_ = (split(",",$_,2))[0]."\n";
+         } else {
+           next;
+         }
+         ProcessHistory("ROUTES","keysort","","!IGRP Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ sub ShowIPRouteEIGRP {
+     print STDERR "    In ShowIPRouteEIGRP: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);
+         if ($_ =~ /^D|^\s+\[/) {
+           $_ = (split(",",$_,2))[0]."\n";
+         } else {
+           next;
+         }
+         ProcessHistory("ROUTES","numsort","","!EIGRP Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ 
+ sub ShowIPRouteOSPF {
+     print STDERR "    In ShowIPRouteOSPF: $_" if ($debug);
+     while (<INPUT>) {
+         tr/\015//d;
+         last if(/^$prompt/);
+         next if (/^\s*$/);
+         return(1) if /(Invalid input detected|Type help or )/;
+         return(-1) if (/command authorization failed/i);
+         if ($_ =~ /^O|^\s+\[/) {
+           $_ = (split(",",$_,2))[0]."\n";
+         } else {
+           next;
+         }
+         ProcessHistory("ROUTES","numsort","","!OSPF Routes: $_");
+     }
+     ProcessHistory("","","","!\n");
+     return(0);
+ }
+ 
  # This routine parses "dir /all ((disk|slot)N|bootflash|nvram):"
  sub DirSlotN {
      # Skip if this is not a 3600, 7000, 7200, 7500, or 12000.
***************
*** 1465,1470 ****
--- 1580,1591 ----
  	'show controllers cbus'	=> "ShowContCbus",
  	'show diagbus'		=> "ShowDiagbus",
  	'show diag'		=> "ShowDiag",
+         'show ip route connected' => "ShowIPRouteConnected", 
+         'show ip route static'  => "ShowIPRouteStatic",
+         'show ip route rip'     => "ShowIPRouteRIP",     
+         'show ip route igrp'    => "ShowIPRouteIGRP",        
+         'show ip route eigrp'   => "ShowIPRouteEIGRP",
+         'show ip route ospf'    => "ShowIPRouteOSPF",
  	'show module'		=> "ShowModule",	# cat 6500-ios
  	'show spe version'	=> "ShowSpeVersion",
  	'show c7200'		=> "ShowC7200",
***************
*** 1521,1526 ****
--- 1642,1653 ----
  	"show controllers cbus",
  	"show diagbus",
  	"show diag",
+         "show ip route connected",
+         "show ip route static",
+         "show ip route rip",
+         "show ip route igrp",
+         "show ip route eigrp",
+         "show ip route ospf",
  	"show module",
  	"show spe version",
  	"show c7200",
