memtypes.c 8.8 KB

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