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