grammar.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. /* A Bison parser, made by GNU Bison 3.0.4. */
  2. /* Bison interface for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. #ifndef YY_PCAP_GRAMMAR_H_INCLUDED
  26. # define YY_PCAP_GRAMMAR_H_INCLUDED
  27. /* Debug traces. */
  28. #ifndef YYDEBUG
  29. # define YYDEBUG 0
  30. #endif
  31. #if YYDEBUG
  32. extern int pcap_debug;
  33. #endif
  34. /* Token type. */
  35. #ifndef YYTOKENTYPE
  36. # define YYTOKENTYPE
  37. enum yytokentype
  38. {
  39. DST = 258,
  40. SRC = 259,
  41. HOST = 260,
  42. GATEWAY = 261,
  43. NET = 262,
  44. NETMASK = 263,
  45. PORT = 264,
  46. PORTRANGE = 265,
  47. LESS = 266,
  48. GREATER = 267,
  49. PROTO = 268,
  50. PROTOCHAIN = 269,
  51. CBYTE = 270,
  52. ARP = 271,
  53. RARP = 272,
  54. IP = 273,
  55. SCTP = 274,
  56. TCP = 275,
  57. UDP = 276,
  58. ICMP = 277,
  59. IGMP = 278,
  60. IGRP = 279,
  61. PIM = 280,
  62. VRRP = 281,
  63. CARP = 282,
  64. ATALK = 283,
  65. AARP = 284,
  66. DECNET = 285,
  67. LAT = 286,
  68. SCA = 287,
  69. MOPRC = 288,
  70. MOPDL = 289,
  71. TK_BROADCAST = 290,
  72. TK_MULTICAST = 291,
  73. NUM = 292,
  74. INBOUND = 293,
  75. OUTBOUND = 294,
  76. PF_IFNAME = 295,
  77. PF_RSET = 296,
  78. PF_RNR = 297,
  79. PF_SRNR = 298,
  80. PF_REASON = 299,
  81. PF_ACTION = 300,
  82. TYPE = 301,
  83. SUBTYPE = 302,
  84. DIR = 303,
  85. ADDR1 = 304,
  86. ADDR2 = 305,
  87. ADDR3 = 306,
  88. ADDR4 = 307,
  89. RA = 308,
  90. TA = 309,
  91. LINK = 310,
  92. GEQ = 311,
  93. LEQ = 312,
  94. NEQ = 313,
  95. ID = 314,
  96. EID = 315,
  97. HID = 316,
  98. HID6 = 317,
  99. AID = 318,
  100. LSH = 319,
  101. RSH = 320,
  102. LEN = 321,
  103. IPV6 = 322,
  104. ICMPV6 = 323,
  105. AH = 324,
  106. ESP = 325,
  107. VLAN = 326,
  108. MPLS = 327,
  109. PPPOED = 328,
  110. PPPOES = 329,
  111. GENEVE = 330,
  112. ISO = 331,
  113. ESIS = 332,
  114. CLNP = 333,
  115. ISIS = 334,
  116. L1 = 335,
  117. L2 = 336,
  118. IIH = 337,
  119. LSP = 338,
  120. SNP = 339,
  121. CSNP = 340,
  122. PSNP = 341,
  123. STP = 342,
  124. IPX = 343,
  125. NETBEUI = 344,
  126. LANE = 345,
  127. LLC = 346,
  128. METAC = 347,
  129. BCC = 348,
  130. SC = 349,
  131. ILMIC = 350,
  132. OAMF4EC = 351,
  133. OAMF4SC = 352,
  134. OAM = 353,
  135. OAMF4 = 354,
  136. CONNECTMSG = 355,
  137. METACONNECT = 356,
  138. VPI = 357,
  139. VCI = 358,
  140. RADIO = 359,
  141. FISU = 360,
  142. LSSU = 361,
  143. MSU = 362,
  144. HFISU = 363,
  145. HLSSU = 364,
  146. HMSU = 365,
  147. SIO = 366,
  148. OPC = 367,
  149. DPC = 368,
  150. SLS = 369,
  151. HSIO = 370,
  152. HOPC = 371,
  153. HDPC = 372,
  154. HSLS = 373,
  155. OR = 374,
  156. AND = 375,
  157. UMINUS = 376
  158. };
  159. #endif
  160. /* Tokens. */
  161. #define DST 258
  162. #define SRC 259
  163. #define HOST 260
  164. #define GATEWAY 261
  165. #define NET 262
  166. #define NETMASK 263
  167. #define PORT 264
  168. #define PORTRANGE 265
  169. #define LESS 266
  170. #define GREATER 267
  171. #define PROTO 268
  172. #define PROTOCHAIN 269
  173. #define CBYTE 270
  174. #define ARP 271
  175. #define RARP 272
  176. #define IP 273
  177. #define SCTP 274
  178. #define TCP 275
  179. #define UDP 276
  180. #define ICMP 277
  181. #define IGMP 278
  182. #define IGRP 279
  183. #define PIM 280
  184. #define VRRP 281
  185. #define CARP 282
  186. #define ATALK 283
  187. #define AARP 284
  188. #define DECNET 285
  189. #define LAT 286
  190. #define SCA 287
  191. #define MOPRC 288
  192. #define MOPDL 289
  193. #define TK_BROADCAST 290
  194. #define TK_MULTICAST 291
  195. #define NUM 292
  196. #define INBOUND 293
  197. #define OUTBOUND 294
  198. #define PF_IFNAME 295
  199. #define PF_RSET 296
  200. #define PF_RNR 297
  201. #define PF_SRNR 298
  202. #define PF_REASON 299
  203. #define PF_ACTION 300
  204. #define TYPE 301
  205. #define SUBTYPE 302
  206. #define DIR 303
  207. #define ADDR1 304
  208. #define ADDR2 305
  209. #define ADDR3 306
  210. #define ADDR4 307
  211. #define RA 308
  212. #define TA 309
  213. #define LINK 310
  214. #define GEQ 311
  215. #define LEQ 312
  216. #define NEQ 313
  217. #define ID 314
  218. #define EID 315
  219. #define HID 316
  220. #define HID6 317
  221. #define AID 318
  222. #define LSH 319
  223. #define RSH 320
  224. #define LEN 321
  225. #define IPV6 322
  226. #define ICMPV6 323
  227. #define AH 324
  228. #define ESP 325
  229. #define VLAN 326
  230. #define MPLS 327
  231. #define PPPOED 328
  232. #define PPPOES 329
  233. #define GENEVE 330
  234. #define ISO 331
  235. #define ESIS 332
  236. #define CLNP 333
  237. #define ISIS 334
  238. #define L1 335
  239. #define L2 336
  240. #define IIH 337
  241. #define LSP 338
  242. #define SNP 339
  243. #define CSNP 340
  244. #define PSNP 341
  245. #define STP 342
  246. #define IPX 343
  247. #define NETBEUI 344
  248. #define LANE 345
  249. #define LLC 346
  250. #define METAC 347
  251. #define BCC 348
  252. #define SC 349
  253. #define ILMIC 350
  254. #define OAMF4EC 351
  255. #define OAMF4SC 352
  256. #define OAM 353
  257. #define OAMF4 354
  258. #define CONNECTMSG 355
  259. #define METACONNECT 356
  260. #define VPI 357
  261. #define VCI 358
  262. #define RADIO 359
  263. #define FISU 360
  264. #define LSSU 361
  265. #define MSU 362
  266. #define HFISU 363
  267. #define HLSSU 364
  268. #define HMSU 365
  269. #define SIO 366
  270. #define OPC 367
  271. #define DPC 368
  272. #define SLS 369
  273. #define HSIO 370
  274. #define HOPC 371
  275. #define HDPC 372
  276. #define HSLS 373
  277. #define OR 374
  278. #define AND 375
  279. #define UMINUS 376
  280. /* Value type. */
  281. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  282. union YYSTYPE
  283. {
  284. #line 286 "grammar.y" /* yacc.c:1909 */
  285. int i;
  286. bpf_u_int32 h;
  287. u_char *e;
  288. char *s;
  289. struct stmt *stmt;
  290. struct arth *a;
  291. struct {
  292. struct qual q;
  293. int atmfieldtype;
  294. int mtp3fieldtype;
  295. struct block *b;
  296. } blk;
  297. struct block *rblk;
  298. #line 312 "grammar.h" /* yacc.c:1909 */
  299. };
  300. typedef union YYSTYPE YYSTYPE;
  301. # define YYSTYPE_IS_TRIVIAL 1
  302. # define YYSTYPE_IS_DECLARED 1
  303. #endif
  304. int pcap_parse (void *yyscanner, compiler_state_t *cstate);
  305. #endif /* !YY_PCAP_GRAMMAR_H_INCLUDED */