Hasso Tepper
http://hasso.linux.ee/zebra/ht-ifrmap-14042003.patch
Allows to extract.pl to pickup "route-map xxx in/out dev" commands for vtysh
(ripngd). As lib/if_rmap.[c|h] are used in ripngd only, I moved them to the
ripngd/ directory.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 0268060..7576cc8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -10,7 +10,7 @@
 	print_version.c checksum.c vector.c linklist.c vty.c command.c \
 	sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
 	filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
-	zclient.c sockopt.c smux.c md5.c if_rmap.c keychain.c
+	zclient.c sockopt.c smux.c md5.c keychain.c
 
 libzebra_a_DEPENDENCIES = @LIB_REGEX@
 
@@ -20,7 +20,7 @@
 	buffer.h command.h filter.h getopt.h hash.h if.h linklist.h log.h \
 	memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
 	str.h stream.h table.h thread.h vector.h version.h vty.h zebra.h \
-	plist.h zclient.h sockopt.h smux.h md5-gnu.h if_rmap.h keychain.h
+	plist.h zclient.h sockopt.h smux.h md5-gnu.h keychain.h
 
 EXTRA_DIST = regex.c regex-gnu.h
 
diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am
index 2835aa2..90b8b65 100644
--- a/ripngd/Makefile.am
+++ b/ripngd/Makefile.am
@@ -9,10 +9,10 @@
 
 libripng_a_SOURCES = \
 	ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \
-	ripng_routemap.c
+	ripng_routemap.c ripng_ifrmap.c
 
 noinst_HEADERS = \
-	ripng_debug.h ripng_route.h ripngd.h
+	ripng_debug.h ripng_route.h ripngd.h ripng_ifrmap.h
 
 ripngd_SOURCES = \
 	ripng_main.c $(libripng_a_SOURCES)
diff --git a/lib/if_rmap.c b/ripngd/ripng_ifrmap.c
similarity index 97%
rename from lib/if_rmap.c
rename to ripngd/ripng_ifrmap.c
index d3031fa..3375965 100644
--- a/lib/if_rmap.c
+++ b/ripngd/ripng_ifrmap.c
@@ -25,7 +25,7 @@
 #include "command.h"
 #include "memory.h"
 #include "if.h"
-#include "if_rmap.h"
+#include "ripng_ifrmap.h"
 
 struct hash *ifrmaphash;
 
@@ -296,10 +296,10 @@
 }
 
 void
-if_rmap_init (int node)
+if_rmap_init (void)
 {
   ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp);
 
-  install_element (node, &if_rmap_cmd);
-  install_element (node, &no_if_rmap_cmd);
+  install_element (RIPNG_NODE, &if_rmap_cmd);
+  install_element (RIPNG_NODE, &no_if_rmap_cmd);
 }
diff --git a/lib/if_rmap.h b/ripngd/ripng_ifrmap.h
similarity index 97%
rename from lib/if_rmap.h
rename to ripngd/ripng_ifrmap.h
index a9355ab..c8bc223 100644
--- a/lib/if_rmap.h
+++ b/ripngd/ripng_ifrmap.h
@@ -37,7 +37,7 @@
   char *routemap[IF_RMAP_MAX];
 };
 
-void if_rmap_init (int);
+void if_rmap_init (void);
 void if_rmap_reset (void);
 void if_rmap_hook_add (void (*) (struct if_rmap *));
 void if_rmap_hook_delete (void (*) (struct if_rmap *));
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 81f0eca..fcf8e3c 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -37,11 +37,11 @@
 #include "distribute.h"
 #include "plist.h"
 #include "routemap.h"
-#include "if_rmap.h"
 
 #include "ripngd/ripngd.h"
 #include "ripngd/ripng_route.h"
 #include "ripngd/ripng_debug.h"
+#include "ripngd/ripng_ifrmap.h"
 
 #define min(a, b) ((a) < (b) ? (a) : (b))
 
@@ -535,7 +535,7 @@
       int ret;
       struct ripng_info newinfo;
 
-      memset (&rinfo, 0, sizeof (struct ripng_info));
+      memset (&newinfo, 0, sizeof (struct ripng_info));
       newinfo.metric = rte->metric;
 
       ret = route_map_apply (ri->routemap[RIPNG_FILTER_IN], 
@@ -2520,7 +2520,7 @@
   route_map_add_hook (ripng_routemap_update);
   route_map_delete_hook (ripng_routemap_update);
 
-  if_rmap_init (RIPNG_NODE);
+  if_rmap_init ();
   if_rmap_hook_add (ripng_if_rmap_update);
   if_rmap_hook_delete (ripng_if_rmap_update);
 }