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