paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 1 | /* |
| 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 | * |
paul | dc830cb | 2005-04-16 15:51:05 +0000 | [diff] [blame] | 6 | * The script is sensitive to the format (though not whitespace), see |
| 7 | * the top of memtypes.awk for more details. |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 8 | * |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame] | 9 | * $Id$ |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #include "zebra.h" |
| 13 | #include "memory.h" |
| 14 | |
| 15 | struct 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" }, |
paul | 9c4f1c6 | 2005-11-03 11:04:07 +0000 | [diff] [blame] | 32 | { MTYPE_CONNECTED_LABEL, "Connected interface label" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 33 | { MTYPE_BUFFER, "Buffer" }, |
| 34 | { MTYPE_BUFFER_DATA, "Buffer data" }, |
| 35 | { MTYPE_STREAM, "Stream" }, |
| 36 | { MTYPE_STREAM_DATA, "Stream data" }, |
| 37 | { MTYPE_STREAM_FIFO, "Stream FIFO" }, |
| 38 | { MTYPE_PREFIX, "Prefix" }, |
| 39 | { MTYPE_PREFIX_IPV4, "Prefix IPv4" }, |
| 40 | { MTYPE_PREFIX_IPV6, "Prefix IPv6" }, |
| 41 | { MTYPE_HASH, "Hash" }, |
| 42 | { MTYPE_HASH_BACKET, "Hash Bucket" }, |
| 43 | { MTYPE_HASH_INDEX, "Hash Index" }, |
| 44 | { MTYPE_ROUTE_TABLE, "Route table" }, |
| 45 | { MTYPE_ROUTE_NODE, "Route node" }, |
| 46 | { MTYPE_DISTRIBUTE, "Distribute list" }, |
| 47 | { MTYPE_DISTRIBUTE_IFNAME, "Dist-list ifname" }, |
| 48 | { MTYPE_ACCESS_LIST, "Access List" }, |
| 49 | { MTYPE_ACCESS_LIST_STR, "Access List Str" }, |
| 50 | { MTYPE_ACCESS_FILTER, "Access Filter" }, |
| 51 | { MTYPE_PREFIX_LIST, "Prefix List" }, |
paul | 2c1de2a | 2005-04-25 14:02:44 +0000 | [diff] [blame] | 52 | { MTYPE_PREFIX_LIST_ENTRY, "Prefix List Entry" }, |
| 53 | { MTYPE_PREFIX_LIST_STR, "Prefix List Str" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 54 | { MTYPE_ROUTE_MAP, "Route map" }, |
| 55 | { MTYPE_ROUTE_MAP_NAME, "Route map name" }, |
| 56 | { MTYPE_ROUTE_MAP_INDEX, "Route map index" }, |
| 57 | { MTYPE_ROUTE_MAP_RULE, "Route map rule" }, |
| 58 | { MTYPE_ROUTE_MAP_RULE_STR, "Route map rule str" }, |
| 59 | { MTYPE_ROUTE_MAP_COMPILED, "Route map compiled" }, |
| 60 | { MTYPE_DESC, "Command desc" }, |
| 61 | { MTYPE_KEY, "Key" }, |
| 62 | { MTYPE_KEYCHAIN, "Key chain" }, |
| 63 | { MTYPE_IF_RMAP, "Interface route map" }, |
paul | 0241684 | 2005-10-26 05:05:16 +0000 | [diff] [blame] | 64 | { MTYPE_IF_RMAP_NAME, "I.f. route map name", }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 65 | { MTYPE_SOCKUNION, "Socket union" }, |
| 66 | { MTYPE_PRIVS, "Privilege information" }, |
| 67 | { MTYPE_ZLOG, "Logging" }, |
| 68 | { MTYPE_ZCLIENT, "Zclient" }, |
paul | 354d119 | 2005-04-25 16:26:42 +0000 | [diff] [blame] | 69 | { MTYPE_WORK_QUEUE, "Work queue" }, |
| 70 | { MTYPE_WORK_QUEUE_ITEM, "Work queue item" }, |
| 71 | { MTYPE_WORK_QUEUE_NAME, "Work queue name string" }, |
paul | 0241684 | 2005-10-26 05:05:16 +0000 | [diff] [blame] | 72 | { MTYPE_PQUEUE, "Priority queue" }, |
| 73 | { MTYPE_PQUEUE_DATA, "Priority queue data" }, |
| 74 | { MTYPE_HOST, "Host config" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 75 | { -1, NULL }, |
| 76 | }; |
| 77 | |
| 78 | struct memory_list memory_list_zebra[] = |
| 79 | { |
| 80 | { MTYPE_RTADV_PREFIX, "Router Advertisement Prefix" }, |
| 81 | { MTYPE_VRF, "VRF" }, |
| 82 | { MTYPE_VRF_NAME, "VRF name" }, |
| 83 | { MTYPE_NEXTHOP, "Nexthop" }, |
| 84 | { MTYPE_RIB, "RIB" }, |
paul | 354d119 | 2005-04-25 16:26:42 +0000 | [diff] [blame] | 85 | { MTYPE_RIB_QUEUE, "RIB process work queue" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 86 | { MTYPE_STATIC_IPV4, "Static IPv4 route" }, |
| 87 | { MTYPE_STATIC_IPV6, "Static IPv6 route" }, |
| 88 | { -1, NULL }, |
| 89 | }; |
| 90 | |
| 91 | struct memory_list memory_list_bgp[] = |
| 92 | { |
| 93 | { MTYPE_BGP, "BGP instance" }, |
Stephen Hemminger | d023aec | 2009-07-21 16:27:21 -0700 | [diff] [blame] | 94 | { MTYPE_BGP_LISTENER, "BGP listen socket details" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 95 | { MTYPE_BGP_PEER, "BGP peer" }, |
paul | e387e66 | 2005-05-19 02:13:28 +0000 | [diff] [blame] | 96 | { MTYPE_BGP_PEER_HOST, "BGP peer hostname" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 97 | { MTYPE_PEER_GROUP, "Peer group" }, |
| 98 | { MTYPE_PEER_DESC, "Peer description" }, |
Paul Jakma | 0df7c91 | 2008-07-21 21:02:49 +0000 | [diff] [blame] | 99 | { MTYPE_PEER_PASSWORD, "Peer password string" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 100 | { MTYPE_ATTR, "BGP attribute" }, |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame] | 101 | { MTYPE_ATTR_EXTRA, "BGP extra attributes" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 102 | { MTYPE_AS_PATH, "BGP aspath" }, |
| 103 | { MTYPE_AS_SEG, "BGP aspath seg" }, |
paul | 75b2dd0 | 2005-09-21 14:06:35 +0000 | [diff] [blame] | 104 | { MTYPE_AS_SEG_DATA, "BGP aspath segment data" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 105 | { MTYPE_AS_STR, "BGP aspath str" }, |
| 106 | { 0, NULL }, |
| 107 | { MTYPE_BGP_TABLE, "BGP table" }, |
| 108 | { MTYPE_BGP_NODE, "BGP node" }, |
| 109 | { MTYPE_BGP_ROUTE, "BGP route" }, |
Paul Jakma | fb982c2 | 2007-05-04 20:15:47 +0000 | [diff] [blame] | 110 | { MTYPE_BGP_ROUTE_EXTRA, "BGP ancillary route info" }, |
Chris Caputo | 6c88b44 | 2010-07-27 16:28:55 +0000 | [diff] [blame^] | 111 | { MTYPE_BGP_CONN, "BGP connected" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 112 | { MTYPE_BGP_STATIC, "BGP static" }, |
| 113 | { MTYPE_BGP_ADVERTISE_ATTR, "BGP adv attr" }, |
| 114 | { MTYPE_BGP_ADVERTISE, "BGP adv" }, |
Paul Jakma | b51f126 | 2006-03-30 14:09:38 +0000 | [diff] [blame] | 115 | { MTYPE_BGP_SYNCHRONISE, "BGP synchronise" }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 116 | { MTYPE_BGP_ADJ_IN, "BGP adj in" }, |
| 117 | { MTYPE_BGP_ADJ_OUT, "BGP adj out" }, |
| 118 | { 0, NULL }, |
| 119 | { MTYPE_AS_LIST, "BGP AS list" }, |
| 120 | { MTYPE_AS_FILTER, "BGP AS filter" }, |
| 121 | { MTYPE_AS_FILTER_STR, "BGP AS filter str" }, |
| 122 | { 0, NULL }, |
| 123 | { MTYPE_COMMUNITY, "community" }, |
| 124 | { MTYPE_COMMUNITY_VAL, "community val" }, |
| 125 | { MTYPE_COMMUNITY_STR, "community str" }, |
| 126 | { 0, NULL }, |
| 127 | { MTYPE_ECOMMUNITY, "extcommunity" }, |
| 128 | { MTYPE_ECOMMUNITY_VAL, "extcommunity val" }, |
| 129 | { MTYPE_ECOMMUNITY_STR, "extcommunity str" }, |
| 130 | { 0, NULL }, |
| 131 | { MTYPE_COMMUNITY_LIST, "community-list" }, |
| 132 | { MTYPE_COMMUNITY_LIST_NAME, "community-list name" }, |
| 133 | { MTYPE_COMMUNITY_LIST_ENTRY, "community-list entry" }, |
| 134 | { MTYPE_COMMUNITY_LIST_CONFIG, "community-list config" }, |
| 135 | { MTYPE_COMMUNITY_LIST_HANDLER, "community-list handler" }, |
| 136 | { 0, NULL }, |
| 137 | { MTYPE_CLUSTER, "Cluster list" }, |
| 138 | { MTYPE_CLUSTER_VAL, "Cluster list val" }, |
| 139 | { 0, NULL }, |
paul | 200df11 | 2005-06-01 11:17:05 +0000 | [diff] [blame] | 140 | { MTYPE_BGP_PROCESS_QUEUE, "BGP Process queue" }, |
| 141 | { MTYPE_BGP_CLEAR_NODE_QUEUE, "BGP node clear queue" }, |
| 142 | { 0, NULL }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 143 | { MTYPE_TRANSIT, "BGP transit attr" }, |
| 144 | { MTYPE_TRANSIT_VAL, "BGP transit val" }, |
| 145 | { 0, NULL }, |
| 146 | { MTYPE_BGP_DISTANCE, "BGP distance" }, |
| 147 | { MTYPE_BGP_NEXTHOP_CACHE, "BGP nexthop" }, |
| 148 | { MTYPE_BGP_CONFED_LIST, "BGP confed list" }, |
| 149 | { MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" }, |
| 150 | { MTYPE_BGP_DAMP_INFO, "Dampening info" }, |
| 151 | { MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" }, |
| 152 | { MTYPE_BGP_REGEXP, "BGP regexp" }, |
| 153 | { MTYPE_BGP_AGGREGATE, "BGP aggregate" }, |
| 154 | { -1, NULL } |
| 155 | }; |
| 156 | |
| 157 | struct memory_list memory_list_rip[] = |
| 158 | { |
| 159 | { MTYPE_RIP, "RIP structure" }, |
| 160 | { MTYPE_RIP_INFO, "RIP route info" }, |
| 161 | { MTYPE_RIP_INTERFACE, "RIP interface" }, |
| 162 | { MTYPE_RIP_PEER, "RIP peer" }, |
| 163 | { MTYPE_RIP_OFFSET_LIST, "RIP offset list" }, |
| 164 | { MTYPE_RIP_DISTANCE, "RIP distance" }, |
| 165 | { -1, NULL } |
| 166 | }; |
| 167 | |
| 168 | struct memory_list memory_list_ripng[] = |
| 169 | { |
| 170 | { MTYPE_RIPNG, "RIPng structure" }, |
| 171 | { MTYPE_RIPNG_ROUTE, "RIPng route info" }, |
| 172 | { MTYPE_RIPNG_AGGREGATE, "RIPng aggregate" }, |
| 173 | { MTYPE_RIPNG_PEER, "RIPng peer" }, |
| 174 | { MTYPE_RIPNG_OFFSET_LIST, "RIPng offset lst" }, |
| 175 | { MTYPE_RIPNG_RTE_DATA, "RIPng rte data" }, |
| 176 | { -1, NULL } |
| 177 | }; |
| 178 | |
| 179 | struct memory_list memory_list_ospf[] = |
| 180 | { |
| 181 | { MTYPE_OSPF_TOP, "OSPF top" }, |
| 182 | { MTYPE_OSPF_AREA, "OSPF area" }, |
| 183 | { MTYPE_OSPF_AREA_RANGE, "OSPF area range" }, |
| 184 | { MTYPE_OSPF_NETWORK, "OSPF network" }, |
| 185 | { MTYPE_OSPF_NEIGHBOR_STATIC,"OSPF static nbr" }, |
| 186 | { MTYPE_OSPF_IF, "OSPF interface" }, |
| 187 | { MTYPE_OSPF_NEIGHBOR, "OSPF neighbor" }, |
| 188 | { MTYPE_OSPF_ROUTE, "OSPF route" }, |
| 189 | { MTYPE_OSPF_TMP, "OSPF tmp mem" }, |
| 190 | { MTYPE_OSPF_LSA, "OSPF LSA" }, |
| 191 | { MTYPE_OSPF_LSA_DATA, "OSPF LSA data" }, |
| 192 | { MTYPE_OSPF_LSDB, "OSPF LSDB" }, |
| 193 | { MTYPE_OSPF_PACKET, "OSPF packet" }, |
| 194 | { MTYPE_OSPF_FIFO, "OSPF FIFO queue" }, |
| 195 | { MTYPE_OSPF_VERTEX, "OSPF vertex" }, |
paul | eb3da6d | 2005-10-18 04:20:33 +0000 | [diff] [blame] | 196 | { MTYPE_OSPF_VERTEX_PARENT, "OSPF vertex parent", }, |
paul | 2fd2fd5 | 2005-04-15 11:47:15 +0000 | [diff] [blame] | 197 | { MTYPE_OSPF_NEXTHOP, "OSPF nexthop" }, |
| 198 | { MTYPE_OSPF_PATH, "OSPF path" }, |
| 199 | { MTYPE_OSPF_VL_DATA, "OSPF VL data" }, |
| 200 | { MTYPE_OSPF_CRYPT_KEY, "OSPF crypt key" }, |
| 201 | { MTYPE_OSPF_EXTERNAL_INFO, "OSPF ext. info" }, |
| 202 | { MTYPE_OSPF_DISTANCE, "OSPF distance" }, |
| 203 | { MTYPE_OSPF_IF_INFO, "OSPF if info" }, |
| 204 | { MTYPE_OSPF_IF_PARAMS, "OSPF if params" }, |
| 205 | { MTYPE_OSPF_MESSAGE, "OSPF message" }, |
| 206 | { -1, NULL }, |
| 207 | }; |
| 208 | |
| 209 | struct memory_list memory_list_ospf6[] = |
| 210 | { |
| 211 | { MTYPE_OSPF6_TOP, "OSPF6 top" }, |
| 212 | { MTYPE_OSPF6_AREA, "OSPF6 area" }, |
| 213 | { MTYPE_OSPF6_IF, "OSPF6 interface" }, |
| 214 | { MTYPE_OSPF6_NEIGHBOR, "OSPF6 neighbor" }, |
| 215 | { MTYPE_OSPF6_ROUTE, "OSPF6 route" }, |
| 216 | { MTYPE_OSPF6_PREFIX, "OSPF6 prefix" }, |
| 217 | { MTYPE_OSPF6_MESSAGE, "OSPF6 message" }, |
| 218 | { MTYPE_OSPF6_LSA, "OSPF6 LSA" }, |
| 219 | { MTYPE_OSPF6_LSA_SUMMARY, "OSPF6 LSA summary" }, |
| 220 | { MTYPE_OSPF6_LSDB, "OSPF6 LSA database" }, |
| 221 | { MTYPE_OSPF6_VERTEX, "OSPF6 vertex" }, |
| 222 | { MTYPE_OSPF6_SPFTREE, "OSPF6 SPF tree" }, |
| 223 | { MTYPE_OSPF6_NEXTHOP, "OSPF6 nexthop" }, |
| 224 | { MTYPE_OSPF6_EXTERNAL_INFO,"OSPF6 ext. info" }, |
| 225 | { MTYPE_OSPF6_OTHER, "OSPF6 other" }, |
| 226 | { -1, NULL }, |
| 227 | }; |
| 228 | |
| 229 | struct memory_list memory_list_isis[] = |
| 230 | { |
| 231 | { MTYPE_ISIS, "ISIS" }, |
| 232 | { MTYPE_ISIS_TMP, "ISIS TMP" }, |
| 233 | { MTYPE_ISIS_CIRCUIT, "ISIS circuit" }, |
| 234 | { MTYPE_ISIS_LSP, "ISIS LSP" }, |
| 235 | { MTYPE_ISIS_ADJACENCY, "ISIS adjacency" }, |
| 236 | { MTYPE_ISIS_AREA, "ISIS area" }, |
| 237 | { MTYPE_ISIS_AREA_ADDR, "ISIS area address" }, |
| 238 | { MTYPE_ISIS_TLV, "ISIS TLV" }, |
| 239 | { MTYPE_ISIS_DYNHN, "ISIS dyn hostname" }, |
| 240 | { MTYPE_ISIS_SPFTREE, "ISIS SPFtree" }, |
| 241 | { MTYPE_ISIS_VERTEX, "ISIS vertex" }, |
| 242 | { MTYPE_ISIS_ROUTE_INFO, "ISIS route info" }, |
| 243 | { MTYPE_ISIS_NEXTHOP, "ISIS nexthop" }, |
| 244 | { MTYPE_ISIS_NEXTHOP6, "ISIS nexthop6" }, |
| 245 | { -1, NULL }, |
| 246 | }; |
| 247 | |
| 248 | struct memory_list memory_list_vtysh[] = |
| 249 | { |
| 250 | { MTYPE_VTYSH_CONFIG, "Vtysh configuration", }, |
| 251 | { MTYPE_VTYSH_CONFIG_LINE, "Vtysh configuration line" }, |
| 252 | { -1, NULL }, |
| 253 | }; |
| 254 | |
| 255 | struct mlist mlists[] __attribute__ ((unused)) = { |
| 256 | { memory_list_lib, "LIB" }, |
| 257 | { memory_list_zebra, "ZEBRA" }, |
| 258 | { memory_list_rip, "RIP" }, |
| 259 | { memory_list_ripng, "RIPNG" }, |
| 260 | { memory_list_ospf, "OSPF" }, |
| 261 | { memory_list_ospf6, "OSPF6" }, |
| 262 | { memory_list_isis, "ISIS" }, |
| 263 | { memory_list_bgp, "BGP" }, |
| 264 | { NULL, NULL}, |
| 265 | }; |