mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 16:23:29 +00:00
Revert my http://hasso.linux.ee/zebra/ht-ifrmap-14042003.patch patch. Used
same idea as in lib/distribute.c to allow extract.pl to pick up commands for vtysh.
This commit is contained in:
parent
04a72e593b
commit
0750d21fcf
@ -10,7 +10,7 @@ libzebra_a_SOURCES = \
|
|||||||
print_version.c checksum.c vector.c linklist.c vty.c command.c \
|
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 \
|
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 \
|
filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
|
||||||
zclient.c sockopt.c smux.c md5.c keychain.c
|
zclient.c sockopt.c smux.c md5.c if_rmap.c keychain.c
|
||||||
|
|
||||||
libzebra_a_DEPENDENCIES = @LIB_REGEX@
|
libzebra_a_DEPENDENCIES = @LIB_REGEX@
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ noinst_HEADERS = \
|
|||||||
buffer.h command.h filter.h getopt.h hash.h if.h linklist.h log.h \
|
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 \
|
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 \
|
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 keychain.h
|
plist.h zclient.h sockopt.h smux.h md5-gnu.h if_rmap.h keychain.h
|
||||||
|
|
||||||
EXTRA_DIST = regex.c regex-gnu.h
|
EXTRA_DIST = regex.c regex-gnu.h
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
#include "ripng_ifrmap.h"
|
#include "if_rmap.h"
|
||||||
|
|
||||||
struct hash *ifrmaphash;
|
struct hash *ifrmaphash;
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ if_rmap_unset (char *ifname, enum if_rmap_type type, char *routemap_name)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (ripng_if_rmap,
|
DEFUN (if_rmap,
|
||||||
ripng_if_rmap_cmd,
|
if_rmap_cmd,
|
||||||
"route-map RMAP_NAME (in|out) IFNAME",
|
"route-map RMAP_NAME (in|out) IFNAME",
|
||||||
"Route map set\n"
|
"Route map set\n"
|
||||||
"Route map name\n"
|
"Route map name\n"
|
||||||
@ -221,8 +221,8 @@ DEFUN (ripng_if_rmap,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (no_ripng_if_rmap,
|
DEFUN (no_if_rmap,
|
||||||
no_ripng_if_rmap_cmd,
|
no_if_rmap_cmd,
|
||||||
"no route-map ROUTEMAP_NAME (in|out) IFNAME",
|
"no route-map ROUTEMAP_NAME (in|out) IFNAME",
|
||||||
NO_STR
|
NO_STR
|
||||||
"Route map unset\n"
|
"Route map unset\n"
|
||||||
@ -296,10 +296,11 @@ if_rmap_reset ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
if_rmap_init (void)
|
if_rmap_init (int node)
|
||||||
{
|
{
|
||||||
ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp);
|
ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp);
|
||||||
|
if (node == RIPNG_NODE) {
|
||||||
install_element (RIPNG_NODE, &ripng_if_rmap_cmd);
|
install_element (RIPNG_NODE, &if_rmap_cmd);
|
||||||
install_element (RIPNG_NODE, &no_ripng_if_rmap_cmd);
|
install_element (RIPNG_NODE, &no_if_rmap_cmd);
|
||||||
|
}
|
||||||
}
|
}
|
@ -37,7 +37,7 @@ struct if_rmap
|
|||||||
char *routemap[IF_RMAP_MAX];
|
char *routemap[IF_RMAP_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
void if_rmap_init (void);
|
void if_rmap_init (int);
|
||||||
void if_rmap_reset (void);
|
void if_rmap_reset (void);
|
||||||
void if_rmap_hook_add (void (*) (struct if_rmap *));
|
void if_rmap_hook_add (void (*) (struct if_rmap *));
|
||||||
void if_rmap_hook_delete (void (*) (struct if_rmap *));
|
void if_rmap_hook_delete (void (*) (struct if_rmap *));
|
@ -9,10 +9,10 @@ sbin_PROGRAMS = ripngd
|
|||||||
|
|
||||||
libripng_a_SOURCES = \
|
libripng_a_SOURCES = \
|
||||||
ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \
|
ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \
|
||||||
ripng_routemap.c ripng_ifrmap.c
|
ripng_routemap.c
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
ripng_debug.h ripng_route.h ripngd.h ripng_ifrmap.h
|
ripng_debug.h ripng_route.h ripngd.h
|
||||||
|
|
||||||
ripngd_SOURCES = \
|
ripngd_SOURCES = \
|
||||||
ripng_main.c $(libripng_a_SOURCES)
|
ripng_main.c $(libripng_a_SOURCES)
|
||||||
|
@ -37,11 +37,11 @@
|
|||||||
#include "distribute.h"
|
#include "distribute.h"
|
||||||
#include "plist.h"
|
#include "plist.h"
|
||||||
#include "routemap.h"
|
#include "routemap.h"
|
||||||
|
#include "if_rmap.h"
|
||||||
|
|
||||||
#include "ripngd/ripngd.h"
|
#include "ripngd/ripngd.h"
|
||||||
#include "ripngd/ripng_route.h"
|
#include "ripngd/ripng_route.h"
|
||||||
#include "ripngd/ripng_debug.h"
|
#include "ripngd/ripng_debug.h"
|
||||||
#include "ripngd/ripng_ifrmap.h"
|
|
||||||
|
|
||||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
@ -2520,7 +2520,7 @@ ripng_init ()
|
|||||||
route_map_add_hook (ripng_routemap_update);
|
route_map_add_hook (ripng_routemap_update);
|
||||||
route_map_delete_hook (ripng_routemap_update);
|
route_map_delete_hook (ripng_routemap_update);
|
||||||
|
|
||||||
if_rmap_init ();
|
if_rmap_init (RIPNG_NODE);
|
||||||
if_rmap_hook_add (ripng_if_rmap_update);
|
if_rmap_hook_add (ripng_if_rmap_update);
|
||||||
if_rmap_hook_delete (ripng_if_rmap_update);
|
if_rmap_hook_delete (ripng_if_rmap_update);
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,9 @@ sysconf_DATA = vtysh.conf.sample
|
|||||||
EXTRA_DIST = extract.pl vtysh.conf.sample
|
EXTRA_DIST = extract.pl vtysh.conf.sample
|
||||||
|
|
||||||
rebuild4:
|
rebuild4:
|
||||||
./extract.pl ../zebra/*.c ../ripd/*.c ../ospfd/*.c ../bgpd/*.c ../lib/keychain.c ../lib/routemap.c ../lib/filter.c ../lib/plist.c ../lib/distribute.c > vtysh_cmd.c
|
./extract.pl ../zebra/*.c ../ripd/*.c ../ospfd/*.c ../bgpd/*.c ../lib/keychain.c ../lib/routemap.c ../lib/filter.c ../lib/plist.c ../lib/distribute.c ../lib/if_rmap.c > vtysh_cmd.c
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
./extract.pl ../zebra/*.c ../ripd/*.c ../ripngd/*.c ../ospfd/*.c ../ospf6d/*.c ../bgpd/*.c ../lib/keychain.c ../lib/routemap.c ../lib/filter.c ../lib/plist.c ../lib/distribute.c > vtysh_cmd.c
|
./extract.pl ../zebra/*.c ../ripd/*.c ../ripngd/*.c ../ospfd/*.c ../ospf6d/*.c ../bgpd/*.c ../lib/keychain.c ../lib/routemap.c ../lib/filter.c ../lib/plist.c ../lib/distribute.c ../lib/if_rmap.c > vtysh_cmd.c
|
||||||
|
|
||||||
vtysh_cmd.c: rebuild
|
vtysh_cmd.c: rebuild
|
||||||
|
@ -108,6 +108,9 @@ foreach (@ARGV) {
|
|||||||
$protocol = "VTYSH_RIPD";
|
$protocol = "VTYSH_RIPD";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($file =~ /if_rmap.c/) {
|
||||||
|
$protocol = "VTYSH_RIPNGD";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
($protocol) = ($file =~ /\/([a-z0-9]+)/);
|
($protocol) = ($file =~ /\/([a-z0-9]+)/);
|
||||||
$protocol = "VTYSH_" . uc $protocol;
|
$protocol = "VTYSH_" . uc $protocol;
|
||||||
|
Loading…
Reference in New Issue
Block a user