Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
7acb08d8
Commit
7acb08d8
authored
Nov 15, 2016
by
Tomek Mrugalski
🛰
Browse files
[5014] dhcp6.dox cleanup
parent
09aa7a35
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp6/dhcp6.dox
View file @
7acb08d8
...
@@ -97,23 +97,25 @@ To solve those issues a two phase approach was proposed:
...
@@ -97,23 +97,25 @@ To solve those issues a two phase approach was proposed:
PHASE 1: replace isc::data::fromJSON with bison-based parser. This will allow
PHASE 1: replace isc::data::fromJSON with bison-based parser. This will allow
to have a single file that defines the actual syntax, much better syntax
to have a single file that defines the actual syntax, much better syntax
checking, and provide more flexibility, like various comment types and
checking, and provide more flexibility, like various comment types and
file inclusions. As a result, the parser still returns JSON structures,
file inclusions. As a result, the parser still returns JSON structures that
but those are guaranteed to be correct from the grammar perspective.
are guaranteed to be correct from the grammar perspective. Sticking with
the JSON structures also allows us to continue using existing parsers.
Furthermore, it is possible to implement default values at this level
Furthermore, it is possible to implement default values at this level
as simply inserting extra JSON structures in places that are necessary.
as simply inserting extra JSON structures in places that are necessary.
PHASE 2: simplify existing parsers by getting rid of the build/commit split.
PHASE 2: simplify existing parsers by getting rid of the build/commit split.
Get rid of the inheritance contexts. Essentially the parser should
Get rid of the inheritance contexts. Essentially the parser should
take JSON structure as a parameter and return the configuration structure
take JSON structure as a parameter and return the configuration structure
.
For example, for options this should essentially look like this:
For example, for options this should essentially look like this:
@code
@code
CfgOptionPtr parse(ConstElementPtr options)
CfgOptionPtr parse(ConstElementPtr options)
@endcode
@endcode
The whole complexity behind inheriting parsers should be removed
The whole complexity behind inheriting contexts should be removed
and implemented in the parser. It should return extra JSON elements.
from the existing parsers and implemented in the bison parser.
The details are TBD, but there is one example for setting up an
It should return extra JSON elements. The details are TBD, but there is
renew-timer value on the subnet level that is ihnerited from the
one example for setting up an renew-timer value on the subnet level that
global ("Dhcp6") level. This phase is still a bit loosely defined.
is ihnerited from the global ("Dhcp6") level. This phase is still a bit
loosely defined.
There is now a fully working prototype for phase 1. It introduces bison
There is now a fully working prototype for phase 1. It introduces bison
based parser. It is essentially defined in two files: dhcp6_lexer.ll,
based parser. It is essentially defined in two files: dhcp6_lexer.ll,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment