blob: 6eb135f02c46a8c7360def5a595feb122b4e68d6 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
2 * Memory management routine
3 * Copyright (C) 1998 Kunihiro Ishiguro
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 * 02111-1307, USA.
21 */
22
23#include <zebra.h>
24
25#include "log.h"
26#include "memory.h"
27
ajsf858e492004-11-16 14:25:30 +000028static void alloc_inc (int);
29static void alloc_dec (int);
ajs7fa25ff2004-11-15 16:12:32 +000030static void log_memstats(int log_priority);
paul718e3742002-12-13 20:15:29 +000031
ajsf858e492004-11-16 14:25:30 +000032static struct message mstr [] =
paul718e3742002-12-13 20:15:29 +000033{
34 { MTYPE_THREAD, "thread" },
35 { MTYPE_THREAD_MASTER, "thread_master" },
36 { MTYPE_VECTOR, "vector" },
37 { MTYPE_VECTOR_INDEX, "vector_index" },
38 { MTYPE_IF, "interface" },
39 { 0, NULL },
40};
41
42/* Fatal memory allocation error occured. */
43static void
44zerror (const char *fname, int type, size_t size)
45{
ajs7fa25ff2004-11-15 16:12:32 +000046 zlog_err ("%s : can't allocate memory for `%s' size %d: %s\n",
ajs6099b3b2004-11-20 02:06:59 +000047 fname, lookup (mstr, type), (int) size, safe_strerror(errno));
ajs7fa25ff2004-11-15 16:12:32 +000048 log_memstats(LOG_WARNING);
49 abort();
paul718e3742002-12-13 20:15:29 +000050}
51
52/* Memory allocation. */
53void *
54zmalloc (int type, size_t size)
55{
56 void *memory;
57
58 memory = malloc (size);
59
60 if (memory == NULL)
61 zerror ("malloc", type, size);
62
63 alloc_inc (type);
64
65 return memory;
66}
67
68/* Memory allocation with num * size with cleared. */
69void *
70zcalloc (int type, size_t size)
71{
72 void *memory;
73
74 memory = calloc (1, size);
75
76 if (memory == NULL)
77 zerror ("calloc", type, size);
78
79 alloc_inc (type);
80
81 return memory;
82}
83
84/* Memory reallocation. */
85void *
86zrealloc (int type, void *ptr, size_t size)
87{
88 void *memory;
89
90 memory = realloc (ptr, size);
91 if (memory == NULL)
92 zerror ("realloc", type, size);
93 return memory;
94}
95
96/* Memory free. */
97void
98zfree (int type, void *ptr)
99{
100 alloc_dec (type);
101 free (ptr);
102}
103
104/* String duplication. */
105char *
hassob04c6992004-10-04 19:10:31 +0000106zstrdup (int type, const char *str)
paul718e3742002-12-13 20:15:29 +0000107{
108 void *dup;
109
110 dup = strdup (str);
111 if (dup == NULL)
112 zerror ("strdup", type, strlen (str));
113 alloc_inc (type);
114 return dup;
115}
116
117#ifdef MEMORY_LOG
ajsf858e492004-11-16 14:25:30 +0000118static struct
paul718e3742002-12-13 20:15:29 +0000119{
hassob04c6992004-10-04 19:10:31 +0000120 const char *name;
paul718e3742002-12-13 20:15:29 +0000121 unsigned long alloc;
122 unsigned long t_malloc;
123 unsigned long c_malloc;
124 unsigned long t_calloc;
125 unsigned long c_calloc;
126 unsigned long t_realloc;
127 unsigned long t_free;
128 unsigned long c_strdup;
129} mstat [MTYPE_MAX];
130
ajsf858e492004-11-16 14:25:30 +0000131static void
paul718e3742002-12-13 20:15:29 +0000132mtype_log (char *func, void *memory, const char *file, int line, int type)
133{
134 zlog_info ("%s: %s %p %s %d", func, lookup (mstr, type), memory, file, line);
135}
136
137void *
138mtype_zmalloc (const char *file, int line, int type, size_t size)
139{
140 void *memory;
141
142 mstat[type].c_malloc++;
143 mstat[type].t_malloc++;
144
145 memory = zmalloc (type, size);
146 mtype_log ("zmalloc", memory, file, line, type);
147
148 return memory;
149}
150
151void *
152mtype_zcalloc (const char *file, int line, int type, size_t size)
153{
154 void *memory;
155
156 mstat[type].c_calloc++;
157 mstat[type].t_calloc++;
158
159 memory = zcalloc (type, size);
160 mtype_log ("xcalloc", memory, file, line, type);
161
162 return memory;
163}
164
165void *
166mtype_zrealloc (const char *file, int line, int type, void *ptr, size_t size)
167{
168 void *memory;
169
170 /* Realloc need before allocated pointer. */
171 mstat[type].t_realloc++;
172
173 memory = zrealloc (type, ptr, size);
174
175 mtype_log ("xrealloc", memory, file, line, type);
176
177 return memory;
178}
179
180/* Important function. */
181void
182mtype_zfree (const char *file, int line, int type, void *ptr)
183{
184 mstat[type].t_free++;
185
186 mtype_log ("xfree", ptr, file, line, type);
187
188 zfree (type, ptr);
189}
190
191char *
hassob04c6992004-10-04 19:10:31 +0000192mtype_zstrdup (const char *file, int line, int type, const char *str)
paul718e3742002-12-13 20:15:29 +0000193{
194 char *memory;
195
196 mstat[type].c_strdup++;
197
198 memory = zstrdup (type, str);
199
200 mtype_log ("xstrdup", memory, file, line, type);
201
202 return memory;
203}
204#else
ajsf858e492004-11-16 14:25:30 +0000205static struct
paul718e3742002-12-13 20:15:29 +0000206{
207 char *name;
208 unsigned long alloc;
209} mstat [MTYPE_MAX];
210#endif /* MTPYE_LOG */
211
212/* Increment allocation counter. */
ajsf858e492004-11-16 14:25:30 +0000213static void
paul718e3742002-12-13 20:15:29 +0000214alloc_inc (int type)
215{
216 mstat[type].alloc++;
217}
218
219/* Decrement allocation counter. */
ajsf858e492004-11-16 14:25:30 +0000220static void
paul718e3742002-12-13 20:15:29 +0000221alloc_dec (int type)
222{
223 mstat[type].alloc--;
224}
225
226/* Looking up memory status from vty interface. */
227#include "vector.h"
228#include "vty.h"
229#include "command.h"
230
231/* For pretty printng of memory allocate information. */
232struct memory_list
233{
234 int index;
hassob04c6992004-10-04 19:10:31 +0000235 const char *format;
paul718e3742002-12-13 20:15:29 +0000236};
237
ajsf858e492004-11-16 14:25:30 +0000238static struct memory_list memory_list_lib[] =
paul718e3742002-12-13 20:15:29 +0000239{
240 { MTYPE_TMP, "Temporary memory" },
241 { MTYPE_ROUTE_TABLE, "Route table " },
242 { MTYPE_ROUTE_NODE, "Route node " },
243 { MTYPE_RIB, "RIB " },
paul9035efa2004-10-10 11:56:56 +0000244 { MTYPE_DISTRIBUTE, "Distribute list " },
245 { MTYPE_DISTRIBUTE_IFNAME, "Dist-list ifname" },
paul718e3742002-12-13 20:15:29 +0000246 { MTYPE_NEXTHOP, "Nexthop " },
247 { MTYPE_LINK_LIST, "Link List " },
248 { MTYPE_LINK_NODE, "Link Node " },
249 { MTYPE_HASH, "Hash " },
250 { MTYPE_HASH_BACKET, "Hash Bucket " },
251 { MTYPE_ACCESS_LIST, "Access List " },
252 { MTYPE_ACCESS_LIST_STR, "Access List Str " },
253 { MTYPE_ACCESS_FILTER, "Access Filter " },
254 { MTYPE_PREFIX_LIST, "Prefix List " },
255 { MTYPE_PREFIX_LIST_STR, "Prefix List Str " },
256 { MTYPE_PREFIX_LIST_ENTRY, "Prefix List Entry "},
257 { MTYPE_ROUTE_MAP, "Route map " },
258 { MTYPE_ROUTE_MAP_NAME, "Route map name " },
259 { MTYPE_ROUTE_MAP_INDEX, "Route map index " },
260 { MTYPE_ROUTE_MAP_RULE, "Route map rule " },
261 { MTYPE_ROUTE_MAP_RULE_STR, "Route map rule str" },
hassoa94434b2003-05-25 17:10:12 +0000262 { MTYPE_ROUTE_MAP_COMPILED, "Route map compiled" },
paul718e3742002-12-13 20:15:29 +0000263 { MTYPE_DESC, "Command desc " },
264 { MTYPE_BUFFER, "Buffer " },
265 { MTYPE_BUFFER_DATA, "Buffer data " },
266 { MTYPE_STREAM, "Stream " },
267 { MTYPE_KEYCHAIN, "Key chain " },
268 { MTYPE_KEY, "Key " },
269 { MTYPE_VTY, "VTY " },
270 { -1, NULL }
271};
272
ajsf858e492004-11-16 14:25:30 +0000273static struct memory_list memory_list_bgp[] =
paul718e3742002-12-13 20:15:29 +0000274{
275 { MTYPE_BGP_PEER, "BGP peer" },
276 { MTYPE_ATTR, "BGP attribute" },
277 { MTYPE_AS_PATH, "BGP aspath" },
278 { MTYPE_AS_SEG, "BGP aspath seg" },
279 { MTYPE_AS_STR, "BGP aspath str" },
280 { 0, NULL },
281 { MTYPE_BGP_TABLE, "BGP table" },
282 { MTYPE_BGP_NODE, "BGP node" },
283 { MTYPE_BGP_ADVERTISE_ATTR, "BGP adv attr" },
284 { MTYPE_BGP_ADVERTISE, "BGP adv" },
285 { MTYPE_BGP_ADJ_IN, "BGP adj in" },
286 { MTYPE_BGP_ADJ_OUT, "BGP adj out" },
287 { 0, NULL },
288 { MTYPE_AS_LIST, "BGP AS list" },
289 { MTYPE_AS_FILTER, "BGP AS filter" },
290 { MTYPE_AS_FILTER_STR, "BGP AS filter str" },
291 { 0, NULL },
292 { MTYPE_COMMUNITY, "community" },
293 { MTYPE_COMMUNITY_VAL, "community val" },
294 { MTYPE_COMMUNITY_STR, "community str" },
295 { 0, NULL },
296 { MTYPE_ECOMMUNITY, "extcommunity" },
297 { MTYPE_ECOMMUNITY_VAL, "extcommunity val" },
298 { MTYPE_ECOMMUNITY_STR, "extcommunity str" },
299 { 0, NULL },
300 { MTYPE_COMMUNITY_LIST, "community-list" },
301 { MTYPE_COMMUNITY_LIST_NAME, "community-list name" },
302 { MTYPE_COMMUNITY_LIST_ENTRY, "community-list entry" },
303 { MTYPE_COMMUNITY_LIST_CONFIG, "community-list config" },
304 { 0, NULL },
305 { MTYPE_CLUSTER, "Cluster list" },
306 { MTYPE_CLUSTER_VAL, "Cluster list val" },
307 { 0, NULL },
308 { MTYPE_TRANSIT, "BGP transit attr" },
309 { MTYPE_TRANSIT_VAL, "BGP transit val" },
310 { 0, NULL },
311 { MTYPE_BGP_DISTANCE, "BGP distance" },
312 { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" },
313 { MTYPE_BGP_CONFED_LIST, "BGP confed list" },
314 { MTYPE_PEER_UPDATE_SOURCE, "peer update if" },
315 { MTYPE_BGP_DAMP_INFO, "Dampening info" },
316 { MTYPE_BGP_REGEXP, "BGP regexp" },
317 { -1, NULL }
318};
319
ajsf858e492004-11-16 14:25:30 +0000320static struct memory_list memory_list_rip[] =
paul718e3742002-12-13 20:15:29 +0000321{
322 { MTYPE_RIP, "RIP structure " },
323 { MTYPE_RIP_INFO, "RIP route info " },
324 { MTYPE_RIP_INTERFACE, "RIP interface " },
325 { MTYPE_RIP_PEER, "RIP peer " },
326 { MTYPE_RIP_OFFSET_LIST, "RIP offset list " },
327 { MTYPE_RIP_DISTANCE, "RIP distance " },
328 { -1, NULL }
329};
330
ajsf858e492004-11-16 14:25:30 +0000331static struct memory_list memory_list_ripng[] =
hassoa94434b2003-05-25 17:10:12 +0000332{
333 { MTYPE_RIPNG, "RIPng structure " },
334 { MTYPE_RIPNG_ROUTE, "RIPng route info" },
335 { MTYPE_RIPNG_AGGREGATE, "RIPng aggregate " },
336 { MTYPE_RIPNG_PEER, "RIPng peer " },
337 { MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" },
338 { MTYPE_RIPNG_RTE_DATA, "RIPng rte data " },
339 { -1, NULL }
340};
341
ajsf858e492004-11-16 14:25:30 +0000342static struct memory_list memory_list_ospf[] =
paul718e3742002-12-13 20:15:29 +0000343{
344 { MTYPE_OSPF_TOP, "OSPF top " },
345 { MTYPE_OSPF_AREA, "OSPF area " },
346 { MTYPE_OSPF_AREA_RANGE, "OSPF area range " },
347 { MTYPE_OSPF_NETWORK, "OSPF network " },
348#ifdef NBMA_ENABLE
349 { MTYPE_OSPF_NEIGHBOR_STATIC,"OSPF static nbr " },
350#endif /* NBMA_ENABLE */
351 { MTYPE_OSPF_IF, "OSPF interface " },
352 { MTYPE_OSPF_NEIGHBOR, "OSPF neighbor " },
353 { MTYPE_OSPF_ROUTE, "OSPF route " },
354 { MTYPE_OSPF_TMP, "OSPF tmp mem " },
355 { MTYPE_OSPF_LSA, "OSPF LSA " },
356 { MTYPE_OSPF_LSA_DATA, "OSPF LSA data " },
357 { MTYPE_OSPF_LSDB, "OSPF LSDB " },
358 { MTYPE_OSPF_PACKET, "OSPF packet " },
359 { MTYPE_OSPF_FIFO, "OSPF FIFO queue " },
360 { MTYPE_OSPF_VERTEX, "OSPF vertex " },
361 { MTYPE_OSPF_NEXTHOP, "OSPF nexthop " },
362 { MTYPE_OSPF_PATH, "OSPF path " },
363 { MTYPE_OSPF_VL_DATA, "OSPF VL data " },
364 { MTYPE_OSPF_CRYPT_KEY, "OSPF crypt key " },
365 { MTYPE_OSPF_EXTERNAL_INFO, "OSPF ext. info " },
366 { MTYPE_OSPF_DISTANCE, "OSPF distance " },
367 { MTYPE_OSPF_IF_INFO, "OSPF if info " },
368 { MTYPE_OSPF_IF_PARAMS, "OSPF if params " },
369 { -1, NULL },
370};
371
ajsf858e492004-11-16 14:25:30 +0000372static struct memory_list memory_list_ospf6[] =
paul718e3742002-12-13 20:15:29 +0000373{
374 { MTYPE_OSPF6_TOP, "OSPF6 top " },
375 { MTYPE_OSPF6_AREA, "OSPF6 area " },
376 { MTYPE_OSPF6_IF, "OSPF6 interface " },
377 { MTYPE_OSPF6_NEIGHBOR, "OSPF6 neighbor " },
378 { MTYPE_OSPF6_ROUTE, "OSPF6 route " },
379 { MTYPE_OSPF6_PREFIX, "OSPF6 prefix " },
380 { MTYPE_OSPF6_MESSAGE, "OSPF6 message " },
381 { MTYPE_OSPF6_LSA, "OSPF6 LSA " },
382 { MTYPE_OSPF6_LSA_SUMMARY, "OSPF6 LSA summary " },
383 { MTYPE_OSPF6_LSDB, "OSPF6 LSA database" },
384 { MTYPE_OSPF6_VERTEX, "OSPF6 vertex " },
385 { MTYPE_OSPF6_SPFTREE, "OSPF6 SPF tree " },
386 { MTYPE_OSPF6_NEXTHOP, "OSPF6 nexthop " },
387 { MTYPE_OSPF6_EXTERNAL_INFO,"OSPF6 ext. info " },
388 { MTYPE_OSPF6_OTHER, "OSPF6 other " },
389 { -1, NULL },
390};
391
ajsf858e492004-11-16 14:25:30 +0000392static struct memory_list memory_list_isis[] =
jardin9e867fe2003-12-23 08:56:18 +0000393{
394 { MTYPE_ISIS, "ISIS " },
395 { MTYPE_ISIS_TMP, "ISIS TMP " },
396 { MTYPE_ISIS_CIRCUIT, "ISIS circuit " },
397 { MTYPE_ISIS_LSP, "ISIS LSP " },
398 { MTYPE_ISIS_ADJACENCY, "ISIS adjacency " },
399 { MTYPE_ISIS_AREA, "ISIS area " },
400 { MTYPE_ISIS_AREA_ADDR, "ISIS area address " },
401 { MTYPE_ISIS_TLV, "ISIS TLV " },
402 { MTYPE_ISIS_DYNHN, "ISIS dyn hostname " },
403 { MTYPE_ISIS_SPFTREE, "ISIS SPFtree " },
404 { MTYPE_ISIS_VERTEX, "ISIS vertex " },
405 { MTYPE_ISIS_ROUTE_INFO, "ISIS route info " },
406 { MTYPE_ISIS_NEXTHOP, "ISIS nexthop " },
407 { MTYPE_ISIS_NEXTHOP6, "ISIS nexthop6 " },
408 { -1, NULL },
409};
410
ajs7fa25ff2004-11-15 16:12:32 +0000411static struct mlist {
412 struct memory_list *list;
413 const char *name;
414} mlists[] = {
415 { memory_list_lib, "LIB"},
416 { memory_list_rip, "RIP"},
417 { memory_list_ripng, "RIPNG"},
418 { memory_list_ospf, "OSPF"},
419 { memory_list_ospf6, "OSPF6"},
420 { memory_list_isis, "ISIS"},
421 { memory_list_bgp, "BGP"},
422 { NULL, NULL},
423};
424
425static void
426log_memstats(int pri)
427{
428 struct mlist *ml;
429
430 for (ml = mlists; ml->list; ml++)
431 {
432 struct memory_list *m;
433
434 zlog (NULL, pri, "Memory utilization in module %s:", ml->name);
435 for (m = ml->list; m->index >= 0; m++)
436 if (m->index && mstat[m->index].alloc)
437 zlog (NULL, pri, " %-22s: %5ld", m->format, mstat[m->index].alloc);
438 }
439}
440
ajsf858e492004-11-16 14:25:30 +0000441static struct memory_list memory_list_separator[] =
paul718e3742002-12-13 20:15:29 +0000442{
443 { 0, NULL},
444 {-1, NULL}
445};
446
ajsf858e492004-11-16 14:25:30 +0000447static void
paul718e3742002-12-13 20:15:29 +0000448show_memory_vty (struct vty *vty, struct memory_list *list)
449{
450 struct memory_list *m;
451
452 for (m = list; m->index >= 0; m++)
453 if (m->index == 0)
454 vty_out (vty, "-----------------------------\r\n");
455 else
456 vty_out (vty, "%-22s: %5ld\r\n", m->format, mstat[m->index].alloc);
457}
458
459DEFUN (show_memory_all,
460 show_memory_all_cmd,
461 "show memory all",
462 "Show running system information\n"
463 "Memory statistics\n"
464 "All memory statistics\n")
465{
ajs7fa25ff2004-11-15 16:12:32 +0000466 struct mlist *ml;
467
468 for (ml = mlists; ml->list; ml++)
469 {
470 if (ml != mlists)
471 show_memory_vty (vty, memory_list_separator);
472 show_memory_vty (vty, ml->list);
473 }
paul718e3742002-12-13 20:15:29 +0000474
475 return CMD_SUCCESS;
476}
477
478ALIAS (show_memory_all,
479 show_memory_cmd,
480 "show memory",
481 "Show running system information\n"
482 "Memory statistics\n")
483
484DEFUN (show_memory_lib,
485 show_memory_lib_cmd,
486 "show memory lib",
487 SHOW_STR
488 "Memory statistics\n"
489 "Library memory\n")
490{
491 show_memory_vty (vty, memory_list_lib);
492 return CMD_SUCCESS;
493}
494
495DEFUN (show_memory_rip,
496 show_memory_rip_cmd,
497 "show memory rip",
498 SHOW_STR
499 "Memory statistics\n"
500 "RIP memory\n")
501{
502 show_memory_vty (vty, memory_list_rip);
503 return CMD_SUCCESS;
504}
505
hassoa94434b2003-05-25 17:10:12 +0000506DEFUN (show_memory_ripng,
507 show_memory_ripng_cmd,
508 "show memory ripng",
509 SHOW_STR
510 "Memory statistics\n"
511 "RIPng memory\n")
512{
513 show_memory_vty (vty, memory_list_ripng);
514 return CMD_SUCCESS;
515}
516
paul718e3742002-12-13 20:15:29 +0000517DEFUN (show_memory_bgp,
518 show_memory_bgp_cmd,
519 "show memory bgp",
520 SHOW_STR
521 "Memory statistics\n"
522 "BGP memory\n")
523{
524 show_memory_vty (vty, memory_list_bgp);
525 return CMD_SUCCESS;
526}
527
528DEFUN (show_memory_ospf,
529 show_memory_ospf_cmd,
530 "show memory ospf",
531 SHOW_STR
532 "Memory statistics\n"
533 "OSPF memory\n")
534{
535 show_memory_vty (vty, memory_list_ospf);
536 return CMD_SUCCESS;
537}
538
539DEFUN (show_memory_ospf6,
540 show_memory_ospf6_cmd,
541 "show memory ospf6",
542 SHOW_STR
543 "Memory statistics\n"
544 "OSPF6 memory\n")
545{
546 show_memory_vty (vty, memory_list_ospf6);
547 return CMD_SUCCESS;
548}
549
jardin9e867fe2003-12-23 08:56:18 +0000550DEFUN (show_memory_isis,
551 show_memory_isis_cmd,
552 "show memory isis",
553 SHOW_STR
554 "Memory statistics\n"
555 "ISIS memory\n")
556{
557 show_memory_vty (vty, memory_list_isis);
558 return CMD_SUCCESS;
559}
560
paul718e3742002-12-13 20:15:29 +0000561void
ajsf858e492004-11-16 14:25:30 +0000562memory_init (void)
paul718e3742002-12-13 20:15:29 +0000563{
564 install_element (VIEW_NODE, &show_memory_cmd);
565 install_element (VIEW_NODE, &show_memory_all_cmd);
566 install_element (VIEW_NODE, &show_memory_lib_cmd);
567 install_element (VIEW_NODE, &show_memory_rip_cmd);
hassoa94434b2003-05-25 17:10:12 +0000568 install_element (VIEW_NODE, &show_memory_ripng_cmd);
paul718e3742002-12-13 20:15:29 +0000569 install_element (VIEW_NODE, &show_memory_bgp_cmd);
570 install_element (VIEW_NODE, &show_memory_ospf_cmd);
571 install_element (VIEW_NODE, &show_memory_ospf6_cmd);
jardin9e867fe2003-12-23 08:56:18 +0000572 install_element (VIEW_NODE, &show_memory_isis_cmd);
paul718e3742002-12-13 20:15:29 +0000573
574 install_element (ENABLE_NODE, &show_memory_cmd);
575 install_element (ENABLE_NODE, &show_memory_all_cmd);
576 install_element (ENABLE_NODE, &show_memory_lib_cmd);
577 install_element (ENABLE_NODE, &show_memory_rip_cmd);
hassoa94434b2003-05-25 17:10:12 +0000578 install_element (ENABLE_NODE, &show_memory_ripng_cmd);
paul718e3742002-12-13 20:15:29 +0000579 install_element (ENABLE_NODE, &show_memory_bgp_cmd);
580 install_element (ENABLE_NODE, &show_memory_ospf_cmd);
581 install_element (ENABLE_NODE, &show_memory_ospf6_cmd);
jardin9e867fe2003-12-23 08:56:18 +0000582 install_element (ENABLE_NODE, &show_memory_isis_cmd);
paul718e3742002-12-13 20:15:29 +0000583}