diff options
author | Everton Marques <everton.marques@gmail.com> | 2009-08-11 15:43:05 -0300 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-02-04 06:07:49 +0100 |
commit | 871dbcfede60a8d2d286728bcbd88f27c2035b87 (patch) | |
tree | f3188f3ab1c4856febf70647a32f6d854668aa50 /lib | |
parent | b162ab753e70328cb6815e58b4bc5b03e9dd4f42 (diff) | |
download | quagga-871dbcfede60a8d2d286728bcbd88f27c2035b87.tar.bz2 quagga-871dbcfede60a8d2d286728bcbd88f27c2035b87.tar.xz |
[pim] Initial pim 0.155
Diffstat (limited to 'lib')
-rw-r--r-- | lib/command.h | 2 | ||||
-rw-r--r-- | lib/log.c | 2 | ||||
-rw-r--r-- | lib/log.h | 2 | ||||
-rw-r--r-- | lib/memory.c | 15 | ||||
-rw-r--r-- | lib/memtypes.c | 17 | ||||
-rw-r--r-- | lib/zebra.h | 17 |
6 files changed, 52 insertions, 3 deletions
diff --git a/lib/command.h b/lib/command.h index 8dc50d0d..5156dbf1 100644 --- a/lib/command.h +++ b/lib/command.h @@ -1,6 +1,7 @@ /* * Zebra configuration command interface routine * Copyright (C) 1997, 98 Kunihiro Ishiguro + * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> * * This file is part of GNU Zebra. * @@ -88,6 +89,7 @@ enum node_type OSPF_NODE, /* OSPF protocol mode */ OSPF6_NODE, /* OSPF protocol for IPv6 mode */ ISIS_NODE, /* ISIS protocol mode */ + PIM_NODE, /* PIM protocol mode */ MASC_NODE, /* MASC for multicast. */ IRDP_NODE, /* ICMP Router Discovery Protocol mode. */ IP_NODE, /* Static ip route node. */ @@ -1,6 +1,7 @@ /* * Logging of zebra * Copyright (C) 1997, 1998, 1999 Kunihiro Ishiguro + * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> * * This file is part of GNU Zebra. * @@ -51,6 +52,7 @@ const char *zlog_proto_names[] = "BABEL", "OSPF6", "ISIS", + "PIM", "MASC", NULL, }; @@ -1,6 +1,7 @@ /* * Zebra logging funcions. * Copyright (C) 1997, 1998, 1999 Kunihiro Ishiguro + * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> * * This file is part of GNU Zebra. * @@ -53,6 +54,7 @@ typedef enum ZLOG_BABEL, ZLOG_OSPF6, ZLOG_ISIS, + ZLOG_PIM, ZLOG_MASC } zlog_proto_t; diff --git a/lib/memory.c b/lib/memory.c index 620bdee5..28bbdc11 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -1,6 +1,7 @@ /* * Memory management routine * Copyright (C) 1998 Kunihiro Ishiguro + * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> * * This file is part of GNU Zebra. * @@ -521,6 +522,17 @@ DEFUN (show_memory_isis, return CMD_SUCCESS; } +DEFUN (show_memory_pim, + show_memory_pim_cmd, + "show memory pim", + SHOW_STR + "Memory statistics\n" + "PIM memory\n") +{ + show_memory_vty (vty, memory_list_pim); + return CMD_SUCCESS; +} + void memory_init (void) { @@ -545,6 +557,7 @@ memory_init (void) install_element (VIEW_NODE, &show_memory_ospf_cmd); install_element (VIEW_NODE, &show_memory_ospf6_cmd); install_element (VIEW_NODE, &show_memory_isis_cmd); + install_element (VIEW_NODE, &show_memory_pim_cmd); install_element (ENABLE_NODE, &show_memory_cmd); install_element (ENABLE_NODE, &show_memory_all_cmd); @@ -556,7 +569,7 @@ memory_init (void) install_element (ENABLE_NODE, &show_memory_bgp_cmd); install_element (ENABLE_NODE, &show_memory_ospf_cmd); install_element (ENABLE_NODE, &show_memory_ospf6_cmd); - install_element (ENABLE_NODE, &show_memory_isis_cmd); + install_element (ENABLE_NODE, &show_memory_pim_cmd); } /* Stats querying from users */ diff --git a/lib/memtypes.c b/lib/memtypes.c index 47a34387..26e27e72 100644 --- a/lib/memtypes.c +++ b/lib/memtypes.c @@ -1,4 +1,6 @@ /* + * Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> + * * Memory type definitions. This file is parsed by memtypes.awk to extract * MTYPE_ and memory_list_.. information in order to autogenerate * memtypes.h. @@ -255,6 +257,20 @@ struct memory_list memory_list_isis[] = { -1, NULL }, }; +struct memory_list memory_list_pim[] = +{ + { MTYPE_PIM_CHANNEL_OIL, "PIM SSM (S,G) channel OIL" }, + { MTYPE_PIM_INTERFACE, "PIM interface" }, + { MTYPE_PIM_IGMP_JOIN, "PIM interface IGMP static join" }, + { MTYPE_PIM_IGMP_SOCKET, "PIM interface IGMP socket" }, + { MTYPE_PIM_IGMP_GROUP, "PIM interface IGMP group" }, + { MTYPE_PIM_IGMP_GROUP_SOURCE, "PIM interface IGMP source" }, + { MTYPE_PIM_NEIGHBOR, "PIM interface neighbor" }, + { MTYPE_PIM_IFCHANNEL, "PIM interface (S,G) state" }, + { MTYPE_PIM_UPSTREAM, "PIM upstream (S,G) state" }, + { -1, NULL }, +}; + struct memory_list memory_list_vtysh[] = { { MTYPE_VTYSH_CONFIG, "Vtysh configuration", }, @@ -271,5 +287,6 @@ struct mlist mlists[] __attribute__ ((unused)) = { { memory_list_ospf6, "OSPF6" }, { memory_list_isis, "ISIS" }, { memory_list_bgp, "BGP" }, + { memory_list_pim, "PIM" }, { NULL, NULL}, }; diff --git a/lib/zebra.h b/lib/zebra.h index a4e02148..67d714cf 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -1,5 +1,6 @@ /* Zebra common header. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Kunihiro Ishiguro + Portions Copyright (c) 2008 Everton da Silva Marques <everton.marques@gmail.com> This file is part of GNU Zebra. @@ -434,8 +435,20 @@ struct in_pktinfo */ #define ZEBRA_HEADER_MARKER 255 -/* Zebra route's types are defined in route_types.h */ -#include "route_types.h" +/* Zebra route's types. */ +#define ZEBRA_ROUTE_SYSTEM 0 +#define ZEBRA_ROUTE_KERNEL 1 +#define ZEBRA_ROUTE_CONNECT 2 +#define ZEBRA_ROUTE_STATIC 3 +#define ZEBRA_ROUTE_RIP 4 +#define ZEBRA_ROUTE_RIPNG 5 +#define ZEBRA_ROUTE_OSPF 6 +#define ZEBRA_ROUTE_OSPF6 7 +#define ZEBRA_ROUTE_ISIS 8 +#define ZEBRA_ROUTE_BGP 9 +#define ZEBRA_ROUTE_HSLS 10 +#define ZEBRA_ROUTE_PIM 11 +#define ZEBRA_ROUTE_MAX 12 /* Note: whenever a new route-type or zserv-command is added the * corresponding {command,route}_types[] table in lib/log.c MUST be |