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