Commit Graph

60 Commits

Author SHA1 Message Date
Miek Gieben 131f6962d1 gofmt 2011-12-09 21:45:57 +01:00
Miek Gieben e115e5da6e Update to the latest weekly: weekly/weekly.2011-12-06
The new time API must still be used. But for now it compiles.
All DNSSEC/TSIG timing is probably broken
2011-12-09 11:16:49 +01:00
Miek Gieben 22a467e718 Fixes the latest weekly 2011-11-02 23:06:54 +01:00
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 2d9e619c01 Upgrade to r59 of Go this means parsing is broken now
Ragel does not support newer versions of Go. But I do want to
upgrade to them. So parsing from strings has been disabled and
will be re-enabled when Ragel 7 is out
2011-08-02 09:06:15 +02:00
Miek Gieben e162e9bfb1 Use *Zone instead of Zone 2011-07-29 21:37:58 +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 eb3a40f5aa kill atoi and just use the strconv.Atoui directly 2011-07-29 12:18:49 +02:00
Miek Gieben 33fbece4ca Add txt and fixup ds, ta and dlv 2011-07-29 12:18:20 +02:00
Miek Gieben 5df752fef7 Smaller tweaks 2011-07-28 23:39:31 +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 f38060d359 Use smaller buffer again 2011-07-24 13:54:34 +02:00
Miek Gieben da0603089a gofmt -w 2011-07-23 23:43:43 +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 92291b1575 Documentation and some small tweaks 2011-07-23 08:59:58 +02:00
Miek Gieben 3eae3d90e7 Small optimizations, down to 1.29s for 50K RRs 2011-07-22 23:57:56 +02:00
Miek Gieben a1a0034733 More Go like
Make a Parser type and define methods on that.
* Zone()    parse and return entire zone
* RR()      parse and return 1 RR
* PrivateKey parse a private key file
2011-07-22 23:51:30 +02:00
Miek Gieben 2a8d7f9694 Make the API more Go like 2011-07-22 23:28:04 +02:00
Miek Gieben db5b40c000 Reset _IOBUF 2011-07-22 22:16:56 +02:00
Miek Gieben c2a89d3184 Tweaks for parsing 2011-07-22 22:06:07 +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 412a3a3f3e update readme 2011-07-22 19:39:36 +02:00
Miek Gieben d574e43c00 Do more setstring work 2011-07-22 19:23:06 +02:00
Miek Gieben cfba61fdf9 Move around some debugging code 2011-07-22 18:50:47 +02:00
Miek Gieben fa6e603134 add ds/dnskey/rrsig and fix 1-line comments 2011-07-22 17:29:56 +02:00
Miek Gieben 725fb45591 Parse the test zone from Jan Mercl 2011-07-22 12:49:03 +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 108e795378 Some tweaks; not sure if this is the way forward 2011-07-21 16:43:18 +02:00
Miek Gieben dcbd332a69 Put back in support for DNSSEC records 2011-07-21 14:50:47 +02:00
Miek Gieben 021d0e8842 smaller stuff 2011-07-21 14:35:20 +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 802b8cd9c9 This parses - now make it quick 2011-07-20 21:19:40 +02:00
Miek Gieben 125cc44dca add generated code too 2011-07-19 18:40:27 +02:00
Miek Gieben c8975950bd Peeked some parser stuff from gdnsd 2011-07-19 17:49:51 +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 7c716e66c0 Parsing zone files - does not work (yet) 2011-07-18 20:47:03 +02:00
Miek Gieben e50100848c Fix parsing of AAAA records 2011-07-18 17:40:55 +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 2eecc66477 SetString() for a bunch of RR - to be extended 2011-07-18 15:19:47 +02:00
Miek Gieben fd0064c805 Parsings works - clean up the tests
RR_DNSKEY has now a
* Read (to read an RR)
* ReadPrivateKey (to read an private key file)

Together you have enough data to sign and verify DNSSEC data.
I'm thinking about a better API, but I think one will emerge
whenever I complete the zone parsin.
2011-07-17 20:51:27 +02:00