blob: 4aac2f781681b27e4e0eb25af3dac90d053307d6 [file] [log] [blame]
paul2fd2fd52005-04-15 11:47:15 +00001/*
2 * Memory type definitions. This file is parsed by memtypes.awk to extract
3 * MTYPE_ and memory_list_.. information in order to autogenerate
4 * memtypes.h.
5 *
pauldc830cb2005-04-16 15:51:05 +00006 * The script is sensitive to the format (though not whitespace), see
7 * the top of memtypes.awk for more details.
paul2fd2fd52005-04-15 11:47:15 +00008 *
paul02416842005-10-26 05:05:16 +00009 * $Id: memtypes.c,v 1.9 2005/10/26 05:05:16 paul Exp $
paul2fd2fd52005-04-15 11:47:15 +000010 */
11
12#include "zebra.h"
13#include "memory.h"
14
15struct memory_list memory_list_lib[] =
16{
17 { MTYPE_TMP, "Temporary memory" },
18 { MTYPE_STRVEC, "String vector" },
19 { MTYPE_VECTOR, "Vector" },
20 { MTYPE_VECTOR_INDEX, "Vector index" },
21 { MTYPE_LINK_LIST, "Link List" },
22 { MTYPE_LINK_NODE, "Link Node" },
23 { MTYPE_THREAD, "Thread" },
24 { MTYPE_THREAD_MASTER, "Thread master" },
25 { MTYPE_THREAD_STATS, "Thread stats" },
26 { MTYPE_THREAD_FUNCNAME, "Thread function name" },
27 { MTYPE_VTY, "VTY" },
28 { MTYPE_VTY_OUT_BUF, "VTY output buffer" },
29 { MTYPE_VTY_HIST, "VTY history" },
30 { MTYPE_IF, "Interface" },
31 { MTYPE_CONNECTED, "Connected" },
32 { MTYPE_BUFFER, "Buffer" },
33 { MTYPE_BUFFER_DATA, "Buffer data" },
34 { MTYPE_STREAM, "Stream" },
35 { MTYPE_STREAM_DATA, "Stream data" },
36 { MTYPE_STREAM_FIFO, "Stream FIFO" },
37 { MTYPE_PREFIX, "Prefix" },
38 { MTYPE_PREFIX_IPV4, "Prefix IPv4" },
39 { MTYPE_PREFIX_IPV6, "Prefix IPv6" },
40 { MTYPE_HASH, "Hash" },
41 { MTYPE_HASH_BACKET, "Hash Bucket" },
42 { MTYPE_HASH_INDEX, "Hash Index" },
43 { MTYPE_ROUTE_TABLE, "Route table" },
44 { MTYPE_ROUTE_NODE, "Route node" },
45 { MTYPE_DISTRIBUTE, "Distribute list" },
46 { MTYPE_DISTRIBUTE_IFNAME, "Dist-list ifname" },
47 { MTYPE_ACCESS_LIST, "Access List" },
48 { MTYPE_ACCESS_LIST_STR, "Access List Str" },
49 { MTYPE_ACCESS_FILTER, "Access Filter" },
50 { MTYPE_PREFIX_LIST, "Prefix List" },
paul2c1de2a2005-04-25 14:02:44 +000051 { MTYPE_PREFIX_LIST_ENTRY, "Prefix List Entry" },
52 { MTYPE_PREFIX_LIST_STR, "Prefix List Str" },
paul2fd2fd52005-04-15 11:47:15 +000053 { MTYPE_ROUTE_MAP, "Route map" },
54 { MTYPE_ROUTE_MAP_NAME, "Route map name" },
55 { MTYPE_ROUTE_MAP_INDEX, "Route map index" },
56 { MTYPE_ROUTE_MAP_RULE, "Route map rule" },
57 { MTYPE_ROUTE_MAP_RULE_STR, "Route map rule str" },
58 { MTYPE_ROUTE_MAP_COMPILED, "Route map compiled" },
59 { MTYPE_DESC, "Command desc" },
60 { MTYPE_KEY, "Key" },
61 { MTYPE_KEYCHAIN, "Key chain" },
62 { MTYPE_IF_RMAP, "Interface route map" },
paul02416842005-10-26 05:05:16 +000063 { MTYPE_IF_RMAP_NAME, "I.f. route map name", },
paul2fd2fd52005-04-15 11:47:15 +000064 { MTYPE_SOCKUNION, "Socket union" },
65 { MTYPE_PRIVS, "Privilege information" },
66 { MTYPE_ZLOG, "Logging" },
67 { MTYPE_ZCLIENT, "Zclient" },
paul354d1192005-04-25 16:26:42 +000068 { MTYPE_WORK_QUEUE, "Work queue" },
69 { MTYPE_WORK_QUEUE_ITEM, "Work queue item" },
70 { MTYPE_WORK_QUEUE_NAME, "Work queue name string" },
paul02416842005-10-26 05:05:16 +000071 { MTYPE_PQUEUE, "Priority queue" },
72 { MTYPE_PQUEUE_DATA, "Priority queue data" },
73 { MTYPE_HOST, "Host config" },
paul2fd2fd52005-04-15 11:47:15 +000074 { -1, NULL },
75};
76
77struct memory_list memory_list_zebra[] =
78{
79 { MTYPE_RTADV_PREFIX, "Router Advertisement Prefix" },
80 { MTYPE_VRF, "VRF" },
81 { MTYPE_VRF_NAME, "VRF name" },
82 { MTYPE_NEXTHOP, "Nexthop" },
83 { MTYPE_RIB, "RIB" },
paul354d1192005-04-25 16:26:42 +000084 { MTYPE_RIB_QUEUE, "RIB process work queue" },
paul2fd2fd52005-04-15 11:47:15 +000085 { MTYPE_STATIC_IPV4, "Static IPv4 route" },
86 { MTYPE_STATIC_IPV6, "Static IPv6 route" },
87 { -1, NULL },
88};
89
90struct memory_list memory_list_bgp[] =
91{
92 { MTYPE_BGP, "BGP instance" },
93 { MTYPE_BGP_PEER, "BGP peer" },
paule387e662005-05-19 02:13:28 +000094 { MTYPE_BGP_PEER_HOST, "BGP peer hostname" },
paul2fd2fd52005-04-15 11:47:15 +000095 { MTYPE_PEER_GROUP, "Peer group" },
96 { MTYPE_PEER_DESC, "Peer description" },
97 { MTYPE_ATTR, "BGP attribute" },
98 { MTYPE_AS_PATH, "BGP aspath" },
99 { MTYPE_AS_SEG, "BGP aspath seg" },
paul75b2dd02005-09-21 14:06:35 +0000100 { MTYPE_AS_SEG_DATA, "BGP aspath segment data" },
paul2fd2fd52005-04-15 11:47:15 +0000101 { MTYPE_AS_STR, "BGP aspath str" },
102 { 0, NULL },
103 { MTYPE_BGP_TABLE, "BGP table" },
104 { MTYPE_BGP_NODE, "BGP node" },
105 { MTYPE_BGP_ROUTE, "BGP route" },
106 { MTYPE_BGP_STATIC, "BGP static" },
107 { MTYPE_BGP_ADVERTISE_ATTR, "BGP adv attr" },
108 { MTYPE_BGP_ADVERTISE, "BGP adv" },
109 { MTYPE_BGP_ADJ_IN, "BGP adj in" },
110 { MTYPE_BGP_ADJ_OUT, "BGP adj out" },
111 { 0, NULL },
112 { MTYPE_AS_LIST, "BGP AS list" },
113 { MTYPE_AS_FILTER, "BGP AS filter" },
114 { MTYPE_AS_FILTER_STR, "BGP AS filter str" },
115 { 0, NULL },
116 { MTYPE_COMMUNITY, "community" },
117 { MTYPE_COMMUNITY_VAL, "community val" },
118 { MTYPE_COMMUNITY_STR, "community str" },
119 { 0, NULL },
120 { MTYPE_ECOMMUNITY, "extcommunity" },
121 { MTYPE_ECOMMUNITY_VAL, "extcommunity val" },
122 { MTYPE_ECOMMUNITY_STR, "extcommunity str" },
123 { 0, NULL },
124 { MTYPE_COMMUNITY_LIST, "community-list" },
125 { MTYPE_COMMUNITY_LIST_NAME, "community-list name" },
126 { MTYPE_COMMUNITY_LIST_ENTRY, "community-list entry" },
127 { MTYPE_COMMUNITY_LIST_CONFIG, "community-list config" },
128 { MTYPE_COMMUNITY_LIST_HANDLER, "community-list handler" },
129 { 0, NULL },
130 { MTYPE_CLUSTER, "Cluster list" },
131 { MTYPE_CLUSTER_VAL, "Cluster list val" },
132 { 0, NULL },
paul200df112005-06-01 11:17:05 +0000133 { MTYPE_BGP_PROCESS_QUEUE, "BGP Process queue" },
134 { MTYPE_BGP_CLEAR_NODE_QUEUE, "BGP node clear queue" },
135 { 0, NULL },
paul2fd2fd52005-04-15 11:47:15 +0000136 { MTYPE_TRANSIT, "BGP transit attr" },
137 { MTYPE_TRANSIT_VAL, "BGP transit val" },
138 { 0, NULL },
139 { MTYPE_BGP_DISTANCE, "BGP distance" },
140 { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" },
141 { MTYPE_BGP_CONFED_LIST, "BGP confed list" },
142 { MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" },
143 { MTYPE_BGP_DAMP_INFO, "Dampening info" },
144 { MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" },
145 { MTYPE_BGP_REGEXP, "BGP regexp" },
146 { MTYPE_BGP_AGGREGATE, "BGP aggregate" },
147 { -1, NULL }
148};
149
150struct memory_list memory_list_rip[] =
151{
152 { MTYPE_RIP, "RIP structure" },
153 { MTYPE_RIP_INFO, "RIP route info" },
154 { MTYPE_RIP_INTERFACE, "RIP interface" },
155 { MTYPE_RIP_PEER, "RIP peer" },
156 { MTYPE_RIP_OFFSET_LIST, "RIP offset list" },
157 { MTYPE_RIP_DISTANCE, "RIP distance" },
158 { -1, NULL }
159};
160
161struct memory_list memory_list_ripng[] =
162{
163 { MTYPE_RIPNG, "RIPng structure" },
164 { MTYPE_RIPNG_ROUTE, "RIPng route info" },
165 { MTYPE_RIPNG_AGGREGATE, "RIPng aggregate" },
166 { MTYPE_RIPNG_PEER, "RIPng peer" },
167 { MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" },
168 { MTYPE_RIPNG_RTE_DATA, "RIPng rte data" },
169 { -1, NULL }
170};
171
172struct memory_list memory_list_ospf[] =
173{
174 { MTYPE_OSPF_TOP, "OSPF top" },
175 { MTYPE_OSPF_AREA, "OSPF area" },
176 { MTYPE_OSPF_AREA_RANGE, "OSPF area range" },
177 { MTYPE_OSPF_NETWORK, "OSPF network" },
178 { MTYPE_OSPF_NEIGHBOR_STATIC,"OSPF static nbr" },
179 { MTYPE_OSPF_IF, "OSPF interface" },
180 { MTYPE_OSPF_NEIGHBOR, "OSPF neighbor" },
181 { MTYPE_OSPF_ROUTE, "OSPF route" },
182 { MTYPE_OSPF_TMP, "OSPF tmp mem" },
183 { MTYPE_OSPF_LSA, "OSPF LSA" },
184 { MTYPE_OSPF_LSA_DATA, "OSPF LSA data" },
185 { MTYPE_OSPF_LSDB, "OSPF LSDB" },
186 { MTYPE_OSPF_PACKET, "OSPF packet" },
187 { MTYPE_OSPF_FIFO, "OSPF FIFO queue" },
188 { MTYPE_OSPF_VERTEX, "OSPF vertex" },
pauleb3da6d2005-10-18 04:20:33 +0000189 { MTYPE_OSPF_VERTEX_PARENT, "OSPF vertex parent", },
paul2fd2fd52005-04-15 11:47:15 +0000190 { MTYPE_OSPF_NEXTHOP, "OSPF nexthop" },
191 { MTYPE_OSPF_PATH, "OSPF path" },
192 { MTYPE_OSPF_VL_DATA, "OSPF VL data" },
193 { MTYPE_OSPF_CRYPT_KEY, "OSPF crypt key" },
194 { MTYPE_OSPF_EXTERNAL_INFO, "OSPF ext. info" },
195 { MTYPE_OSPF_DISTANCE, "OSPF distance" },
196 { MTYPE_OSPF_IF_INFO, "OSPF if info" },
197 { MTYPE_OSPF_IF_PARAMS, "OSPF if params" },
198 { MTYPE_OSPF_MESSAGE, "OSPF message" },
199 { -1, NULL },
200};
201
202struct memory_list memory_list_ospf6[] =
203{
204 { MTYPE_OSPF6_TOP, "OSPF6 top" },
205 { MTYPE_OSPF6_AREA, "OSPF6 area" },
206 { MTYPE_OSPF6_IF, "OSPF6 interface" },
207 { MTYPE_OSPF6_NEIGHBOR, "OSPF6 neighbor" },
208 { MTYPE_OSPF6_ROUTE, "OSPF6 route" },
209 { MTYPE_OSPF6_PREFIX, "OSPF6 prefix" },
210 { MTYPE_OSPF6_MESSAGE, "OSPF6 message" },
211 { MTYPE_OSPF6_LSA, "OSPF6 LSA" },
212 { MTYPE_OSPF6_LSA_SUMMARY, "OSPF6 LSA summary" },
213 { MTYPE_OSPF6_LSDB, "OSPF6 LSA database" },
214 { MTYPE_OSPF6_VERTEX, "OSPF6 vertex" },
215 { MTYPE_OSPF6_SPFTREE, "OSPF6 SPF tree" },
216 { MTYPE_OSPF6_NEXTHOP, "OSPF6 nexthop" },
217 { MTYPE_OSPF6_EXTERNAL_INFO,"OSPF6 ext. info" },
218 { MTYPE_OSPF6_OTHER, "OSPF6 other" },
219 { -1, NULL },
220};
221
222struct memory_list memory_list_isis[] =
223{
224 { MTYPE_ISIS, "ISIS" },
225 { MTYPE_ISIS_TMP, "ISIS TMP" },
226 { MTYPE_ISIS_CIRCUIT, "ISIS circuit" },
227 { MTYPE_ISIS_LSP, "ISIS LSP" },
228 { MTYPE_ISIS_ADJACENCY, "ISIS adjacency" },
229 { MTYPE_ISIS_AREA, "ISIS area" },
230 { MTYPE_ISIS_AREA_ADDR, "ISIS area address" },
231 { MTYPE_ISIS_TLV, "ISIS TLV" },
232 { MTYPE_ISIS_DYNHN, "ISIS dyn hostname" },
233 { MTYPE_ISIS_SPFTREE, "ISIS SPFtree" },
234 { MTYPE_ISIS_VERTEX, "ISIS vertex" },
235 { MTYPE_ISIS_ROUTE_INFO, "ISIS route info" },
236 { MTYPE_ISIS_NEXTHOP, "ISIS nexthop" },
237 { MTYPE_ISIS_NEXTHOP6, "ISIS nexthop6" },
238 { -1, NULL },
239};
240
241struct memory_list memory_list_vtysh[] =
242{
243 { MTYPE_VTYSH_CONFIG, "Vtysh configuration", },
244 { MTYPE_VTYSH_CONFIG_LINE, "Vtysh configuration line" },
245 { -1, NULL },
246};
247
248struct mlist mlists[] __attribute__ ((unused)) = {
249 { memory_list_lib, "LIB" },
250 { memory_list_zebra, "ZEBRA" },
251 { memory_list_rip, "RIP" },
252 { memory_list_ripng, "RIPNG" },
253 { memory_list_ospf, "OSPF" },
254 { memory_list_ospf6, "OSPF6" },
255 { memory_list_isis, "ISIS" },
256 { memory_list_bgp, "BGP" },
257 { NULL, NULL},
258};