@nictool/dns-resource-record 1.6.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +356 -199
  3. package/dist/dns-rr.cjs +7050 -0
  4. package/dist/dns-rr.min.js +26 -0
  5. package/dist/dns-rr.min.js.map +7 -0
  6. package/index.js +12 -11
  7. package/lib/binary.js +108 -0
  8. package/lib/bind.js +96 -0
  9. package/lib/dns-query.js +67 -0
  10. package/lib/tinydns.js +128 -44
  11. package/lib/wire.js +629 -0
  12. package/package.json +28 -8
  13. package/rr/TEMPLATE.js +124 -0
  14. package/rr/a.js +8 -48
  15. package/rr/aaaa.js +13 -80
  16. package/rr/apl.js +123 -27
  17. package/rr/caa.js +27 -50
  18. package/rr/cert.js +60 -81
  19. package/rr/cname.js +8 -59
  20. package/rr/dhcid.js +20 -30
  21. package/rr/dname.js +10 -32
  22. package/rr/dnskey.js +38 -32
  23. package/rr/ds.js +59 -54
  24. package/rr/hinfo.js +21 -40
  25. package/rr/hip.js +88 -26
  26. package/rr/https.js +28 -40
  27. package/rr/ipseckey.js +97 -18
  28. package/rr/key.js +39 -29
  29. package/rr/kx.js +16 -27
  30. package/rr/loc.js +42 -12
  31. package/rr/mx.js +17 -48
  32. package/rr/naptr.js +58 -33
  33. package/rr/ns.js +8 -36
  34. package/rr/nsec.js +89 -18
  35. package/rr/nsec3.js +62 -26
  36. package/rr/nsec3param.js +56 -53
  37. package/rr/nxt.js +57 -18
  38. package/rr/openpgpkey.js +24 -30
  39. package/rr/ptr.js +7 -47
  40. package/rr/rp.js +17 -32
  41. package/rr/rrsig.js +108 -75
  42. package/rr/sig.js +70 -45
  43. package/rr/smimea.js +33 -33
  44. package/rr/soa.js +31 -49
  45. package/rr/spf.js +15 -18
  46. package/rr/srv.js +28 -51
  47. package/rr/sshfp.js +35 -48
  48. package/rr/svcb.js +27 -40
  49. package/rr/tlsa.js +34 -34
  50. package/rr/tsig.js +87 -24
  51. package/rr/txt.js +77 -68
  52. package/rr/uri.js +19 -29
  53. package/rr/wks.js +154 -22
  54. package/rr.js +290 -109
  55. package/lib/readme.js +0 -84
package/rr/key.js CHANGED
@@ -1,7 +1,19 @@
1
1
  import RR from '../rr.js'
2
2
  import * as TINYDNS from '../lib/tinydns.js'
3
+ import * as BINARY from '../lib/binary.js'
3
4
 
