blob: 3b9345d336acfdb150754ea1655135887a37922f [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 */
9
10#include "zebra.h"
11#include "memory.h"
12
13struct memory_list memory_list_lib[] =
14{
15 { MTYPE_TMP, "Temporary memory" },
16 { MTYPE_STRVEC, "String vector" },
17 { MTYPE_VECTOR, "Vector" },
18 { MTYPE_VECTOR_INDEX, "Vector index" },
19 { MTYPE_LINK_LIST, "Link List" },
20 { MTYPE_LINK_NODE, "Link Node" },
21 { MTYPE_THREAD, "Thread" },
22 { MTYPE_THREAD_MASTER, "Thread master" },
23 { MTYPE_THREAD_STATS, "Thread stats" },
paul2fd2fd52005-04-15 11:47:15 +000024 { MTYPE_VTY, "VTY" },
25 { MTYPE_VTY_OUT_BUF, "VTY output buffer" },
26 { MTYPE_VTY_HIST, "VTY history" },
27 { MTYPE_IF, "Interface" },
28 { MTYPE_CONNECTED, "Connected" },
paul9c4f1c62005-11-03 11:04:07 +000029 { MTYPE_CONNECTED_LABEL, "Connected interface label" },
paul2fd2fd52005-04-15 11:47:15 +000030 { MTYPE_BUFFER, "Buffer" },
31 { MTYPE_BUFFER_DATA, "Buffer data" },
32 { MTYPE_STREAM, "Stream" },
33 { MTYPE_STREAM_DATA, "Stream data" },
34 { MTYPE_STREAM_FIFO, "Stream FIFO" },
35 { MTYPE_PREFIX, "Prefix" },
36 { MTYPE_PREFIX_IPV4, "Prefix IPv4" },
37 { MTYPE_PREFIX_IPV6, "Prefix IPv6" },
38 { MTYPE_HASH, "Hash" },
39 { MTYPE_HASH_BACKET, "Hash Bucket" },
40 { MTYPE_HASH_INDEX, "Hash Index" },
41 { MTYPE_ROUTE_TABLE, "Route table" },
42 { MTYPE_ROUTE_NODE, "Route node" },
43 { MTYPE_DISTRIBUTE, "Distribute list" },
44 { MTYPE_DISTRIBUTE_IFNAME, "Dist-list ifname" },
45 { MTYPE_ACCESS_LIST, "Access List" },
46 { MTYPE_ACCESS_LIST_STR, "Access List Str" },
47 { MTYPE_ACCESS_FILTER, "Access Filter" },
48 { MTYPE_PREFIX_LIST, "Prefix List" },
paul2c1de2a2005-04-25 14:02:44 +000049 { MTYPE_PREFIX_LIST_ENTRY, "Prefix List Entry" },
50 { MTYPE_PREFIX_LIST_STR, "Prefix List Str" },
paul2fd2fd52005-04-15 11:47:15 +000051 { MTYPE_ROUTE_MAP, "Route map" },
52 { MTYPE_ROUTE_MAP_NAME, "Route map name" },
53 { MTYPE_ROUTE_MAP_INDEX, "Route map index" },
54 { MTYPE_ROUTE_MAP_RULE, "Route map rule" },
55 { MTYPE_ROUTE_MAP_RULE_STR, "Route map rule str" },
56 { MTYPE_ROUTE_MAP_COMPILED, "Route map compiled" },
Christian Frankecd40b322013-09-30 12:27:51 +000057 { MTYPE_CMD_TOKENS, "Command desc" },
paul2fd2fd52005-04-15 11:47:15 +000058 { MTYPE_KEY, "Key" },
59 { MTYPE_KEYCHAIN, "Key chain" },
60 { MTYPE_IF_RMAP, "Interface route map" },
paul02416842005-10-26 05:05:16 +000061 { MTYPE_IF_RMAP_NAME, "I.f. route map name", },
paul2fd2fd52005-04-15 11:47:15 +000062 { MTYPE_SOCKUNION, "Socket union" },
63 { MTYPE_PRIVS, "Privilege information" },
64 { MTYPE_ZLOG, "Logging" },
65 { MTYPE_ZCLIENT, "Zclient" },
paul354d1192005-04-25 16:26:42 +000066 { MTYPE_WORK_QUEUE, "Work queue" },
67 { MTYPE_WORK_QUEUE_ITEM, "Work queue item" },
68 { MTYPE_WORK_QUEUE_NAME, "Work queue name string" },
paul02416842005-10-26 05:05:16 +000069 { MTYPE_PQUEUE, "Priority queue" },
70 { MTYPE_PQUEUE_DATA, "Priority queue data" },
71 { MTYPE_HOST, "Host config" },
Feng Lu41f44a22015-05-22 11:39:56 +020072 { MTYPE_VRF, "VRF" },
73 { MTYPE_VRF_NAME, "VRF name" },
Feng Luc99f3482014-10-16 09:52:36 +080074 { MTYPE_VRF_BITMAP, "VRF bit-map" },
paul2fd2fd52005-04-15 11:47:15 +000075 { -1, NULL },
76};
77
78struct memory_list memory_list_zebra[] =
79{
80 { MTYPE_RTADV_PREFIX, "Router Advertisement Prefix" },
Feng Lu41f44a22015-05-22 11:39:56 +020081 { MTYPE_ZEBRA_VRF, "ZEBRA VRF" },
paul2fd2fd52005-04-15 11:47:15 +000082 { MTYPE_NEXTHOP, "Nexthop" },
83 { MTYPE_RIB, "RIB" },
paul354d1192005-04-25 16:26:42 +000084 { MTYPE_RIB_QUEUE, "RIB process work queue" },
Donald Sharpd4c27d62015-11-04 13:26:35 -050085 { MTYPE_STATIC_ROUTE, "Static route" },
Avneesh Sachdev9fd92e32012-11-13 22:48:53 +000086 { MTYPE_RIB_DEST, "RIB destination" },
Avneesh Sachdev1b5ed1b2012-11-13 22:48:54 +000087 { MTYPE_RIB_TABLE_INFO, "RIB table info" },
Feng Lu758fb8f2014-07-03 18:23:09 +080088 { MTYPE_NETLINK_NAME, "Netlink name" },
paul2fd2fd52005-04-15 11:47:15 +000089 { -1, NULL },
90};
91
92struct memory_list memory_list_bgp[] =
93{
94 { MTYPE_BGP, "BGP instance" },
Stephen Hemmingerd023aec2009-07-21 16:27:21 -070095 { MTYPE_BGP_LISTENER, "BGP listen socket details" },
paul2fd2fd52005-04-15 11:47:15 +000096 { MTYPE_BGP_PEER, "BGP peer" },
paule387e662005-05-19 02:13:28 +000097 { MTYPE_BGP_PEER_HOST, "BGP peer hostname" },
paul2fd2fd52005-04-15 11:47:15 +000098 { MTYPE_PEER_GROUP, "Peer group" },
99 { MTYPE_PEER_DESC, "Peer description" },
Paul Jakma0df7c912008-07-21 21:02:49 +0000100 { MTYPE_PEER_PASSWORD, "Peer password string" },
paul2fd2fd52005-04-15 11:47:15 +0000101 { MTYPE_ATTR, "BGP attribute" },
Paul Jakmafb982c22007-05-04 20:15:47 +0000102 { MTYPE_ATTR_EXTRA, "BGP extra attributes" },
paul2fd2fd52005-04-15 11:47:15 +0000103 { MTYPE_AS_PATH, "BGP aspath" },
104 { MTYPE_AS_SEG, "BGP aspath seg" },
paul75b2dd02005-09-21 14:06:35 +0000105 { MTYPE_AS_SEG_DATA, "BGP aspath segment data" },
paul2fd2fd52005-04-15 11:47:15 +0000106 { MTYPE_AS_STR, "BGP aspath str" },
107 { 0, NULL },
108 { MTYPE_BGP_TABLE, "BGP table" },
109 { MTYPE_BGP_NODE, "BGP node" },
110 { MTYPE_BGP_ROUTE, "BGP route" },
Paul Jakmafb982c22007-05-04 20:15:47 +0000111 { MTYPE_BGP_ROUTE_EXTRA, "BGP ancillary route info" },
Chris Caputo6c88b442010-07-27 16:28:55 +0000112 { MTYPE_BGP_CONN, "BGP connected" },
paul2fd2fd52005-04-15 11:47:15 +0000113 { MTYPE_BGP_STATIC, "BGP static" },
114 { MTYPE_BGP_ADVERTISE_ATTR, "BGP adv attr" },
115 { MTYPE_BGP_ADVERTISE, "BGP adv" },
Paul Jakmab51f1262006-03-30 14:09:38 +0000116 { MTYPE_BGP_SYNCHRONISE, "BGP synchronise" },
paul2fd2fd52005-04-15 11:47:15 +0000117 { MTYPE_BGP_ADJ_IN, "BGP adj in" },
118 { MTYPE_BGP_ADJ_OUT, "BGP adj out" },
Josh Baileyde8d5df2011-07-20 20:46:01 -0700119 { MTYPE_BGP_MPATH_INFO, "BGP multipath info" },
paul2fd2fd52005-04-15 11:47:15 +0000120 { 0, NULL },
121 { MTYPE_AS_LIST, "BGP AS list" },
122 { MTYPE_AS_FILTER, "BGP AS filter" },
123 { MTYPE_AS_FILTER_STR, "BGP AS filter str" },
124 { 0, NULL },
125 { MTYPE_COMMUNITY, "community" },
126 { MTYPE_COMMUNITY_VAL, "community val" },
127 { MTYPE_COMMUNITY_STR, "community str" },
128 { 0, NULL },
129 { MTYPE_ECOMMUNITY, "extcommunity" },
130 { MTYPE_ECOMMUNITY_VAL, "extcommunity val" },
131 { MTYPE_ECOMMUNITY_STR, "extcommunity str" },
132 { 0, NULL },
133 { MTYPE_COMMUNITY_LIST, "community-list" },
134 { MTYPE_COMMUNITY_LIST_NAME, "community-list name" },
135 { MTYPE_COMMUNITY_LIST_ENTRY, "community-list entry" },
136 { MTYPE_COMMUNITY_LIST_CONFIG, "community-list config" },
137 { MTYPE_COMMUNITY_LIST_HANDLER, "community-list handler" },
138 { 0, NULL },
139 { MTYPE_CLUSTER, "Cluster list" },
140 { MTYPE_CLUSTER_VAL, "Cluster list val" },
141 { 0, NULL },
paul200df112005-06-01 11:17:05 +0000142 { MTYPE_BGP_PROCESS_QUEUE, "BGP Process queue" },
143 { MTYPE_BGP_CLEAR_NODE_QUEUE, "BGP node clear queue" },
144 { 0, NULL },
paul2fd2fd52005-04-15 11:47:15 +0000145 { MTYPE_TRANSIT, "BGP transit attr" },
146 { MTYPE_TRANSIT_VAL, "BGP transit val" },
147 { 0, NULL },
148 { MTYPE_BGP_DISTANCE, "BGP distance" },
149 { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" },
150 { MTYPE_BGP_CONFED_LIST, "BGP confed list" },
151 { MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" },
152 { MTYPE_BGP_DAMP_INFO, "Dampening info" },
153 { MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" },
154 { MTYPE_BGP_REGEXP, "BGP regexp" },
155 { MTYPE_BGP_AGGREGATE, "BGP aggregate" },
Jorge Boncompte [DTI2]10f9bf32012-05-07 16:52:52 +0000156 { MTYPE_BGP_ADDR, "BGP own address" },
Lou Bergerc3741782016-01-12 13:42:01 -0500157 { MTYPE_ENCAP_TLV, "ENCAP TLV", },
paul2fd2fd52005-04-15 11:47:15 +0000158 { -1, NULL }
159};
160
161struct memory_list memory_list_rip[] =
162{
163 { MTYPE_RIP, "RIP structure" },
164 { MTYPE_RIP_INFO, "RIP route info" },
165 { MTYPE_RIP_INTERFACE, "RIP interface" },
166 { MTYPE_RIP_PEER, "RIP peer" },
167 { MTYPE_RIP_OFFSET_LIST, "RIP offset list" },
168 { MTYPE_RIP_DISTANCE, "RIP distance" },
169 { -1, NULL }
170};
171
172struct memory_list memory_list_ripng[] =
173{
174 { MTYPE_RIPNG, "RIPng structure" },
175 { MTYPE_RIPNG_ROUTE, "RIPng route info" },
176 { MTYPE_RIPNG_AGGREGATE, "RIPng aggregate" },
177 { MTYPE_RIPNG_PEER, "RIPng peer" },
178 { MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" },
179 { MTYPE_RIPNG_RTE_DATA, "RIPng rte data" },
180 { -1, NULL }
181};
182
Paul Jakma57345092011-12-25 17:52:09 +0100183struct memory_list memory_list_babel[] =
184{
185 { MTYPE_BABEL, "Babel structure" },
186 { MTYPE_BABEL_IF, "Babel interface" },
187 { -1, NULL }
188};
189
paul2fd2fd52005-04-15 11:47:15 +0000190struct memory_list memory_list_ospf[] =
191{
192 { MTYPE_OSPF_TOP, "OSPF top" },
193 { MTYPE_OSPF_AREA, "OSPF area" },
194 { MTYPE_OSPF_AREA_RANGE, "OSPF area range" },
195 { MTYPE_OSPF_NETWORK, "OSPF network" },
196 { MTYPE_OSPF_NEIGHBOR_STATIC,"OSPF static nbr" },
197 { MTYPE_OSPF_IF, "OSPF interface" },
198 { MTYPE_OSPF_NEIGHBOR, "OSPF neighbor" },
199 { MTYPE_OSPF_ROUTE, "OSPF route" },
200 { MTYPE_OSPF_TMP, "OSPF tmp mem" },
201 { MTYPE_OSPF_LSA, "OSPF LSA" },
202 { MTYPE_OSPF_LSA_DATA, "OSPF LSA data" },
203 { MTYPE_OSPF_LSDB, "OSPF LSDB" },
204 { MTYPE_OSPF_PACKET, "OSPF packet" },
205 { MTYPE_OSPF_FIFO, "OSPF FIFO queue" },
206 { MTYPE_OSPF_VERTEX, "OSPF vertex" },
pauleb3da6d2005-10-18 04:20:33 +0000207 { MTYPE_OSPF_VERTEX_PARENT, "OSPF vertex parent", },
paul2fd2fd52005-04-15 11:47:15 +0000208 { MTYPE_OSPF_NEXTHOP, "OSPF nexthop" },
209 { MTYPE_OSPF_PATH, "OSPF path" },
210 { MTYPE_OSPF_VL_DATA, "OSPF VL data" },
211 { MTYPE_OSPF_CRYPT_KEY, "OSPF crypt key" },
212 { MTYPE_OSPF_EXTERNAL_INFO, "OSPF ext. info" },
213 { MTYPE_OSPF_DISTANCE, "OSPF distance" },
214 { MTYPE_OSPF_IF_INFO, "OSPF if info" },
215 { MTYPE_OSPF_IF_PARAMS, "OSPF if params" },
216 { MTYPE_OSPF_MESSAGE, "OSPF message" },
217 { -1, NULL },
218};
219
220struct memory_list memory_list_ospf6[] =
221{
222 { MTYPE_OSPF6_TOP, "OSPF6 top" },
223 { MTYPE_OSPF6_AREA, "OSPF6 area" },
224 { MTYPE_OSPF6_IF, "OSPF6 interface" },
225 { MTYPE_OSPF6_NEIGHBOR, "OSPF6 neighbor" },
226 { MTYPE_OSPF6_ROUTE, "OSPF6 route" },
227 { MTYPE_OSPF6_PREFIX, "OSPF6 prefix" },
228 { MTYPE_OSPF6_MESSAGE, "OSPF6 message" },
229 { MTYPE_OSPF6_LSA, "OSPF6 LSA" },
230 { MTYPE_OSPF6_LSA_SUMMARY, "OSPF6 LSA summary" },
231 { MTYPE_OSPF6_LSDB, "OSPF6 LSA database" },
232 { MTYPE_OSPF6_VERTEX, "OSPF6 vertex" },
233 { MTYPE_OSPF6_SPFTREE, "OSPF6 SPF tree" },
234 { MTYPE_OSPF6_NEXTHOP, "OSPF6 nexthop" },
235 { MTYPE_OSPF6_EXTERNAL_INFO,"OSPF6 ext. info" },
236 { MTYPE_OSPF6_OTHER, "OSPF6 other" },
Roman Hoog Antinkd8f7f862014-03-05 09:13:43 +0100237 { MTYPE_OSPF6_DISTANCE, "OSPF6 distance" },
paul2fd2fd52005-04-15 11:47:15 +0000238 { -1, NULL },
239};
240
241struct memory_list memory_list_isis[] =
242{
243 { MTYPE_ISIS, "ISIS" },
244 { MTYPE_ISIS_TMP, "ISIS TMP" },
245 { MTYPE_ISIS_CIRCUIT, "ISIS circuit" },
246 { MTYPE_ISIS_LSP, "ISIS LSP" },
247 { MTYPE_ISIS_ADJACENCY, "ISIS adjacency" },
248 { MTYPE_ISIS_AREA, "ISIS area" },
249 { MTYPE_ISIS_AREA_ADDR, "ISIS area address" },
250 { MTYPE_ISIS_TLV, "ISIS TLV" },
251 { MTYPE_ISIS_DYNHN, "ISIS dyn hostname" },
252 { MTYPE_ISIS_SPFTREE, "ISIS SPFtree" },
253 { MTYPE_ISIS_VERTEX, "ISIS vertex" },
254 { MTYPE_ISIS_ROUTE_INFO, "ISIS route info" },
255 { MTYPE_ISIS_NEXTHOP, "ISIS nexthop" },
256 { MTYPE_ISIS_NEXTHOP6, "ISIS nexthop6" },
Josh Bailey3f045a02012-03-24 08:35:20 -0700257 { MTYPE_ISIS_DICT, "ISIS dictionary" },
258 { MTYPE_ISIS_DICT_NODE, "ISIS dictionary node" },
paul2fd2fd52005-04-15 11:47:15 +0000259 { -1, NULL },
260};
261
Everton Marques871dbcf2009-08-11 15:43:05 -0300262struct memory_list memory_list_pim[] =
263{
264 { MTYPE_PIM_CHANNEL_OIL, "PIM SSM (S,G) channel OIL" },
265 { MTYPE_PIM_INTERFACE, "PIM interface" },
266 { MTYPE_PIM_IGMP_JOIN, "PIM interface IGMP static join" },
267 { MTYPE_PIM_IGMP_SOCKET, "PIM interface IGMP socket" },
268 { MTYPE_PIM_IGMP_GROUP, "PIM interface IGMP group" },
269 { MTYPE_PIM_IGMP_GROUP_SOURCE, "PIM interface IGMP source" },
270 { MTYPE_PIM_NEIGHBOR, "PIM interface neighbor" },
271 { MTYPE_PIM_IFCHANNEL, "PIM interface (S,G) state" },
272 { MTYPE_PIM_UPSTREAM, "PIM upstream (S,G) state" },
Everton Marques824adbe2009-10-08 09:16:27 -0300273 { MTYPE_PIM_SSMPINGD, "PIM sspimgd socket" },
Jafar Al-Gharaibeh030674d2015-06-11 18:29:02 -0500274 { MTYPE_PIM_STATIC_ROUTE, "PIM Static Route" },
Everton Marques871dbcf2009-08-11 15:43:05 -0300275 { -1, NULL },
276};
277
paul2fd2fd52005-04-15 11:47:15 +0000278struct memory_list memory_list_vtysh[] =
279{
280 { MTYPE_VTYSH_CONFIG, "Vtysh configuration", },
281 { MTYPE_VTYSH_CONFIG_LINE, "Vtysh configuration line" },
282 { -1, NULL },
283};
284
285struct mlist mlists[] __attribute__ ((unused)) = {
286 { memory_list_lib, "LIB" },
287 { memory_list_zebra, "ZEBRA" },
288 { memory_list_rip, "RIP" },
289 { memory_list_ripng, "RIPNG" },
290 { memory_list_ospf, "OSPF" },
291 { memory_list_ospf6, "OSPF6" },
292 { memory_list_isis, "ISIS" },
293 { memory_list_bgp, "BGP" },
Everton Marques871dbcf2009-08-11 15:43:05 -0300294 { memory_list_pim, "PIM" },
paul2fd2fd52005-04-15 11:47:15 +0000295 { NULL, NULL},
296};