rules.c.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. rules.c
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='ruledump.c.html' title=' ruledump.c '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='RxRates1.c.html' title=' RxRates1.c '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  24. *
  25. * All rights reserved.
  26. *
  27. * Redistribution and use in source and binary forms, with or
  28. * without modification, are permitted (subject to the limitations
  29. * in the disclaimer below) provided that the following conditions
  30. * are met:
  31. *
  32. * * Redistributions of source code must retain the above copyright
  33. * notice, this list of conditions and the following disclaimer.
  34. *
  35. * * Redistributions in binary form must reproduce the above
  36. * copyright notice, this list of conditions and the following
  37. * disclaimer in the documentation and/or other materials
  38. * provided with the distribution.
  39. *
  40. * * Neither the name of Qualcomm Atheros nor the names of
  41. * its contributors may be used to endorse or promote products
  42. * derived from this software without specific prior written
  43. * permission.
  44. *
  45. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  46. * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE
  47. * COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR
  48. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  49. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  50. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  51. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  52. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  53. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  54. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  55. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  56. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  57. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  58. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  59. *
  60. *--------------------------------------------------------------------*/
  61. /*====================================================================*
  62. *
  63. * rules.c - Classification Rules Lookup Tables;
  64. *
  65. * rules.h
  66. *
  67. * QoS related symbol tables used by function ParseRule;
  68. *
  69. * Contributor(s):
  70. * Charles Maier &lt;cmaier@qca.qualcomm.com&gt;
  71. * Nathaniel Houghton &lt;nhoughto@qca.qualcomm.com&gt;
  72. *
  73. *--------------------------------------------------------------------*/
  74. #ifndef RULES_SOURCE
  75. #define RULES_SOURCE
  76. #include &quot;../plc/rules.h&quot;
  77. struct _code_ const controls [] =
  78. {
  79. {
  80. CONTROL_ADD,
  81. &quot;Add&quot;
  82. },
  83. {
  84. CONTROL_REM,
  85. &quot;Rem&quot;
  86. },
  87. {
  88. CONTROL_REMOVE,
  89. &quot;Remove&quot;
  90. }
  91. };
  92. struct _code_ const volatilities [] =
  93. {
  94. {
  95. VOLATILITY_TEMP,
  96. &quot;Temp&quot;
  97. },
  98. {
  99. VOLATILITY_PERM,
  100. &quot;Perm&quot;
  101. }
  102. };
  103. struct _code_ const actions [] =
  104. {
  105. {
  106. ACTION_CAP0,
  107. &quot;CAP0&quot;
  108. },
  109. {
  110. ACTION_CAP1,
  111. &quot;CAP1&quot;
  112. },
  113. {
  114. ACTION_CAP2,
  115. &quot;CAP2&quot;
  116. },
  117. {
  118. ACTION_CAP3,
  119. &quot;CAP3&quot;
  120. },
  121. {
  122. ACTION_BOOST,
  123. &quot;Boost&quot;
  124. },
  125. {
  126. ACTION_DROP,
  127. &quot;Drop&quot;
  128. },
  129. {
  130. ACTION_DROPTX,
  131. &quot;DropTX&quot;
  132. },
  133. {
  134. ACTION_DROPRX,
  135. &quot;DropRX&quot;
  136. },
  137. {
  138. ACTION_AUTOCONNECT,
  139. &quot;AutoConnect&quot;
  140. },
  141. {
  142. ACTION_STRIPTX,
  143. &quot;StripTX&quot;
  144. },
  145. {
  146. ACTION_STRIPRX,
  147. &quot;StripRX&quot;
  148. },
  149. {
  150. ACTION_TAGTX,
  151. &quot;TagTX&quot;
  152. },
  153. {
  154. ACTION_TAGRX,
  155. &quot;TagRX&quot;
  156. }
  157. };
  158. struct _code_ const operands [] =
  159. {
  160. {
  161. OPERAND_ALL,
  162. &quot;All&quot;
  163. },
  164. {
  165. OPERAND_ANY,
  166. &quot;Any&quot;
  167. },
  168. {
  169. OPERAND_ALWAYS,
  170. &quot;Always&quot;
  171. }
  172. };
  173. struct _code_ const fields [] =
  174. {
  175. {
  176. FIELD_ETH_DA,
  177. &quot;EthDA&quot;
  178. },
  179. {
  180. FIELD_ETH_SA,
  181. &quot;EthSA&quot;
  182. },
  183. {
  184. FIELD_VLAN_UP,
  185. &quot;VLANUP&quot;
  186. },
  187. {
  188. FIELD_VLAN_ID,
  189. &quot;VLANID&quot;
  190. },
  191. {
  192. FIELD_IPV4_TOS,
  193. &quot;IPv4TOS&quot;
  194. },
  195. {
  196. FIELD_IPV4_PROT,
  197. &quot;IPv4PROT&quot;
  198. },
  199. {
  200. FIELD_IPV4_SA,
  201. &quot;IPv4SA&quot;
  202. },
  203. {
  204. FIELD_IPV4_DA,
  205. &quot;IPv4DA&quot;
  206. },
  207. {
  208. FIELD_IPV6_TC,
  209. &quot;IPv6TC&quot;
  210. },
  211. {
  212. FIELD_IPV6_FL,
  213. &quot;IPv6FL&quot;
  214. },
  215. {
  216. FIELD_IPV6_SA,
  217. &quot;IPv6SA&quot;
  218. },
  219. {
  220. FIELD_IPV6_DA,
  221. &quot;IPv6DA&quot;
  222. },
  223. {
  224. FIELD_TCP_SP,
  225. &quot;TCPSP&quot;
  226. },
  227. {
  228. FIELD_TCP_DP,
  229. &quot;TCPDP&quot;
  230. },
  231. {
  232. FIELD_UDP_SP,
  233. &quot;UDPSP&quot;
  234. },
  235. {
  236. FIELD_UDP_DP,
  237. &quot;UDPDP&quot;
  238. },
  239. {
  240. FIELD_IP_SP,
  241. &quot;IPSP&quot;
  242. },
  243. {
  244. FIELD_IP_DP,
  245. &quot;IPDP&quot;
  246. },
  247. {
  248. FIELD_HPAV_MME,
  249. &quot;MME&quot;
  250. },
  251. {
  252. FIELD_ETH_TYPE,
  253. &quot;ET&quot;
  254. },
  255. {
  256. FIELD_TCP_ACK,
  257. &quot;TCPAck&quot;
  258. },
  259. {
  260. FIELD_VLAN_TAG,
  261. &quot;VLANTag&quot;
  262. }
  263. };
  264. struct _code_ const operators [] =
  265. {
  266. {
  267. OPERATOR_IS,
  268. &quot;Is&quot;
  269. },
  270. {
  271. OPERATOR_NOT,
  272. &quot;Not&quot;
  273. }
  274. };
  275. struct _code_ const states [] =
  276. {
  277. {
  278. OPERATOR_IS,
  279. &quot;True&quot;
  280. },
  281. {
  282. OPERATOR_NOT,
  283. &quot;False&quot;
  284. },
  285. {
  286. OPERATOR_IS,
  287. &quot;On&quot;
  288. },
  289. {
  290. OPERATOR_NOT,
  291. &quot;Off&quot;
  292. },
  293. {
  294. OPERATOR_IS,
  295. &quot;Yes&quot;
  296. },
  297. {
  298. OPERATOR_NOT,
  299. &quot;No&quot;
  300. },
  301. {
  302. OPERATOR_IS,
  303. &quot;Present&quot;
  304. },
  305. {
  306. OPERATOR_NOT,
  307. &quot;Missing&quot;
  308. }
  309. };
  310. #endif
  311. </pre>
  312. <div class='footerlink'>
  313. [<a href='ruledump.c.html' title=' ruledump.c '>PREV</a>]
  314. [<a href='toolkit.html' title=' Index '>HOME</a>]
  315. [<a href='RxRates1.c.html' title=' RxRates1.c '>NEXT</a>]
  316. </div>
  317. </body>
  318. </html>