Commit Graph

100 Commits

Author SHA1 Message Date
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