4
5
  export default class KEY extends RR {
6
+ static typeName = 'KEY'
7
+ static typeId = 25
8
+ static RFCs = [2535, 3445, 4034, 6840]
9
+ static rdataFields = [
10
+ ['flags', 'u16'],
11
+ ['protocol', 'u8'],
12
+ ['algorithm', 'u8'],
13
+ ['publickey', 'base64'],
14
+ ]
15
+ static tags = ['obsolete']
16
+
5
17
  constructor(opts) {
6
18
  super(opts)
7
19
  }
@@ -43,7 +55,7 @@ export default class KEY extends RR {
43
55
 
44
56
  setPublickey(val) {
45
57
  if (!val) this.throwHelp(`KEY: publickey is required`)
46
-
58
+ this.isBase64('KEY', 'publickey', val.replace(/[\s()]/g, ''))
47
59
  this.set('publickey', val)
48
60
  }
49
61
 
@@ -51,18 +63,6 @@ export default class KEY extends RR {
51
63
  return 'DNS Public Key'
52
64
  }
53
65
 
54
- getRdataFields(arg) {
55
- return ['flags', 'protocol', 'algorithm', 'publickey']
56
- }
57
-
58
- getRFCs() {
59
- return [2535, 3445]
60
- }
61
-
62
- getTypeId() {
63
- return 25
64
- }
65
-
66
66
  getCanonical() {
67
67
  return {
68
68
  owner: 'example.com.',
@@ -72,7 +72,8 @@ export default class KEY extends RR {
72
72
  flags: 256,
73
73
  protocol: 3,
74
74
  algorithm: 5,
75
- publickey: 'AQPSKAsj8...',
75
+ publickey:
76
+ 'AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwIXAqcOTiW7iHnQt5hwVAAAAA==',
76
77
  }
77
78
  }
78
79
 
@@ -94,34 +95,43 @@ export default class KEY extends RR {
94
95
  }
95
96
 
96
97
  fromTinydns({ tinyline }) {
97
- // RDATA format: Flags (6 octal chars) + Protocol (3 octal chars) + Algorithm (3 octal chars) + Public Key (escaped data)
98
- const [owner, _typeId, rd, ttl, ts, loc] = tinyline.slice(1).split(':')
99
- if (rd.length < 12) {
100
- this.throwHelp(`KEY: RDATA too short: ${rd}`)
98
+ // RDATA format: Flags (8 octal chars) + Protocol (4 octal chars) + Algorithm (4 octal chars) + Public Key (escaped data)
99
+ const { owner, rdata, ttl, timestamp, location } = this.parseTinydnsLine(tinyline)
100
+ if (rdata.length < 16) {
101
+ this.throwHelp(`KEY: RDATA too short: ${rdata}`)
101
102
  }
102
103
 
103
104
  return new KEY({
104
- owner: this.fullyQualify(owner),
105
- ttl: parseInt(ttl, 10),
105
+ owner,
106
+ ttl,
106
107
  type: 'KEY',
107
- flags: TINYDNS.octalToUInt16(rd.slice(0, 6)),
108
- protocol: TINYDNS.octalToUInt8(rd.slice(6, 9)),
109
- algorithm: TINYDNS.octalToUInt8(rd.slice(9, 12)),
110
- publickey: TINYDNS.unescapeOctal(rd.slice(12)),
111
- timestamp: ts,
112
- location: loc?.trim() ?? '',
108
+ flags: TINYDNS.octalToUInt16(rdata.slice(0, 8)),
109
+ protocol: TINYDNS.octalToUInt8(rdata.slice(8, 12)),
110
+ algorithm: TINYDNS.octalToUInt8(rdata.slice(12, 16)),
111
+ publickey: TINYDNS.octalToBase64(rdata.slice(16)),
112
+ timestamp,
113
+ location,
113
114
  })
114
115
  }
115
116
 
116
117
  /****** EXPORTERS *******/
117
118
  toTinydns() {
118
- const dataRe = new RegExp(/[\r\n\t:\\/]/, 'g')
119
-
120
119
  return this.getTinydnsGeneric(
121
120
  TINYDNS.UInt16toOctal(this.get('flags')) +
122
121
  TINYDNS.UInt8toOctal(this.get('protocol')) +
123
122
  TINYDNS.UInt8toOctal(this.get('algorithm')) +
124
- TINYDNS.escapeOctal(dataRe, this.get('publickey')),
123
+ TINYDNS.base64toOctal(this.get('publickey').replace(/[\s()]/g, '')),
125
124
  )
126
125
  }
126
+
127
+ getWireRdata() {
128
+ const keyBytes = BINARY.base64ToBytes(this.get('publickey').replace(/[\s()]/g, ''))
129
+ const bytes = new Uint8Array(4 + keyBytes.length)
130
+ const dv = new DataView(bytes.buffer, bytes.byteOffset)
131
+ dv.setUint16(0, this.get('flags'))
132
+ bytes[2] = this.get('protocol')
133
+ bytes[3] = this.get('algorithm')
134
+ bytes.set(keyBytes, 4)
135
+ return bytes
136
+ }
127
137
  }
package/rr/kx.js CHANGED
@@ -3,6 +3,14 @@ import RR from '../rr.js'
3
3
  import * as TINYDNS from '../lib/tinydns.js'
4
4
 
5
5
  export default class KX extends RR {
6
+ static typeName = 'KX'
7
+ static typeId = 36
8
+ static RFCs = [2230]
9
+ static rdataFields = [
10
+ ['preference', 'u16'],
11
+ ['exchanger', 'fqdn'],
12
+ ]
13
+
6
14
  constructor(opts) {
7
15
  super(opts)
8
16
  }
@@ -27,18 +35,6 @@ export default class KX extends RR {
27
35
  return 'Key Exchanger'
28
36
  }
29
37
 
30
- getRdataFields(arg) {
31
- return ['preference', 'exchanger']
32
- }
33
-
34
- getRFCs() {
35
- return [2230]
36
- }
37
-
38
- getTypeId() {
39
- return 36
40
- }
41
-
42
38
  getCanonical() {
43
39
  return {
44
40
  owner: 'example.com.',
@@ -67,22 +63,15 @@ export default class KX extends RR {
67
63
  })
68
64
  }
69
65
 
70
- fromBind({ bindline }) {
71
- // test.example.com 3600 IN KX preference exchanger
72
- const [owner, ttl, c, type, preference, exchanger] = bindline.split(/\s+/)
73
- return new KX({
74
- owner,
75
- ttl: parseInt(ttl, 10),
76
- class: c,
77
- type,
78
- preference: parseInt(preference, 10),
79
- exchanger,
80
- })
81
- }
82
-
83
66
  /****** EXPORTERS *******/
84
- toBind(zone_opts) {
85
- return `${this.getPrefix(zone_opts)}\t${this.get('preference')}\t${this.getFQDN('exchanger', zone_opts)}\n`
67
+
68
+ getWireRdata() {
69
+ const exchanger = this.wirePackDomain(this.get('exchanger'))
70
+ const result = new Uint8Array(2 + exchanger.length)
71
+ const dv = new DataView(result.buffer)
72
+ dv.setUint16(0, this.get('preference'))
73
+ result.set(exchanger, 2)
74
+ return result
86
75
  }
87
76
 
88
77
  toTinydns() {
package/rr/loc.js CHANGED
@@ -14,6 +14,11 @@ const CONV = {
14
14
  }
15
15
 
16
16
  export default class LOC extends RR {
17
+ static typeName = 'LOC'
18
+ static typeId = 29
19
+ static RFCs = [1876]
20
+ static rdataFields = ['address']
21
+
17
22
  constructor(opts) {
18
23
  super(opts)
19
24
  }
@@ -36,18 +41,6 @@ export default class LOC extends RR {
36
41
  return 'Location'
37
42
  }
38
43
 
39
- getRdataFields(arg) {
40
- return ['address']
41
- }
42
-
43
- getRFCs() {
44
- return [1876]
45
- }
46
-
47
- getTypeId() {
48
- return 29
49
- }
50
-
51
44
  getCanonical() {
52
45
  return {
53
46
  owner: 'example.com.',
@@ -205,6 +198,27 @@ export default class LOC extends RR {
205
198
  return r
206
199
  }
207
200
 
201
+ fromWire({ owner, cls, ttl, rdata }) {
202
+ const dv = new DataView(rdata.buffer, rdata.byteOffset)
203
+ const l = {
204
+ size: this.fromExponent(rdata[1]),
205
+ precision: {
206
+ horizontal: this.fromExponent(rdata[2]),
207
+ vertical: this.fromExponent(rdata[3]),
208
+ },
209
+ latitude: this.arcSecToDMS(dv.getUint32(4), 'lat'),
210
+ longitude: this.arcSecToDMS(dv.getUint32(8), 'lon'),
211
+ altitude: dv.getUint32(12) - REF.ALTITUDE,
212
+ }
213
+ return new LOC({
214
+ owner,
215
+ ttl,
216
+ class: cls,
217
+ type: 'LOC',
218
+ address: this.toHuman(l),
219
+ })
220
+ }
221
+
208
222
  /****** EXPORTERS *******/
209
223
 
210
224
  toTinydns() {
@@ -222,4 +236,20 @@ export default class LOC extends RR {
222
236
 
223
237
  return this.getTinydnsGeneric(rdata)
224
238
  }
239
+
240
+ getWireRdata() {
241
+ const loc = this.parseLoc(this.get('address'))
242
+ const bytes = new Uint8Array(16)
243
+ const dv = new DataView(bytes.buffer, bytes.byteOffset)
244
+
245
+ bytes[0] = 0 // version
246
+ bytes[1] = this.toExponent(loc.size)
247
+ bytes[2] = this.toExponent(loc.precision.horizontal)
248
+ bytes[3] = this.toExponent(loc.precision.vertical)
249
+ dv.setUint32(4, this.dmsToArcSec(loc.latitude))
250
+ dv.setUint32(8, this.dmsToArcSec(loc.longitude))
251
+ dv.setUint32(12, loc.altitude + REF.ALTITUDE)
252
+
253
+ return bytes
254
+ }
225
255
  }
package/rr/mx.js CHANGED
@@ -1,6 +1,16 @@
1
1
  import RR from '../rr.js'
2
2
 
3
3
  export default class MX extends RR {
4
+ static typeName = 'MX'
5
+ static typeId = 15
6
+ static RFCs = [1035, 2181, 7505]
7
+ static tinydnsType = '@'
8
+ static rdataFields = [
9
+ ['preference', 'u16'],
10
+ ['exchange', 'fqdn'],
11
+ ]
12
+ static tags = ['common']
13
+
4
14
  constructor(opts) {
5
15
  super(opts)
6
16
  }
@@ -14,37 +24,13 @@ export default class MX extends RR {
14
24
  }
15
25
 
16
26
  setExchange(val) {
17
- if (!val) this.throwHelp('MX: exchange is required')
18
-
19
- if (this.isIPv4(val) || this.isIPv6(val)) this.throwHelp(`MX: exchange must be a FQDN`)
20
-
21
- this.isFullyQualified('MX', 'exchange', val)
22
- this.isValidHostname('MX', 'exchange', val)
23
-
24
- // RFC 4034: letters in the DNS names ... are lower cased
25
- this.set('exchange', val.toLowerCase())
27
+ this.setTypedValue('fqdn', 'exchange', val)
26
28
  }
27
29
 
28
30
  getDescription() {
29
31
  return 'Mail Exchanger'
30
32
  }
31
33
 
32
- getTags() {
33
- return ['common']
34
- }
35
-
36
- getRdataFields(arg) {
37
- return ['preference', 'exchange']
38
- }
39
-
40
- getRFCs() {
41
- return [1035, 2181, 7505]
42
- }
43
-
44
- getTypeId() {
45
- return 15
46
- }
47
-
48
34
  getCanonical() {
49
35
  return {
50
36
  owner: 'example.com.',
@@ -59,8 +45,7 @@ export default class MX extends RR {
59
45
  /****** IMPORTERS *******/
60
46
  fromTinydns({ tinyline }) {
61
47
  // @fqdn:ip:x:dist:ttl:timestamp:lo
62
- // eslint-disable-next-line no-unused-vars
63
- const [owner, ip, x, preference, ttl, ts, loc] = tinyline.slice(1).split(':')
48
+ const [owner, _ip, x, preference, ttl, ts, loc] = tinyline.slice(1).split(':')
64
49
 
65
50
  return new MX({
66
51
  type: 'MX',
@@ -73,29 +58,13 @@ export default class MX extends RR {
73
58
  })
74
59
  }
75
60
 
76
- fromBind({ bindline }) {
77
- // test.example.com 3600 IN MX preference exchange
78
- const [owner, ttl, c, type, preference, exchange] = bindline.split(/\s+/)
79
-
80
- return new MX({
81
- owner,
82
- ttl: parseInt(ttl, 10),
83
- class: c,
84
- type,
85
- preference: parseInt(preference),
86
- exchange,
87
- })
88
- }
89
-
90
61
  /****** EXPORTERS *******/
91
62
  getWireRdata() {
92
- const pref = Buffer.alloc(2)
93
- pref.writeUInt16BE(this.get('preference'))
94
- return Buffer.concat([pref, this.wirePackDomain(this.get('exchange'))])
95
- }
96
-
97
- toBind(zone_opts) {
98
- return `${this.getPrefix(zone_opts)}\t${this.get('preference')}\t${this.getFQDN('exchange', zone_opts)}\n`
63
+ const domain = this.wirePackDomain(this.get('exchange'))
64
+ const result = new Uint8Array(2 + domain.length)
65
+ new DataView(result.buffer).setUint16(0, this.get('preference'))
66
+ result.set(domain, 2)
67
+ return result
99
68
  }
100
69
 
101
70
  toTinydns() {
package/rr/naptr.js CHANGED
@@ -4,6 +4,18 @@ import * as TINYDNS from '../lib/tinydns.js'
4
4
  const rdataRe = /[\r\n\t:\\/]/
5
5
 
6
6
  export default class NAPTR extends RR {
7
+ static typeName = 'NAPTR'
8
+ static typeId = 35
9
+ static RFCs = [2915, 3403, 4848]
10
+ static rdataFields = [
11
+ ['order', 'u16'],
12
+ ['preference', 'u16'],
13
+ ['flags', 'qcharstr'],
14
+ ['service', 'qcharstr'],
15
+ ['regexp', 'qcharstr'],
16
+ ['replacement', 'fqdn'],
17
+ ]
18
+
7
19
  constructor(opts) {
8
20
  super(opts)
9
21
  }
@@ -12,22 +24,6 @@ export default class NAPTR extends RR {
12
24
  return 'Naming Authority Pointer'
13
25
  }
14
26
 
15
- getQuotedFields() {
16
- return ['flags', 'service', 'regexp']
17
- }
18
-
19
- getRdataFields(arg) {
20
- return ['order', 'preference', 'flags', 'service', 'regexp', 'replacement']
21
- }
22
-
23
- getRFCs() {
24
- return [2915, 3403, 4848]
25
- }
26
-
27
- getTypeId() {
28
- return 35
29
- }
30
-
31
27
  getCanonical() {
32
28
  return {
33
29
  owner: 'cid.urn.arpa.',
@@ -79,40 +75,41 @@ export default class NAPTR extends RR {
79
75
  /****** IMPORTERS *******/
80
76
  fromTinydns({ tinyline }) {
81
77
  // NAPTR via generic, :fqdn:n:rdata:ttl:timestamp:lo
82
- const [fqdn, n, rdata, ttl, ts, loc] = tinyline.slice(1).split(':')
83
- if (n != 35) this.throwHelp('NAPTR fromTinydns, invalid n')
78
+ const { owner, typeId, rdata, ttl, timestamp, location } = this.parseTinydnsLine(tinyline)
79
+ if (typeId != this.getTypeId()) this.throwHelp('NAPTR fromTinydns, invalid n')
84
80
 
85
- const binRdata = Buffer.from(TINYDNS.octalToChar(rdata), 'binary')
81
+ const binRdata = TINYDNS.octalRdataToBytes(rdata)
82
+ const dv = new DataView(binRdata.buffer, binRdata.byteOffset, binRdata.byteLength)
86
83
 
87
84
  const rec = {
88
85
  type: 'NAPTR',
89
- owner: this.fullyQualify(fqdn),
90
- ttl: parseInt(ttl, 10),
91
- timestamp: ts,
92
- location: loc?.trim() ?? '',
93
- order: binRdata.readUInt16BE(0, 2),
94
- preference: binRdata.readUInt16BE(2, 4),
86
+ owner,
87
+ ttl,
88
+ timestamp,
89
+ location,
90
+ order: dv.getUint16(0),
91
+ preference: dv.getUint16(2),
95
92
  }
96
93
 
97
94
  let idx = 4
98
- const flagsLength = binRdata.readUInt8(idx)
95
+ const flagsLength = binRdata[idx]
99
96
  idx++
100
- rec.flags = binRdata.slice(idx, idx + flagsLength).toString()
97
+ rec.flags = new TextDecoder().decode(binRdata.subarray(idx, idx + flagsLength))
101
98
  idx += flagsLength
102
99
 
103
- const serviceLen = binRdata.readUInt8(idx)
100
+ const serviceLen = binRdata[idx]
104
101
  idx++
105
- rec.service = binRdata.slice(idx, idx + serviceLen).toString()
102
+ rec.service = new TextDecoder().decode(binRdata.subarray(idx, idx + serviceLen))
106
103
  idx += serviceLen
107
104
 
108
- const regexpLen = binRdata.readUInt8(idx)
105
+ const regexpLen = binRdata[idx]
109
106
  idx++
110
- rec.regexp = binRdata.slice(idx, idx + regexpLen).toString()
107
+ rec.regexp = new TextDecoder().decode(binRdata.subarray(idx, idx + regexpLen))
111
108
  idx += regexpLen
112
109
 
113
- const replaceLen = binRdata.readUInt8(idx)
110
+ const replaceLen = binRdata[idx]
114
111
  idx++
115
- rec.replacement = binRdata.slice(idx, idx + replaceLen).toString()
112
+ rec.replacement = new TextDecoder().decode(binRdata.subarray(idx, idx + replaceLen))
116
113
 
117
114
  return new NAPTR(rec)
118
115
  }
@@ -164,4 +161,32 @@ export default class NAPTR extends RR {
164
161
 
165
162
  return this.getTinydnsGeneric(rdata)
166
163
  }
164
+
165
+ getWireRdata() {
166
+ const enc = new TextEncoder()
167
+ const flags = enc.encode(this.get('flags'))
168
+ const service = enc.encode(this.get('service'))
169
+ const regexp = enc.encode(this.get('regexp'))
170
+ const replacementBytes = this.wirePackDomain(this.get('replacement'))
171
+
172
+ const len = 4 + 1 + flags.length + 1 + service.length + 1 + regexp.length + replacementBytes.length
173
+ const buf = new Uint8Array(len)
174
+ const view = new DataView(buf.buffer)
175
+ let pos = 0
176
+ view.setUint16(pos, this.get('order'))
177
+ pos += 2
178
+ view.setUint16(pos, this.get('preference'))
179
+ pos += 2
180
+ buf[pos++] = flags.length
181
+ buf.set(flags, pos)
182
+ pos += flags.length
183
+ buf[pos++] = service.length
184
+ buf.set(service, pos)
185
+ pos += service.length
186
+ buf[pos++] = regexp.length
187
+ buf.set(regexp, pos)
188
+ pos += regexp.length
189
+ buf.set(replacementBytes, pos)
190
+ return buf
191
+ }
167
192
  }
package/rr/ns.js CHANGED
@@ -1,9 +1,15 @@
1
1
  import RR from '../rr.js'
2
2
 
3
3
  export default class NS extends RR {
4
+ static typeName = 'NS'
5
+ static typeId = 2
6
+ static RFCs = [1035]
7
+ static tinydnsType = '&'
8
+ static rdataFields = [['dname', 'fqdn']]
9
+ static tags = ['common']
10
+
4
11
  constructor(opts) {
5
12
  super(opts)
6
- if (opts === null) return
7
13
  }
8
14
 
9
15
  /****** Resource record specific setters *******/
@@ -21,22 +27,6 @@ export default class NS extends RR {
21
27
  return 'Name Server'
22
28
  }
23
29
 
24
- getTags() {
25
- return ['common']
26
- }
27
-
28
- getRdataFields(arg) {
29
- return ['dname']
30
- }
31
-
32
- getRFCs() {
33
- return [1035]
34
- }
35
-
36
- getTypeId() {
37
- return 2
38
- }
39
-
40
30
  getCanonical() {
41
31
  return {
42
32
  owner: 'example.com.',
@@ -50,8 +40,7 @@ export default class NS extends RR {
50
40
  /****** IMPORTERS *******/
51
41
  fromTinydns({ tinyline }) {
52
42
  // &fqdn:ip:x:ttl:timestamp:lo
53
- // eslint-disable-next-line no-unused-vars
54
- const [fqdn, ip, dname, ttl, ts, loc] = tinyline.slice(1).split(':')
43
+ const [fqdn, _ip, dname, ttl, ts, loc] = tinyline.slice(1).split(':')
55
44
 
56
45
  return new NS({
57
46
  type: 'NS',
@@ -63,28 +52,11 @@ export default class NS extends RR {
63
52
  })
64
53
  }
65
54
 
66
- fromBind({ bindline }) {
67
- // test.example.com 3600 IN NS dname
68
- const [owner, ttl, c, type, dname] = bindline.split(/\s+/)
69
-
70
- return new NS({
71
- owner,
72
- ttl: parseInt(ttl, 10),
73
- class: c,
74
- type: type,
75
- dname: dname,
76
- })
77
- }
78
-
79
55
  /****** EXPORTERS *******/
80
56
  getWireRdata() {
81
57
  return this.wirePackDomain(this.get('dname'))
82
58
  }
83
59
 
84
- toBind(zone_opts) {
85
- return `${this.getPrefix(zone_opts)}\t${this.getFQDN('dname', zone_opts)}\n`
86
- }
87
-
88
60
  toTinydns() {
89
61
  return `&${this.getTinyFQDN('owner')}::${this.getTinyFQDN('dname')}:${this.getTinydnsPostamble()}\n`
90
62
  }