26 Commits

Author SHA1 Message Date
Miek Gieben
31b2aec24e Parse differently
Returned each parsed RR on a channel and let the caller decide what
to do with it.

Ragel is still broken, so this is non tested code.
2011-09-02 13:44:35 +02:00
Miek Gieben
be10e40045 Fix Pop()
Need to check which of the rrs, rrsigs of nxt is actually filled
with the data and pop that.
2011-07-29 13:16:27 +02:00
Miek Gieben
33fbece4ca Add txt and fixup ds, ta and dlv 2011-07-29 12:18:20 +02:00
Miek Gieben
caa1502c1e Add much more complex zone structure
A zone is stored in a
map[string]map[int]*ZRRset

where string is the qname and int (in the second map) is
qclass * <large number> + qtype, thereby making it unique.

ZRRset holds:
    RRs     RRset
    RRsigs  RRset
    Nsec    RR
    Nsec3   RR
    Glue    bool

Which holds the RRset for the zone contents. This is grouped
together for DNSSEC purposes, but also helps in non-DNSSEC zones.
(There is of course a increase in memory usage).
2011-07-28 22:47:55 +02:00
Miek Gieben
96ddebf335 add miek.nl.signed as a test zone
Add support for more RRs - I can now parse my own zone
2011-07-24 22:21:48 +02:00
Miek Gieben
fc2516e3f4 Error handling for DNSKEY 2011-07-24 22:01:10 +02:00
Miek Gieben
282feff62e add NSEC3PARAM 2011-07-24 21:40:04 +02:00
Miek Gieben
00f8254ae1 Fix parsing of RRSIGs 2011-07-24 21:29:16 +02:00
Miek Gieben
c52f05f9f5 More error checking 2011-07-24 17:32:41 +02:00
Miek Gieben
4671072027 Error handling
Handle semantic errors in the input stream.
Try to use Ragel's error handling when seeing a non-supported
class. This does not work yet.
2011-07-24 17:08:33 +02:00
Miek Gieben
9b1e7b4b3d documentation
make Str_rr and Str_class private, prolly only needed
for parsing
2011-07-23 23:15:40 +02:00
Miek Gieben
0dcfa0b427 Kill SetString
Create a NewRR that creates a new RR from a string.
FIx the tests to relfect this
2011-07-23 22:26:50 +02:00
Miek Gieben
b03994e257 NSEC and NSEC3 parsing support
Needs some work, but it is working
2011-07-22 20:23:36 +02:00
Miek Gieben
fa6e603134 add ds/dnskey/rrsig and fix 1-line comments 2011-07-22 17:29:56 +02:00
Miek Gieben
6b53a030c2 Some tweaks and a clear view on the todo 2011-07-22 12:31:39 +02:00
Miek Gieben
e87fb8209f FINALLY looks like something thats is fast and simple 2011-07-22 12:26:31 +02:00
Miek Gieben
20c3d2cdc6 this one can go 2011-07-21 14:32:13 +02:00
Miek Gieben
5fe15bc754 gone 2011-07-21 14:31:48 +02:00
Miek Gieben
e863e86e65 This works, but is too slow 2011-07-21 12:31:47 +02:00
Miek Gieben
b13a2d6ad9 less type assertions
From cznic:
Let me suggest something like:

x := rr.(*RR_SOA)
x.Hdr = *hdr
x.Ns = tok.T[0]
...

to avoid repeated type assertion - unnecessary for the still same 'rr'.
2011-07-19 13:48:32 +02:00
Miek Gieben
e1bd7db73b More parsing tweaks 2011-07-18 16:06:06 +02:00
Miek Gieben
91b41d02bb SetString for DNSKEY and RRSIG 2011-07-18 15:49:20 +02:00
Miek Gieben
8c595abe56 More parsing stuff 2011-07-17 15:47:03 +02:00
Miek Gieben
981f1853bc First stab at parsing .priv key files with Ragel 2011-07-15 13:40:58 +02:00
Miek Gieben
f759f6f8d9 Add DNSSEC parsing 2011-07-14 23:55:06 +02:00
Miek Gieben
6c4045c3a0 A add bunch of rr for parsing 2011-07-14 23:12:43 +02:00