Commit Graph

16 Commits

Author SHA1 Message Date
Miek Gieben 6ae3b9f061 Skip reflection for most types (#369)
Make the reflection types a black list (these types use (or should use)
the tag 'size-xxx' in their struct definition.s

HIP, IPSECKEY, NSEC3, TSIG

All other types don't use reflection anymore.

* Return a pointer to the header when there is no rdata, this restores old
  behavior. The rest of the conversion mostly hangs on getting size-hex
  right, but then packStruct and packStructValue and the unpack variant
  can be killed.
* Generate pack and unpack for all embedded types as well.
* Fix PrivateRRs, register an unpack function as well, when you register
  a new PrivateRR.
* Add the tag octet, nsec, []domains and more  to msg_helper.go
2016-06-12 16:09:37 +01:00
Miek Gieben 907a4aef57 Generate pack/unpack for all RRs (#360)
Add dns:txt parsing helper to prevent compile errors. This allows
us to generate all unpack/pack function.

Add pack to the RR interface definition and add this method to
PrivateRR.

We still use typeToUnpack to select which types don't use reflection.
2016-06-05 07:53:12 +01:00
Filippo Valsorda 023972bb19 Expose TypeToRR 2015-10-16 23:36:49 +01:00
Miek Gieben 79547a0341 Add Dedup function
Add function that dedups a list of RRs. Work on strings, which
adds garbage, but seems to be the least intrusive and takes the
last amount of memory.

Some fmt changes snook in as well.
2015-08-24 22:02:57 +01:00
Miek Gieben 9bf52083d1 golint fixes 2015-08-23 08:03:13 +01:00
Miek Gieben 64fea017a2 Move all docs to docs.go
Another golint change.
2015-02-19 13:47:50 +00:00
Miek Gieben b02ae55fbe golint changes, lose the underscores 2015-02-19 10:45:59 +00:00
Alex Sergeyev aaf867499e Attempting to fix #133
- Trying to get as close to original state as possible
- Since private RR should not run slurp, toggling Variable there.
2014-09-23 21:59:09 -04:00
Miek Gieben 45e66bfe1d Rename ParseTextSlice to Parse.
Shorter.
2014-09-21 19:09:13 +01:00
Miek Gieben 45f3dc89e4 Rename CopyRdata to just Copy.
Still not sure if this makes things more clear.
2014-09-21 18:30:16 +01:00
Miek Gieben 685f708a9e Rename RdataLen to just Len 2014-09-21 18:21:34 +01:00
Miek Gieben 6ee673464d Small doc update 2014-09-21 09:09:50 +01:00
Miek Gieben 9c9f3646ff More naming and some docs 2014-09-21 09:07:26 +01:00
Miek Gieben b90da23741 Fix tests and examples.
Put all examples in the same file and cleanup the tests to use
the new names.
2014-09-21 08:38:17 +01:00
Miek Gieben 9c455b0214 PrivateRR: naming naming naming
Try to find better (=more in sync with the rest of the lib) naming. My
guess is that these are better, but YMMV.
2014-09-21 08:28:38 +01:00
Miek Gieben 7e792338bb Move custom* filenames to private to be in sync with the type 2014-09-21 07:56:01 +01:00