Skip to content

Commit

Permalink
Ripngd part of 6Wind patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
hasso committed May 25, 2003
1 parent dd55f9e commit a94434b
Show file tree
Hide file tree
Showing 17 changed files with 3,147 additions and 1,039 deletions.
27 changes: 27 additions & 0 deletions lib/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ struct memory_list memory_list_lib[] =
{ MTYPE_ROUTE_MAP_INDEX, "Route map index " },
{ MTYPE_ROUTE_MAP_RULE, "Route map rule " },
{ MTYPE_ROUTE_MAP_RULE_STR, "Route map rule str" },
{ MTYPE_ROUTE_MAP_COMPILED, "Route map compiled" },
{ MTYPE_DESC, "Command desc " },
{ MTYPE_BUFFER, "Buffer " },
{ MTYPE_BUFFER_DATA, "Buffer data " },
Expand Down Expand Up @@ -323,6 +324,17 @@ struct memory_list memory_list_rip[] =
{ -1, NULL }
};

struct memory_list memory_list_ripng[] =
{
{ MTYPE_RIPNG, "RIPng structure " },
{ MTYPE_RIPNG_ROUTE, "RIPng route info" },
{ MTYPE_RIPNG_AGGREGATE, "RIPng aggregate " },
{ MTYPE_RIPNG_PEER, "RIPng peer " },
{ MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" },
{ MTYPE_RIPNG_RTE_DATA, "RIPng rte data " },
{ -1, NULL }
};

struct memory_list memory_list_ospf[] =
{
{ MTYPE_OSPF_TOP, "OSPF top " },
Expand Down Expand Up @@ -402,6 +414,8 @@ DEFUN (show_memory_all,
show_memory_vty (vty, memory_list_separator);
show_memory_vty (vty, memory_list_rip);
show_memory_vty (vty, memory_list_separator);
show_memory_vty (vty, memory_list_ripng);
show_memory_vty (vty, memory_list_separator);
show_memory_vty (vty, memory_list_ospf);
show_memory_vty (vty, memory_list_separator);
show_memory_vty (vty, memory_list_ospf6);
Expand Down Expand Up @@ -439,6 +453,17 @@ DEFUN (show_memory_rip,
return CMD_SUCCESS;
}

DEFUN (show_memory_ripng,
show_memory_ripng_cmd,
"show memory ripng",
SHOW_STR
"Memory statistics\n"
"RIPng memory\n")
{
show_memory_vty (vty, memory_list_ripng);
return CMD_SUCCESS;
}

DEFUN (show_memory_bgp,
show_memory_bgp_cmd,
"show memory bgp",
Expand Down Expand Up @@ -479,6 +504,7 @@ memory_init ()
install_element (VIEW_NODE, &show_memory_all_cmd);
install_element (VIEW_NODE, &show_memory_lib_cmd);
install_element (VIEW_NODE, &show_memory_rip_cmd);
install_element (VIEW_NODE, &show_memory_ripng_cmd);
install_element (VIEW_NODE, &show_memory_bgp_cmd);
install_element (VIEW_NODE, &show_memory_ospf_cmd);
install_element (VIEW_NODE, &show_memory_ospf6_cmd);
Expand All @@ -487,6 +513,7 @@ memory_init ()
install_element (ENABLE_NODE, &show_memory_all_cmd);
install_element (ENABLE_NODE, &show_memory_lib_cmd);
install_element (ENABLE_NODE, &show_memory_rip_cmd);
install_element (ENABLE_NODE, &show_memory_ripng_cmd);
install_element (ENABLE_NODE, &show_memory_bgp_cmd);
install_element (ENABLE_NODE, &show_memory_ospf_cmd);
install_element (ENABLE_NODE, &show_memory_ospf6_cmd);
Expand Down
9 changes: 7 additions & 2 deletions lib/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ enum
MTYPE_HASH,
MTYPE_HASH_INDEX,
MTYPE_HASH_BACKET,
MTYPE_RIPNG_ROUTE,
MTYPE_RIPNG_AGGREGATE,
MTYPE_ROUTE_TABLE,
MTYPE_ROUTE_NODE,
MTYPE_ACCESS_LIST,
Expand Down Expand Up @@ -179,6 +177,13 @@ enum
MTYPE_KEYCHAIN,
MTYPE_KEY,

MTYPE_RIPNG,
MTYPE_RIPNG_ROUTE,
MTYPE_RIPNG_AGGREGATE,
MTYPE_RIPNG_PEER,
MTYPE_RIPNG_OFFSET_LIST,
MTYPE_RIPNG_RTE_DATA,

MTYPE_VTYSH_CONFIG,
MTYPE_VTYSH_CONFIG_LINE,

Expand Down
4 changes: 2 additions & 2 deletions ripngd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ sbin_PROGRAMS = ripngd

libripng_a_SOURCES = \
ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \
ripng_routemap.c
ripng_routemap.c ripng_offset.c ripng_peer.c ripng_nexthop.c

noinst_HEADERS = \
ripng_debug.h ripng_route.h ripngd.h

ripngd_SOURCES = \
ripng_main.c $(libripng_a_SOURCES)

ripngd_LDADD = ../lib/libzebra.a
ripngd_LDADD = -L../lib -lzebra

sysconf_DATA = ripngd.conf.sample

Expand Down
3 changes: 2 additions & 1 deletion ripngd/ripng_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ DEFUN (no_debug_ripng_zebra,
struct cmd_node debug_node =
{
DEBUG_NODE,
"" /* Debug node has no interface. */
"", /* Debug node has no interface. */
1 /* VTYSH */
};

int
Expand Down
1 change: 1 addition & 0 deletions ripngd/ripng_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ extern unsigned long ripng_debug_packet;
extern unsigned long ripng_debug_zebra;

void ripng_debug_init ();
void ripng_debug_reset ();

#endif /* _ZEBRA_RIPNG_DEBUG_H */
Loading

0 comments on commit a94434b

Please sign in to comment.