blob: 7865f5449b65c5bca0e642b9da03243a7543a3b1 [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 *
paul354d1192005-04-25 16:26:42 +00009 * $Id: memtypes.c,v 1.4 2005/04/25 16:26:43 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" },
63 { MTYPE_SOCKUNION, "Socket union" },
64 { MTYPE_PRIVS, "Privilege information" },
65 { MTYPE_ZLOG, "Logging" },
66 { MTYPE_ZCLIENT, "Zclient" },
paul354d1192005-04-25 16:26:42 +000067 { MTYPE_WORK_QUEUE, "Work queue" },
68 { MTYPE_WORK_QUEUE_ITEM, "Work queue item" },
69 { MTYPE_WORK_QUEUE_NAME, "Work queue name string" },
paul2fd2fd52005-04-15 11:47:15 +000070 { -1, NULL },
71};
72
73struct memory_list memory_list_zebra[] =
74{
75 { MTYPE_RTADV_PREFIX, "Router Advertisement Prefix" },
76 { MTYPE_VRF, "VRF" },
77 { MTYPE_VRF_NAME, "VRF name" },
78 { MTYPE_NEXTHOP, "Nexthop" },
79 { MTYPE_RIB, "RIB" },
paul354d1192005-04-25 16:26:42 +000080 { MTYPE_RIB_QUEUE, "RIB process work queue" },
paul2fd2fd52005-04-15 11:47:15 +000081 { MTYPE_STATIC_IPV4, "Static IPv4 route" },
82 { MTYPE_STATIC_IPV6, "Static IPv6 route" },
83 { -1, NULL },
84};
85
86struct memory_list memory_list_bgp[] =
87{
88 { MTYPE_BGP, "BGP instance" },
89 { MTYPE_BGP_PEER, "BGP peer" },
90 { MTYPE_PEER_GROUP, "Peer group" },
91 { MTYPE_PEER_DESC, "Peer description" },
92 { MTYPE_ATTR, "BGP attribute" },
93 { MTYPE_AS_PATH, "BGP aspath" },
94 { MTYPE_AS_SEG, "BGP aspath seg" },
95 { MTYPE_AS_STR, "BGP aspath str" },
96 { 0, NULL },
97 { MTYPE_BGP_TABLE, "BGP table" },
98 { MTYPE_BGP_NODE, "BGP node" },
99 { MTYPE_BGP_ROUTE, "BGP route" },
100 { MTYPE_BGP_STATIC, "BGP static" },
101 { MTYPE_BGP_ADVERTISE_ATTR, "BGP adv attr" },
102 { MTYPE_BGP_ADVERTISE, "BGP adv" },
103 { MTYPE_BGP_ADJ_IN, "BGP adj in" },
104 { MTYPE_BGP_ADJ_OUT, "BGP adj out" },
105 { 0, NULL },
106 { MTYPE_AS_LIST, "BGP AS list" },
107 { MTYPE_AS_FILTER, "BGP AS filter" },
108 { MTYPE_AS_FILTER_STR, "BGP AS filter str" },
109 { 0, NULL },
110 { MTYPE_COMMUNITY, "community" },
111 { MTYPE_COMMUNITY_VAL, "community val" },
112 { MTYPE_COMMUNITY_STR, "community str" },
113 { 0, NULL },
114 { MTYPE_ECOMMUNITY, "extcommunity" },
115 { MTYPE_ECOMMUNITY_VAL, "extcommunity val" },
116 { MTYPE_ECOMMUNITY_STR, "extcommunity str" },
117 { 0, NULL },
118 { MTYPE_COMMUNITY_LIST, "community-list" },
119 { MTYPE_COMMUNITY_LIST_NAME, "community-list name" },
120 { MTYPE_COMMUNITY_LIST_ENTRY, "community-list entry" },
121 { MTYPE_COMMUNITY_LIST_CONFIG, "community-list config" },
122 { MTYPE_COMMUNITY_LIST_HANDLER, "community-list handler" },
123 { 0, NULL },
124 { MTYPE_CLUSTER, "Cluster list" },
125 { MTYPE_CLUSTER_VAL, "Cluster list val" },
126 { 0, NULL },
127 { MTYPE_TRANSIT, "BGP transit attr" },
128 { MTYPE_TRANSIT_VAL, "BGP transit val" },
129 { 0, NULL },
130 { MTYPE_BGP_DISTANCE, "BGP distance" },
131 { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" },
132 { MTYPE_BGP_CONFED_LIST, "BGP confed list" },
133 { MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" },
134 { MTYPE_BGP_DAMP_INFO, "Dampening info" },
135 { MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" },
136 { MTYPE_BGP_REGEXP, "BGP regexp" },
137 { MTYPE_BGP_AGGREGATE, "BGP aggregate" },
138 { -1, NULL }
139};
140
141struct memory_list memory_list_rip[] =
142{
143 { MTYPE_RIP, "RIP structure" },
144 { MTYPE_RIP_INFO, "RIP route info" },
145 { MTYPE_RIP_INTERFACE, "RIP interface" },
146 { MTYPE_RIP_PEER, "RIP peer" },
147 { MTYPE_RIP_OFFSET_LIST, "RIP offset list" },
148 { MTYPE_RIP_DISTANCE, "RIP distance" },
149 { -1, NULL }
150};
151
152struct memory_list memory_list_ripng[] =
153{
154 { MTYPE_RIPNG, "RIPng structure" },
155 { MTYPE_RIPNG_ROUTE, "RIPng route info" },
156 { MTYPE_RIPNG_AGGREGATE, "RIPng aggregate" },
157 { MTYPE_RIPNG_PEER, "RIPng peer" },
158 { MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" },
159 { MTYPE_RIPNG_RTE_DATA, "RIPng rte data" },
160 { -1, NULL }
161};
162
163struct memory_list memory_list_ospf[] =
164{
165 { MTYPE_OSPF_TOP, "OSPF top" },
166 { MTYPE_OSPF_AREA, "OSPF area" },
167 { MTYPE_OSPF_AREA_RANGE, "OSPF area range" },
168 { MTYPE_OSPF_NETWORK, "OSPF network" },
169 { MTYPE_OSPF_NEIGHBOR_STATIC,"OSPF static nbr" },
170 { MTYPE_OSPF_IF, "OSPF interface" },
171 { MTYPE_OSPF_NEIGHBOR, "OSPF neighbor" },
172 { MTYPE_OSPF_ROUTE, "OSPF route" },
173 { MTYPE_OSPF_TMP, "OSPF tmp mem" },
174 { MTYPE_OSPF_LSA, "OSPF LSA" },
175 { MTYPE_OSPF_LSA_DATA, "OSPF LSA data" },
176 { MTYPE_OSPF_LSDB, "OSPF LSDB" },
177 { MTYPE_OSPF_PACKET, "OSPF packet" },
178 { MTYPE_OSPF_FIFO, "OSPF FIFO queue" },
179 { MTYPE_OSPF_VERTEX, "OSPF vertex" },
180 { MTYPE_OSPF_NEXTHOP, "OSPF nexthop" },
181 { MTYPE_OSPF_PATH, "OSPF path" },
182 { MTYPE_OSPF_VL_DATA, "OSPF VL data" },
183 { MTYPE_OSPF_CRYPT_KEY, "OSPF crypt key" },
184 { MTYPE_OSPF_EXTERNAL_INFO, "OSPF ext. info" },
185 { MTYPE_OSPF_DISTANCE, "OSPF distance" },
186 { MTYPE_OSPF_IF_INFO, "OSPF if info" },
187 { MTYPE_OSPF_IF_PARAMS, "OSPF if params" },
188 { MTYPE_OSPF_MESSAGE, "OSPF message" },
189 { -1, NULL },
190};
191
192struct memory_list memory_list_ospf6[] =
193{
194 { MTYPE_OSPF6_TOP, "OSPF6 top" },
195 { MTYPE_OSPF6_AREA, "OSPF6 area" },
196 { MTYPE_OSPF6_IF, "OSPF6 interface" },
197 { MTYPE_OSPF6_NEIGHBOR, "OSPF6 neighbor" },
198 { MTYPE_OSPF6_ROUTE, "OSPF6 route" },
199 { MTYPE_OSPF6_PREFIX, "OSPF6 prefix" },
200 { MTYPE_OSPF6_MESSAGE, "OSPF6 message" },
201 { MTYPE_OSPF6_LSA, "OSPF6 LSA" },
202 { MTYPE_OSPF6_LSA_SUMMARY, "OSPF6 LSA summary" },
203 { MTYPE_OSPF6_LSDB, "OSPF6 LSA database" },
204 { MTYPE_OSPF6_VERTEX, "OSPF6 vertex" },
205 { MTYPE_OSPF6_SPFTREE, "OSPF6 SPF tree" },
206 { MTYPE_OSPF6_NEXTHOP, "OSPF6 nexthop" },
207 { MTYPE_OSPF6_EXTERNAL_INFO,"OSPF6 ext. info" },
208 { MTYPE_OSPF6_OTHER, "OSPF6 other" },
209 { -1, NULL },
210};
211
212struct memory_list memory_list_isis[] =
213{
214 { MTYPE_ISIS, "ISIS" },
215 { MTYPE_ISIS_TMP, "ISIS TMP" },
216 { MTYPE_ISIS_CIRCUIT, "ISIS circuit" },
217 { MTYPE_ISIS_LSP, "ISIS LSP" },
218 { MTYPE_ISIS_ADJACENCY, "ISIS adjacency" },
219 { MTYPE_ISIS_AREA, "ISIS area" },
220 { MTYPE_ISIS_AREA_ADDR, "ISIS area address" },
221 { MTYPE_ISIS_TLV, "ISIS TLV" },
222 { MTYPE_ISIS_DYNHN, "ISIS dyn hostname" },
223 { MTYPE_ISIS_SPFTREE, "ISIS SPFtree" },
224 { MTYPE_ISIS_VERTEX, "ISIS vertex" },
225 { MTYPE_ISIS_ROUTE_INFO, "ISIS route info" },
226 { MTYPE_ISIS_NEXTHOP, "ISIS nexthop" },
227 { MTYPE_ISIS_NEXTHOP6, "ISIS nexthop6" },
228 { -1, NULL },
229};
230
231struct memory_list memory_list_vtysh[] =
232{
233 { MTYPE_VTYSH_CONFIG, "Vtysh configuration", },
234 { MTYPE_VTYSH_CONFIG_LINE, "Vtysh configuration line" },
235 { -1, NULL },
236};
237
238struct mlist mlists[] __attribute__ ((unused)) = {
239 { memory_list_lib, "LIB" },
240 { memory_list_zebra, "ZEBRA" },
241 { memory_list_rip, "RIP" },
242 { memory_list_ripng, "RIPNG" },
243 { memory_list_ospf, "OSPF" },
244 { memory_list_ospf6, "OSPF6" },
245 { memory_list_isis, "ISIS" },
246 { memory_list_bgp, "BGP" },
247 { NULL, NULL},
248};