Miek Gieben
9c67491aee
cleanup and extra test
2012-05-20 15:31:35 +02:00
Miek Gieben
7a3af5b729
Support $GENERATE (the bind extension).
...
It is even better than the bind one, because all records are
supported (as long as the output is valid)
2012-05-20 15:28:27 +02:00
Miek Gieben
95c1154930
documentation
2012-05-08 14:17:17 +02:00
Miek Gieben
52d391e251
Add more documentation
2012-05-03 09:05:30 +02:00
Miek Gieben
7562c68094
documentation updates
2012-05-03 08:53:38 +02:00
Miek Gieben
79ea0f8e31
Fix LOC parsing
2012-05-01 22:21:44 +02:00
Miek Gieben
d85d8f9fe9
Start adding LOC tests
2012-04-30 21:42:58 +02:00
Miek Gieben
b50e3f690e
First chunk in parsing LOC RRs
2012-04-30 16:54:02 +02:00
Miek Gieben
0940f549bf
Skeleton function for parsing LOC records
2012-04-30 16:01:07 +02:00
Miek Gieben
7f78754c1d
Some tweaks about errors
2012-04-18 14:06:10 +02:00
Miek Gieben
49f41fb17b
Install example right away
2012-03-04 10:41:16 +01:00
Miek Gieben
df6d86e937
Fix for when not seeing an RR at all
2012-03-03 17:40:30 +01:00
Miek Gieben
c7d38a11f1
Prefix with dns: here too
2012-02-29 21:15:58 +01:00
Miek Gieben
aed704524c
Make the parsing even faster 100K RR/s
2012-02-27 21:12:04 +01:00
Miek Gieben
0c0b97f72b
Parsing fix for lines starting with class or TTL
...
name. IN SOA a6.nstld.com. hostmaster.nic.name ....
IN 7200 NS j6.nstld.com.
7200 IN NS k6.nstld.com.
Wasn't handled properly
2012-02-27 18:48:53 +01:00
Miek Gieben
3b089b94fc
slightly faster parsing
2012-02-23 20:13:37 +01:00
Miek Gieben
f9d3068eb9
Parsing speed increase of facter 2/3
...
Implemented my own little tokenizer in scanner.go. I only use the
stuff I need.
2012-02-21 22:41:00 +01:00
Miek Gieben
fee04d5ef9
Small tweaks to make it faster
2012-02-19 20:51:04 +01:00
Miek Gieben
c15712dbf6
remove unneed byte()
2012-02-19 19:57:01 +01:00
Miek Gieben
88a0052d1d
Fix newline/space handling and braces
...
( dsjkdjk
djsdjk
)
( dkjsdjsd
djskdjsd
)
Are two different strings, the above contains NO spaces, the bottom
one does. This doesn't matter anywhere, except in HIP record, which
say some data may not contain spaces.
2012-02-19 12:04:27 +01:00
Miek Gieben
c2e99e8b41
Get started for the LOC record
2012-02-18 19:24:53 +01:00
Miek Gieben
ef709d6e77
remove empty line
2012-02-15 23:08:21 +01:00
Miek Gieben
4f118afe8c
Error start wth a lowercase
2012-02-15 23:04:46 +01:00
Miek Gieben
73c743feb2
Compile error
2012-02-15 21:55:34 +01:00
Miek Gieben
596e0618a7
Update the documentation
2012-02-15 12:50:23 +01:00
Miek Gieben
ef524d882a
Add features to soa parsing
2012-02-15 09:04:09 +01:00
Miek Gieben
697d67ea96
Fix origin handling and fix lines which start with ownernames
...
Zonefile handling is more robust and more up to the specs.
Also added a new zone file which has some nice properties
which trigger corner cases.
2012-02-15 08:47:31 +01:00
Miek Gieben
0a79fd28e0
nicer
2012-02-14 16:15:44 +01:00
Miek Gieben
63d8b1feb1
Implement TTLs in words
...
1H, 1M, 1W2D, etc. should now be parsed in TTLs
2012-02-14 15:14:54 +01:00
Miek Gieben
b3a58abd24
discard \r when reading zonefile
2012-02-14 14:05:33 +01:00
Miek Gieben
35bd7ac4f4
Slightly shorter
2012-02-14 13:57:12 +01:00
Miek Gieben
7ef88cf5b3
Add support for @
...
For this to work ParseZone was extended to accept a starting
origin. This way even zonefiles without $ORIGIN would work
as expected. This is an api change.
2012-02-14 13:46:40 +01:00
Miek Gieben
b49e4f2411
Allow @ to be recognized as zone origin
2012-02-14 13:23:09 +01:00
Miek Gieben
d10b0f731e
We indeed need a larger buffer
2012-02-13 21:57:22 +01:00
Miek Gieben
5dbfc48a5e
start fixing for unknown rrs parsing/printing
2012-02-13 21:12:14 +01:00
Miek Gieben
b888c94542
Update defttl as we go
2012-02-13 19:26:44 +01:00
Miek Gieben
fece54374d
Support comments after $DIRECTIVEs
...
Just read until the end of the line after the first string.
2012-02-13 19:14:11 +01:00
Miek Gieben
c9da0472de
Update the documentation
2012-02-13 17:52:53 +01:00
Miek Gieben
2f64868d3c
Add quotes to the parsing engine.
...
Support:
TXT
NAPTR
And other record that we may use.
2012-02-13 13:19:37 +01:00
Miek Gieben
42efa912b5
Almost there with parsing
2012-02-12 23:00:26 +01:00
Miek Gieben
a7b2a88e7a
Parsing TXT records now works OK
2012-02-12 22:24:18 +01:00
Miek Gieben
5a48b54327
added quotes as important chars in the parser
2012-02-12 19:06:32 +01:00
Miek Gieben
9c478ab6e4
Add the dot in the correct place
2012-02-12 12:36:26 +01:00
Miek Gieben
34a711372a
Fix the ORIGIN appending
2012-02-12 12:28:08 +01:00
Miek Gieben
a21f7c6b30
Documentation updates and parsing fixes
2012-02-12 11:45:44 +01:00
Miek Gieben
da440eb9f0
remove debugging
2012-02-05 11:35:58 +01:00
Miek Gieben
77b60231e7
If we add a dot to a name, be sure to remove one from the length
2012-02-05 11:33:55 +01:00
Miek Gieben
ed61734c89
Optimize the RR reading further
...
remove len(strings) from the code. 16% increase
in speed. Getting about 35K RR/s
2012-01-30 21:26:29 +01:00
Miek Gieben
09ac6c8dc5
gofmt
2012-01-28 00:35:37 +01:00
Miek Gieben
8b03f43ee7
try it with 512 bytes
2012-01-28 00:04:31 +01:00
Miek Gieben
06ab0a998a
Make parsing 50% faster by elminating allocation
...
* We now use a [1024]byte buffer to store the token
* Return an error when this is to small
2012-01-27 23:59:21 +01:00
Miek Gieben
74181dee8e
More tests
2012-01-22 20:44:52 +01:00
Miek Gieben
0211c1663d
Add ReadRR function
2012-01-22 20:20:30 +01:00
Miek Gieben
698660270a
better handle recursive includes
2012-01-21 23:46:53 +01:00
Miek Gieben
01cb137157
better handle recursive includes
2012-01-21 23:42:33 +01:00
Miek Gieben
add6f10462
support $INCLUDE
...
ParseZone now needs a filename to report the
correct file
2012-01-21 23:36:54 +01:00
Miek Gieben
9b48d4b899
gofmt
2012-01-12 22:49:26 +01:00
Miek Gieben
a3949750be
Somewhat nicer
2012-01-12 11:17:01 +01:00
Miek Gieben
ecfd5451a9
Remove the Labels() function.
...
This is now handled inside IsDomainName, which really parses
the name and then (also) returns the number of labels found.
2012-01-08 15:54:33 +01:00
Miek Gieben
0322d3a9da
Fix $ORIGIN in zonefiles
...
also check if a dname isn't fq, and add $ORIGIN is not.
2012-01-08 14:06:58 +01:00
Miek Gieben
822c8c66e2
Revert "partially working code"
...
This reverts commit fa0d78db9e
.
2012-01-05 13:24:35 +01:00
Miek Gieben
e2ecf8b80a
Revert "I can parse again"
...
This reverts commit 0d08da5d84
.
2012-01-05 13:24:27 +01:00
Miek Gieben
662ab3dac9
Revert "Use 64K buffer"
...
This reverts commit 041b8e196e
.
2012-01-05 13:24:20 +01:00
Miek Gieben
0877df185c
Revert "Use larger buffer to speed things up"
...
This reverts commit f999d52e7e
.
2012-01-05 13:24:11 +01:00
Miek Gieben
b1f8529bbb
Revert "meer"
...
This reverts commit 81e8dc0046
.
2012-01-05 13:24:02 +01:00
Miek Gieben
81e8dc0046
meer
2012-01-05 13:22:02 +01:00
Miek Gieben
f999d52e7e
Use larger buffer to speed things up
2012-01-05 10:42:15 +01:00
Miek Gieben
041b8e196e
Use 64K buffer
2012-01-05 08:44:36 +01:00
Miek Gieben
0d08da5d84
I can parse again
2012-01-04 22:30:40 +01:00
Miek Gieben
fa0d78db9e
partially working code
2012-01-04 21:31:11 +01:00
Miek Gieben
362e606bf2
Make ParseZone more go like
2011-12-19 19:20:55 +01:00
Miek Gieben
1bd1784403
Implement escaping
2011-12-18 19:59:01 +01:00
Miek Gieben
ec69d5aced
$ORIGIN
2011-12-18 19:34:20 +01:00
Miek Gieben
689bf97ed4
Send the last bits also
2011-12-18 18:15:09 +01:00
Miek Gieben
54c7e4d1a9
Implement $TTL
2011-12-18 17:58:06 +01:00
Miek Gieben
73012b7dd5
Fix braces and comments, esp for SOA records
2011-12-18 13:42:59 +01:00
Miek Gieben
a4ac06b8c3
Fix comments after RRs
...
zzzzz.miek.nl. 86400 IN RRSIG NSEC 8 3 86400 20110823011301
20110724011301 12051 miek.nl. lyRljEQFOmajcdo6bBI67DsTlQTGU3ag9vlE07u7ynqt9aYBXyE9mkasAK4V0oI32YGb2pOSB6RbbdHwUmSt+cYhOA49tl2t0Qoi3pH21dicJiupdZuyjfqUEqJlQoEhNXGtP/pRvWjNA4pQeOsOAoWq/BDcWCSQB9mh2LvUOH4= ; {keyid = sksak}
zzzzz.miek.nl. 86400 IN NSEC miek.nl. TXT RRSIG NSEC
Is now parsed correctly. This is incidently the format as echoed by
ldns.
2011-12-18 13:33:03 +01:00
Miek Gieben
aaacb0f105
More parsing stuff
2011-12-17 13:12:13 +01:00
Miek Gieben
487e600562
Fix parsing when RR ends in a brace
...
* Testcase added
2011-12-17 11:28:54 +01:00
Miek Gieben
a72df87858
Some typos
2011-12-16 19:42:23 +01:00
Miek Gieben
3500e0f4aa
Make Lex a private type: lex
2011-12-16 19:34:30 +01:00
Miek Gieben
ef7b6f525f
gofmt
2011-12-16 14:48:30 +01:00
Miek Gieben
c387c41767
Fix SOA parsing
2011-12-16 11:16:26 +01:00
Miek Gieben
4d5f6d66e2
More tweaks for parsing
2011-12-16 10:48:33 +01:00
Miek Gieben
a5baf52283
Make DEBUG private: _DEBUG
2011-12-16 10:30:42 +01:00
Miek Gieben
235dee6a0d
Fix the parse tests once more
2011-12-16 10:26:32 +01:00
Miek Gieben
06ae052c32
Implement returning errors from the scanner
2011-12-16 10:06:28 +01:00
Miek Gieben
35a1e137e2
More parsing fixes
2011-12-15 22:40:07 +01:00
Miek Gieben
f4329cce16
More parsing tweaks
2011-12-15 18:03:41 +01:00
Miek Gieben
081166db5e
Fix the tests (Again) + NewRR(str)
...
Parse tests start to get working again
NewRR reads a string and is the easiest way to get an RR
in your code.
2011-12-15 17:37:07 +01:00
Miek Gieben
643ee5f5f2
Add privatekey parser that does not use Ragel
2011-12-15 13:03:51 +01:00
Miek Gieben
94ec863ffc
Dont double quote text records
...
Text records are not correctly parsed if they have a comment
after them (don't ask)
2011-12-15 12:43:01 +01:00
Miek Gieben
82d825e798
Update the comments a little
2011-12-15 12:27:05 +01:00
Miek Gieben
fcc9821edd
Remove some debugging stuff
2011-12-15 11:33:28 +01:00
Miek Gieben
c920777b44
Parsing works
2011-12-15 11:22:54 +01:00
Miek Gieben
5ea0337909
More debugging
...
RR with CLASS TTL are not parsed correctly (yet)
2011-12-14 16:02:21 +01:00
Miek Gieben
824cb459fb
Parsing works
2011-12-14 15:37:36 +01:00
Miek Gieben
7c3a6087a5
Much better error handling
2011-12-14 14:35:45 +01:00
Miek Gieben
32a879d970
New parsing works, but a lot of stuff needs to be fixed:
...
* Parsing the different records
* Parsing private key files (trivial, but needs to be done)
2011-12-14 11:30:29 +01:00
Miek Gieben
978e9f9f36
Port over stuff from zparse.rl
2011-12-14 09:26:31 +01:00