1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632
|
#ifndef YY_ClntParser_h_included
#define YY_ClntParser_h_included
#define YY_USE_CLASS
#line 1 "../bison++/bison.h"
/* before anything */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#line 8 "../bison++/bison.h"
#line 3 "ClntParser.y"
#include <iostream>
#include <string>
#include <vector>
#include <malloc.h>
#include "DHCPConst.h"
#include "SmartPtr.h"
#include "Container.h"
#include "ClntParser.h"
#include "ClntParsGlobalOpt.h"
#include "ClntCfgIface.h"
#include "ClntCfgAddr.h"
#include "ClntCfgIA.h"
#include "ClntCfgTA.h"
#include "ClntCfgPD.h"
#include "ClntCfgMgr.h"
#include "Logger.h"
#include "OptGeneric.h"
#include "OptAddr.h"
#include "OptAddrLst.h"
#include "OptString.h"
using namespace std;
#define YY_USE_CLASS
#define YY_ClntParser_MEMBERS yyFlexLexer * Lex_; \
/*List of options in scope stack,the most fresh is last in the list*/ \
List(TClntParsGlobalOpt) ParserOptStack; \
/*List of parsed interfaces/IAs/Addresses, last */ \
/*interface/IA/address is just being parsing or have been just parsed*/ \
List(TClntCfgIface) ClntCfgIfaceLst; \
List(TClntCfgIA) ClntCfgIALst; \
List(TClntCfgTA) ClntCfgTALst; \
List(TClntCfgPD) ClntCfgPDLst; \
List(TClntCfgAddr) ClntCfgAddrLst; \
DigestTypesLst DigestLst; \
/*Pointer to list which should contain either rejected servers or */ \
/*preffered servers*/ \
List(THostID) PresentStationLst; \
List(TIPv6Addr) PresentAddrLst; \
List(TClntCfgPrefix) PrefixLst; \
List(std::string) PresentStringLst; \
List(TOptVendorSpecInfo) VendorSpec; \
bool IfaceDefined(int ifaceNr); \
bool IfaceDefined(const std::string& ifaceName); \
bool StartIfaceDeclaration(const std::string& ifaceName); \
bool StartIfaceDeclaration(int ifindex); \
bool EndIfaceDeclaration(); \
void EmptyIface(); \
bool StartIADeclaration(bool aggregation); \
void EndIADeclaration(); \
bool StartPDDeclaration(); \
bool EndPDDeclaration(); \
void EmptyIA(); \
void EmptyAddr(); \
TClntCfgMgr * CfgMgr; \
bool iaidSet; \
unsigned int iaid; \
unsigned int AddrCount_; \
virtual ~ClntParser(); \
EDUIDType DUIDType; \
int DUIDEnterpriseNumber; \
SPtr<TDUID> DUIDEnterpriseID;
#define YY_ClntParser_CONSTRUCTOR_PARAM yyFlexLexer * lex
#define YY_ClntParser_CONSTRUCTOR_CODE \
Lex_ = lex; \
ParserOptStack.append(new TClntParsGlobalOpt()); \
ParserOptStack.getFirst()->setIAIDCnt(1); \
ParserOptStack.getLast(); \
DUIDType = DUID_TYPE_NOT_DEFINED; \
DUIDEnterpriseID.reset(); \
AddrCount_ = 0; \
CfgMgr = 0; \
iaidSet = false; \
iaid = 0xffffffff; \
DUIDEnterpriseNumber = -1; \
yynerrs = 0; \
yychar = 0;
#line 91 "ClntParser.y"
typedef union
{
int ival;
char *strval;
struct SDuid {
int length;
char* duid;
} duidval;
char addrval[16];
} yy_ClntParser_stype;
#define YY_ClntParser_STYPE yy_ClntParser_stype
#line 21 "../bison++/bison.h"
/* %{ and %header{ and %union, during decl */
#ifndef YY_ClntParser_COMPATIBILITY
#ifndef YY_USE_CLASS
#define YY_ClntParser_COMPATIBILITY 1
#else
#define YY_ClntParser_COMPATIBILITY 0
#endif
#endif
#if YY_ClntParser_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YYLTYPE
#ifndef YY_ClntParser_LTYPE
#define YY_ClntParser_LTYPE YYLTYPE
/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
/* use %define LTYPE */
#endif
#endif
/*#ifdef YYSTYPE*/
#ifndef YY_ClntParser_STYPE
#define YY_ClntParser_STYPE YYSTYPE
/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
/* use %define STYPE */
#endif
/*#endif*/
#ifdef YYDEBUG
#ifndef YY_ClntParser_DEBUG
#define YY_ClntParser_DEBUG YYDEBUG
/* WARNING obsolete !!! user defined YYDEBUG not reported into generated header */
/* use %define DEBUG */
#endif
#endif
/* use goto to be compatible */
#ifndef YY_ClntParser_USE_GOTO
#define YY_ClntParser_USE_GOTO 1
#endif
#endif
/* use no goto to be clean in C++ */
#ifndef YY_ClntParser_USE_GOTO
#define YY_ClntParser_USE_GOTO 0
#endif
#ifndef YY_ClntParser_PURE
#line 65 "../bison++/bison.h"
#line 65 "../bison++/bison.h"
/* YY_ClntParser_PURE */
#endif
#line 68 "../bison++/bison.h"
#line 68 "../bison++/bison.h"
/* prefix */
#ifndef YY_ClntParser_DEBUG
#line 71 "../bison++/bison.h"
#define YY_ClntParser_DEBUG 1
#line 71 "../bison++/bison.h"
/* YY_ClntParser_DEBUG */
#endif
#ifndef YY_ClntParser_LSP_NEEDED
#line 75 "../bison++/bison.h"
#line 75 "../bison++/bison.h"
/* YY_ClntParser_LSP_NEEDED*/
#endif
/* DEFAULT LTYPE*/
#ifdef YY_ClntParser_LSP_NEEDED
#ifndef YY_ClntParser_LTYPE
#ifndef BISON_YYLTYPE_ISDECLARED
#define BISON_YYLTYPE_ISDECLARED
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#endif
#define YY_ClntParser_LTYPE yyltype
#endif
#endif
/* DEFAULT STYPE*/
#ifndef YY_ClntParser_STYPE
#define YY_ClntParser_STYPE int
#endif
/* DEFAULT MISCELANEOUS */
#ifndef YY_ClntParser_PARSE
#define YY_ClntParser_PARSE yyparse
#endif
#ifndef YY_ClntParser_LEX
#define YY_ClntParser_LEX yylex
#endif
#ifndef YY_ClntParser_LVAL
#define YY_ClntParser_LVAL yylval
#endif
#ifndef YY_ClntParser_LLOC
#define YY_ClntParser_LLOC yylloc
#endif
#ifndef YY_ClntParser_CHAR
#define YY_ClntParser_CHAR yychar
#endif
#ifndef YY_ClntParser_NERRS
#define YY_ClntParser_NERRS yynerrs
#endif
#ifndef YY_ClntParser_DEBUG_FLAG
#define YY_ClntParser_DEBUG_FLAG yydebug
#endif
#ifndef YY_ClntParser_ERROR
#define YY_ClntParser_ERROR yyerror
#endif
#ifndef YY_ClntParser_PARSE_PARAM
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
#define YY_ClntParser_PARSE_PARAM
#ifndef YY_ClntParser_PARSE_PARAM_DEF
#define YY_ClntParser_PARSE_PARAM_DEF
#endif
#endif
#endif
#endif
#ifndef YY_ClntParser_PARSE_PARAM
#define YY_ClntParser_PARSE_PARAM void
#endif
#endif
/* TOKEN C */
#ifndef YY_USE_CLASS
#ifndef YY_ClntParser_PURE
#ifndef yylval
extern YY_ClntParser_STYPE YY_ClntParser_LVAL;
#else
#if yylval != YY_ClntParser_LVAL
extern YY_ClntParser_STYPE YY_ClntParser_LVAL;
#else
#warning "Namespace conflict, disabling some functionality (bison++ only)"
#endif
#endif
#endif
#line 169 "../bison++/bison.h"
#define T1_ 258
#define T2_ 259
#define PREF_TIME_ 260
#define DNS_SERVER_ 261
#define VALID_TIME_ 262
#define UNICAST_ 263
#define NTP_SERVER_ 264
#define DOMAIN_ 265
#define TIME_ZONE_ 266
#define SIP_SERVER_ 267
#define SIP_DOMAIN_ 268
#define NIS_SERVER_ 269
#define NISP_SERVER_ 270
#define NIS_DOMAIN_ 271
#define NISP_DOMAIN_ 272
#define FQDN_ 273
#define FQDN_S_ 274
#define DDNS_PROTOCOL_ 275
#define DDNS_TIMEOUT_ 276
#define LIFETIME_ 277
#define VENDOR_SPEC_ 278
#define IFACE_ 279
#define NO_CONFIG_ 280
#define REJECT_SERVERS_ 281
#define PREFERRED_SERVERS_ 282
#define IA_ 283
#define TA_ 284
#define IAID_ 285
#define ADDRESS_KEYWORD_ 286
#define NAME_ 287
#define IPV6ADDR_ 288
#define WORKDIR_ 289
#define RAPID_COMMIT_ 290
#define OPTION_ 291
#define SCRIPT_ 292
#define LOGNAME_ 293
#define LOGLEVEL_ 294
#define LOGMODE_ 295
#define LOGCOLORS_ 296
#define STRING_ 297
#define HEXNUMBER_ 298
#define INTNUMBER_ 299
#define DUID_ 300
#define STRICT_RFC_NO_ROUTING_ 301
#define SKIP_CONFIRM_ 302
#define OBEY_RA_BITS_ 303
#define PD_ 304
#define PREFIX_ 305
#define DOWNLINK_PREFIX_IFACES_ 306
#define DUID_TYPE_ 307
#define DUID_TYPE_LLT_ 308
#define DUID_TYPE_LL_ 309
#define DUID_TYPE_EN_ 310
#define AUTH_METHODS_ 311
#define AUTH_PROTOCOL_ 312
#define AUTH_ALGORITHM_ 313
#define AUTH_REPLAY_ 314
#define AUTH_REALM_ 315
#define DIGEST_NONE_ 316
#define DIGEST_PLAIN_ 317
#define DIGEST_HMAC_MD5_ 318
#define DIGEST_HMAC_SHA1_ 319
#define DIGEST_HMAC_SHA224_ 320
#define DIGEST_HMAC_SHA256_ 321
#define DIGEST_HMAC_SHA384_ 322
#define DIGEST_HMAC_SHA512_ 323
#define STATELESS_ 324
#define ANON_INF_REQUEST_ 325
#define INSIST_MODE_ 326
#define INACTIVE_MODE_ 327
#define EXPERIMENTAL_ 328
#define ADDR_PARAMS_ 329
#define REMOTE_AUTOCONF_ 330
#define AFTR_ 331
#define ROUTING_ 332
#define BIND_TO_ADDR_ 333
#define ADDRESS_LIST_KEYWORD_ 334
#define STRING_KEYWORD_ 335
#define DUID_KEYWORD_ 336
#define HEX_KEYWORD_ 337
#define RECONFIGURE_ 338
#line 169 "../bison++/bison.h"
/* #defines token */
/* after #define tokens, before const tokens S5*/
#else
#ifndef YY_ClntParser_CLASS
#define YY_ClntParser_CLASS ClntParser
#endif
#ifndef YY_ClntParser_INHERIT
#define YY_ClntParser_INHERIT
#endif
#ifndef YY_ClntParser_MEMBERS
#define YY_ClntParser_MEMBERS
#endif
#ifndef YY_ClntParser_LEX_BODY
#define YY_ClntParser_LEX_BODY
#endif
#ifndef YY_ClntParser_ERROR_BODY
#define YY_ClntParser_ERROR_BODY
#endif
#ifndef YY_ClntParser_CONSTRUCTOR_PARAM
#define YY_ClntParser_CONSTRUCTOR_PARAM
#endif
/* choose between enum and const */
#ifndef YY_ClntParser_USE_CONST_TOKEN
#define YY_ClntParser_USE_CONST_TOKEN 0
/* yes enum is more compatible with flex, */
/* so by default we use it */
#endif
#if YY_ClntParser_USE_CONST_TOKEN != 0
#ifndef YY_ClntParser_ENUM_TOKEN
#define YY_ClntParser_ENUM_TOKEN yy_ClntParser_enum_token
#endif
#endif
class YY_ClntParser_CLASS YY_ClntParser_INHERIT
{
public:
#if YY_ClntParser_USE_CONST_TOKEN != 0
/* static const int token ... */
#line 212 "../bison++/bison.h"
static const int T1_;
static const int T2_;
static const int PREF_TIME_;
static const int DNS_SERVER_;
static const int VALID_TIME_;
static const int UNICAST_;
static const int NTP_SERVER_;
static const int DOMAIN_;
static const int TIME_ZONE_;
static const int SIP_SERVER_;
static const int SIP_DOMAIN_;
static const int NIS_SERVER_;
static const int NISP_SERVER_;
static const int NIS_DOMAIN_;
static const int NISP_DOMAIN_;
static const int FQDN_;
static const int FQDN_S_;
static const int DDNS_PROTOCOL_;
static const int DDNS_TIMEOUT_;
static const int LIFETIME_;
static const int VENDOR_SPEC_;
static const int IFACE_;
static const int NO_CONFIG_;
static const int REJECT_SERVERS_;
static const int PREFERRED_SERVERS_;
static const int IA_;
static const int TA_;
static const int IAID_;
static const int ADDRESS_KEYWORD_;
static const int NAME_;
static const int IPV6ADDR_;
static const int WORKDIR_;
static const int RAPID_COMMIT_;
static const int OPTION_;
static const int SCRIPT_;
static const int LOGNAME_;
static const int LOGLEVEL_;
static const int LOGMODE_;
static const int LOGCOLORS_;
static const int STRING_;
static const int HEXNUMBER_;
static const int INTNUMBER_;
static const int DUID_;
static const int STRICT_RFC_NO_ROUTING_;
static const int SKIP_CONFIRM_;
static const int OBEY_RA_BITS_;
static const int PD_;
static const int PREFIX_;
static const int DOWNLINK_PREFIX_IFACES_;
static const int DUID_TYPE_;
static const int DUID_TYPE_LLT_;
static const int DUID_TYPE_LL_;
static const int DUID_TYPE_EN_;
static const int AUTH_METHODS_;
static const int AUTH_PROTOCOL_;
static const int AUTH_ALGORITHM_;
static const int AUTH_REPLAY_;
static const int AUTH_REALM_;
static const int DIGEST_NONE_;
static const int DIGEST_PLAIN_;
static const int DIGEST_HMAC_MD5_;
static const int DIGEST_HMAC_SHA1_;
static const int DIGEST_HMAC_SHA224_;
static const int DIGEST_HMAC_SHA256_;
static const int DIGEST_HMAC_SHA384_;
static const int DIGEST_HMAC_SHA512_;
static const int STATELESS_;
static const int ANON_INF_REQUEST_;
static const int INSIST_MODE_;
static const int INACTIVE_MODE_;
static const int EXPERIMENTAL_;
static const int ADDR_PARAMS_;
static const int REMOTE_AUTOCONF_;
static const int AFTR_;
static const int ROUTING_;
static const int BIND_TO_ADDR_;
static const int ADDRESS_LIST_KEYWORD_;
static const int STRING_KEYWORD_;
static const int DUID_KEYWORD_;
static const int HEX_KEYWORD_;
static const int RECONFIGURE_;
#line 212 "../bison++/bison.h"
/* decl const */
#else
enum YY_ClntParser_ENUM_TOKEN { YY_ClntParser_NULL_TOKEN=0
#line 215 "../bison++/bison.h"
,T1_=258
,T2_=259
,PREF_TIME_=260
,DNS_SERVER_=261
,VALID_TIME_=262
,UNICAST_=263
,NTP_SERVER_=264
,DOMAIN_=265
,TIME_ZONE_=266
,SIP_SERVER_=267
,SIP_DOMAIN_=268
,NIS_SERVER_=269
,NISP_SERVER_=270
,NIS_DOMAIN_=271
,NISP_DOMAIN_=272
,FQDN_=273
,FQDN_S_=274
,DDNS_PROTOCOL_=275
,DDNS_TIMEOUT_=276
,LIFETIME_=277
,VENDOR_SPEC_=278
,IFACE_=279
,NO_CONFIG_=280
,REJECT_SERVERS_=281
,PREFERRED_SERVERS_=282
,IA_=283
,TA_=284
,IAID_=285
,ADDRESS_KEYWORD_=286
,NAME_=287
,IPV6ADDR_=288
,WORKDIR_=289
,RAPID_COMMIT_=290
,OPTION_=291
,SCRIPT_=292
,LOGNAME_=293
,LOGLEVEL_=294
,LOGMODE_=295
,LOGCOLORS_=296
,STRING_=297
,HEXNUMBER_=298
,INTNUMBER_=299
,DUID_=300
,STRICT_RFC_NO_ROUTING_=301
,SKIP_CONFIRM_=302
,OBEY_RA_BITS_=303
,PD_=304
,PREFIX_=305
,DOWNLINK_PREFIX_IFACES_=306
,DUID_TYPE_=307
,DUID_TYPE_LLT_=308
,DUID_TYPE_LL_=309
,DUID_TYPE_EN_=310
,AUTH_METHODS_=311
,AUTH_PROTOCOL_=312
,AUTH_ALGORITHM_=313
,AUTH_REPLAY_=314
,AUTH_REALM_=315
,DIGEST_NONE_=316
,DIGEST_PLAIN_=317
,DIGEST_HMAC_MD5_=318
,DIGEST_HMAC_SHA1_=319
,DIGEST_HMAC_SHA224_=320
,DIGEST_HMAC_SHA256_=321
,DIGEST_HMAC_SHA384_=322
,DIGEST_HMAC_SHA512_=323
,STATELESS_=324
,ANON_INF_REQUEST_=325
,INSIST_MODE_=326
,INACTIVE_MODE_=327
,EXPERIMENTAL_=328
,ADDR_PARAMS_=329
,REMOTE_AUTOCONF_=330
,AFTR_=331
,ROUTING_=332
,BIND_TO_ADDR_=333
,ADDRESS_LIST_KEYWORD_=334
,STRING_KEYWORD_=335
,DUID_KEYWORD_=336
,HEX_KEYWORD_=337
,RECONFIGURE_=338
#line 215 "../bison++/bison.h"
/* enum token */
}; /* end of enum declaration */
#endif
public:
int YY_ClntParser_PARSE(YY_ClntParser_PARSE_PARAM);
virtual void YY_ClntParser_ERROR(char *msg) YY_ClntParser_ERROR_BODY;
#ifdef YY_ClntParser_PURE
#ifdef YY_ClntParser_LSP_NEEDED
virtual int YY_ClntParser_LEX(YY_ClntParser_STYPE *YY_ClntParser_LVAL,YY_ClntParser_LTYPE *YY_ClntParser_LLOC) YY_ClntParser_LEX_BODY;
#else
virtual int YY_ClntParser_LEX(YY_ClntParser_STYPE *YY_ClntParser_LVAL) YY_ClntParser_LEX_BODY;
#endif
#else
virtual int YY_ClntParser_LEX() YY_ClntParser_LEX_BODY;
YY_ClntParser_STYPE YY_ClntParser_LVAL;
#ifdef YY_ClntParser_LSP_NEEDED
YY_ClntParser_LTYPE YY_ClntParser_LLOC;
#endif
int YY_ClntParser_NERRS;
int YY_ClntParser_CHAR;
#endif
#if YY_ClntParser_DEBUG != 0
public:
int YY_ClntParser_DEBUG_FLAG; /* nonzero means print parse trace */
#endif
public:
YY_ClntParser_CLASS(YY_ClntParser_CONSTRUCTOR_PARAM);
public:
YY_ClntParser_MEMBERS
};
/* other declare folow */
#endif
#if YY_ClntParser_COMPATIBILITY != 0
/* backward compatibility */
/* Removed due to bison problems
/#ifndef YYSTYPE
/ #define YYSTYPE YY_ClntParser_STYPE
/#endif*/
#ifndef YYLTYPE
#define YYLTYPE YY_ClntParser_LTYPE
#endif
#ifndef YYDEBUG
#ifdef YY_ClntParser_DEBUG
#define YYDEBUG YY_ClntParser_DEBUG
#endif
#endif
#endif
/* END */
#line 267 "../bison++/bison.h"
#endif
|