Commit Graph

116 Commits

Author SHA1 Message Date
Miek Gieben 0aa3021a83 Remove all copyright notices
Use the central COPYRIGHT file.
2014-09-11 20:57:37 +01:00
Miek Gieben 9b0cfb5a13 Dont mirror CD bit 2014-08-07 22:29:44 +01:00
Miek Gieben 22f120cfe8 Copy CD bit too 2014-08-05 21:17:24 +01:00
Miek Gieben 17c7921aa2 Documentation updates 2014-07-31 08:48:26 +00:00
Miek Gieben 060e66250e Add IsMsg()
A quick validating function that checks if a buffer is a valid
DNS message.
The code is *far* from complete.
2014-05-18 09:02:00 +01:00
Miek Gieben b7a8c14d7d Add dns.Name as a type
This can be used for printing names.
2014-04-23 21:06:17 +01:00
Miek Gieben 37356f5e68 Documenation fixes 2014-01-12 10:43:59 +00:00
Alex Ciuba 848a6c7268 Refactor SetRcode, rd bit is now set properly for error packets 2014-01-05 15:20:41 -05:00
Miek Gieben b435d836c6 gofmt 2013-10-15 14:21:47 +00:00
Miek Gieben 79cce8e6c8 Small go vet issues 2013-10-15 14:21:32 +00:00
Miek Gieben 9c1ee5d5ca Update IsDomainName
This new functions just compiles the domain to wire format, if that
works, the name is deemed OK. It is also much less strict than the
older code. Almost everything is allowed in the name, except two
dots back to back (there is an explicit test for that).
2013-09-10 18:09:22 +00:00
Miek Gieben 9c72d3aa52 Fix docs 2013-09-10 13:21:55 +00:00
Miek Gieben 47cc5b052d Work on making IsDomainName better 2013-09-10 13:13:10 +00:00
Miek Gieben db41985b91 copy the optimization from go tip into here 2013-08-23 18:41:35 +00:00
Miek Gieben 83a2c0b789 small tweaks 2013-06-23 21:41:49 +01:00
Miek Gieben e15a4b1508 Dont downcase when doing IsSubDomain, let the caller decide 2013-06-22 09:26:20 +01:00
Miek Gieben 38ea608d79 Rename the Label* functions
SplitLabels -> SplitDomainName
CompareLabels -> CompareDomainName
LenLabels -> CountLabel
          -> NextLabel was added as a simple iterator-like function
2013-06-22 07:21:15 +00:00
Miek Gieben 5f6228d4cc Use the non-exported version err 2013-06-20 07:27:28 +01:00
Miek Gieben 70f9c6b964 Make err non-exported 2013-06-20 07:25:29 +01:00
fdeweerdt 6de33f30fe Fix 1.1.1 missing return error 2013-06-18 10:38:14 -07:00
Miek Gieben d171a352d9 Small fix for go < 1.1 versions 2013-06-15 18:27:52 +01:00
Miek Gieben 6ee0baab56 anything escaped in domain name is legal
Allow all character after a \ in a domainname. It's escaped, it's
legal.
2013-06-13 19:41:37 +01:00
Miek Gieben b35306b755 Created two new types: Type and Class
Actually just go with Robert's suggestion as this seems the
cleanest way to do it. Also saves me from thinking about could
names for the new functions.
2013-06-08 14:09:37 +01:00
Miek Gieben c72535f2d6 Add TypeToTypeString and ClassToClassString
After some discussion with Robert Edmonds, these helper functions
seems in order. It is not what he requested (that was an RRType
and RRClass as new types), but is does make sense to add some
convience functions to save some typing. The dns package itself
also used these function (4 times). So clearly there is a need.

I'm not completely sold about the names.
2013-06-08 13:59:49 +01:00
Miek Gieben e8e8e84200 remove println 2013-06-05 22:33:15 +01:00
Miek Gieben f6c697f52b Fix IsDomainName
Make \.. legal (as it should be) and don't allocate a new var byte c
and every loop.
2013-06-05 22:06:02 +01:00
Miek Gieben 81941d4422 Update all copyright notices 2013-05-12 16:15:52 +02:00
Miek Gieben d53d9eab81 gofmt 2013-05-05 20:30:44 +02:00
Miek Gieben 235e892dfc Rename the RR types drop the RR_ prefix
This is also done in the official Go library. It also make the
code shorter.
2012-12-09 19:23:25 +01:00
Miek Gieben d758825590 more documentation 2012-12-02 10:14:53 +01:00
Miek Gieben d618b07666 documentation 2012-12-02 09:15:10 +01:00
Miek Gieben fa55001b4c Add tests and fix bug in the parser
torc wasn't set in some part resulting in parsing a 'A' while
in fact the parsed record type should have been returned.
2012-11-22 11:54:46 +01:00
Miek Gieben ac39024a25 gofmt 2012-11-21 23:20:56 +01:00
Miek Gieben aba66ed110 beter 2012-11-21 16:27:36 +01:00
Miek Gieben 37d3009cec Add escaped @ is ok 2012-11-21 15:59:00 +01:00
Miek Gieben 0351cc0ded Merge branch 'master' of github.com:miekg/dns 2012-09-07 20:38:30 +02:00
Miek Gieben cacd7c4dcd fix merge 2012-09-07 20:37:45 +02:00
Miek Gieben 09e07339e6 struct embedding 2012-09-05 16:31:13 +02:00
Miek Gieben a2d98be202 lowercase the names 2012-09-04 20:08:55 +02:00
Miek Gieben 07c4f74d85 don't assume there is a question section
closes #24
2012-09-03 07:40:16 +02:00
Miek Gieben eaaef0af9d Merge branch 'master' of github.com:miekg/dns 2012-08-25 22:08:22 +02:00
Miek Gieben 68961f2f5b Make the IsTsig and IsEdn0 more usefull by returning the record 2012-08-25 11:24:01 +02:00
Miek Gieben d6238e8649 do I really need all those function -- no 2012-08-25 10:01:54 +02:00
Miek Gieben 9abebc170f Dont set the auth bit 2012-08-25 09:59:49 +02:00
Miek Gieben 6f7aad15d8 documenation 2012-08-21 17:36:58 +02:00
Miek Gieben b720003623 make api smaller 2012-08-17 08:31:38 +02:00
Miek Gieben 1dffbeeee1 Fix IsSubDomain 2012-08-08 15:16:22 +02:00
Miek Gieben 5e5d1228a0 Return the msg you work on in the Set* methods 2012-08-07 08:09:30 +02:00
Miek Gieben 963fb55991 Fix some faults 2012-08-04 14:16:29 -07:00
Miek Gieben af2f485c8e Fix IsSubDomain 2012-07-16 19:16:36 +02:00