···
···
func (a *A) Encode(bytes []byte, offsets *map[string]uint8) []byte {
return append(bytes, a.Address.To4()...)
24
+
func (a A) String() string {
25
+
return a.Address.String()
func (ns *NS) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
func (ns *NS) Encode(bytes []byte, offsets *map[string]uint8) []byte {
return append(bytes, encode_domain(bytes, ns.NSDName, offsets)...)
42
+
func (ns NS) String() string {
func (md *MD) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
return append(bytes, encode_domain(bytes, md.MADName, offsets)...)
60
+
func (md MD) String() string {
func (mf *MF) Decode(buf []byte, offset int, rdlength int) (int, error) {
mf.MADName, offset, err = decode_domain(buf, offset)
···
return append(bytes, encode_domain(bytes, mf.MADName, offsets)...)
78
+
func (mf MF) String() string {
func (c *CNAME) Decode(buf []byte, offset int, rdlength int) (int, error) {
c.CName, offset, err = decode_domain(buf, offset)
···
return append(bytes, encode_domain(bytes, c.CName, offsets)...)
96
+
func (c CNAME) String() string {
func (soa *SOA) Decode(buf []byte, offset int, rdlength int) (int, error) {
soa.MName, offset, err = decode_domain(buf, offset)
···
152
+
func (soa SOA) String() string {
153
+
return fmt.Sprintf("%s %s %d %d %d %d %d", soa.MName, soa.RName, soa.Serial, soa.Refresh, soa.Retry, soa.Expire, soa.Minimum)
func (mb *MB) Decode(buf []byte, offset int, rdlength int) (int, error) {
madname, offset, err := decode_domain(buf, offset)
···
return append(bytes, encode_domain(bytes, mb.MADName, offsets)...)
170
+
func (mb MB) String() string {
func (mg *MG) Decode(buf []byte, offset int, rdlength int) (int, error) {
mg.MGMName, offset, err = decode_domain(buf, offset)
···
return append(bytes, encode_domain(bytes, mg.MGMName, offsets)...)
188
+
func (mg MG) String() string {
func (mr *MR) Decode(buf []byte, offset int, rdlength int) (int, error) {
mr.NEWName, offset, err = decode_domain(buf, offset)
···
return append(bytes, encode_domain(bytes, mr.NEWName, offsets)...)
206
+
func (mr MR) String() string {
func (null *NULL) Decode(buf []byte, offset int, rdlength int) (int, error) {
null.Anything, offset, err = getSlice(buf, offset, int(rdlength))
···
func (null *NULL) Encode(bytes []byte, offsets *map[string]uint8) []byte {
return append(bytes, null.Anything...)
224
+
func (null NULL) String() string {
225
+
return string(null.Anything)
func (wks *WKS) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
257
+
func (wks WKS) String() string {
258
+
return fmt.Sprintf("%s %d %s", wks.Address.String(), wks.Protocol, wks.BitMap)
func (ptr *PTR) Decode(buf []byte, offset int, rdlength int) (int, error) {
ptr.PTRDName, offset, err = decode_domain(buf, offset)
···
func (ptr *PTR) Encode(bytes []byte, offsets *map[string]uint8) []byte {
return append(bytes, encode_domain(bytes, ptr.PTRDName, offsets)...)
275
+
func (ptr PTR) String() string {
276
+
return ptr.PTRDName
func (hinfo *HINFO) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
302
+
func (hinfo HINFO) String() string {
303
+
return hinfo.OS + " " + hinfo.CPU
func (minfo *MINFO) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
bytes = append(bytes, encode_domain(bytes, minfo.EMailBx, offsets)...)
329
+
func (minfo MINFO) String() string {
330
+
return minfo.RMailBx + " " + minfo.EMailBx
func (mx *MX) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
bytes = append(bytes, encode_domain(bytes, mx.Exchange, offsets)...)
355
+
func (mx MX) String() string {
356
+
return fmt.Sprintf("%d %s", mx.Preference, mx.Exchange)
func (txt *TXT) Decode(buf []byte, offset int, rdlength int) (int, error) {
···
return append(bytes, []byte(txt.TxtData)...)
373
+
func (txt TXT) String() string {
func (r *Reserved) Decode(buf []byte, offset int, rdlength int) (int, error) {
r.Bytes, offset, err = getSlice(buf, offset, int(rdlength))
···
func (r *Reserved) Encode(bytes []byte, offsets *map[string]uint8) []byte {
return append(bytes, r.Bytes...)
391
+
func (r Reserved) String() string {
392
+
return string(r.Bytes)
// Decode decodes a resource record from buf at the offset.