dir for packer
This commit is contained in:
parent
27ddd5f1bf
commit
72fece4124
|
@ -28,13 +28,13 @@ exports.DNS_RDATA_PACK = function (ab, dv, total, record) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
packer = exports['DNS_PACKER_TYPE_' + typeName]
|
packer = exports['DNS_PACKER_TYPE_' + typeName]
|
||||||
|| require('./dns.packer.type.' + typeName.toLowerCase())['DNS_PACKER_TYPE_' + typeName];
|
|| require('./packer/type.' + typeName.toLowerCase())['DNS_PACKER_TYPE_' + typeName];
|
||||||
}
|
}
|
||||||
catch (e) { /*console.error(e)*/ }
|
catch (e) { /*console.error(e)*/ }
|
||||||
|
|
||||||
if (!packer) {
|
if (!packer) {
|
||||||
throw new Error("Packer for DNS Type " + typeName + " could not be loaded."
|
throw new Error("Packer for DNS Type " + typeName + " could not be loaded."
|
||||||
+ " Did you include <script src=\"dns.packer.type." + typeName.toLowerCase() + ".js\"></script> ?"
|
+ " Did you include <script src=\"packer/type." + typeName.toLowerCase() + ".js\"></script> ?"
|
||||||
+ " (or perhaps we plan to implement it and haven't yet - in which case please open an issue)"
|
+ " (or perhaps we plan to implement it and haven't yet - in which case please open an issue)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var packer = require('../dns.packer.type.a.js').DNS_PACKER_TYPE_A;
|
var packer = require('../packer/type.a.js').DNS_PACKER_TYPE_A;
|
||||||
var ab = new ArrayBuffer(6); // 16-bit RDLENGTH + 32-bit address
|
var ab = new ArrayBuffer(6); // 16-bit RDLENGTH + 32-bit address
|
||||||
var dv = new DataView(ab);
|
var dv = new DataView(ab);
|
||||||
var total;
|
var total;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var packer = require('../dns.packer.type.aaaa.js').DNS_PACKER_TYPE_AAAA;
|
var packer = require('../packer/type.aaaa.js').DNS_PACKER_TYPE_AAAA;
|
||||||
var ab = new ArrayBuffer(22);
|
var ab = new ArrayBuffer(22);
|
||||||
var dv = new DataView(ab);
|
var dv = new DataView(ab);
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var packer = require('../dns.packer.type.cname.js').DNS_PACKER_TYPE_CNAME;
|
var packer = require('../packer/type.cname.js').DNS_PACKER_TYPE_CNAME;
|
||||||
var ab = new ArrayBuffer(254); // max len per label is 63, max label sequence is 254
|
var ab = new ArrayBuffer(254); // max len per label is 63, max label sequence is 254
|
||||||
var dv = new DataView(ab);
|
var dv = new DataView(ab);
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var packer = require('../dns.packer.type.mx.js').DNS_PACKER_TYPE_MX;
|
var packer = require('../packer/type.mx.js').DNS_PACKER_TYPE_MX;
|
||||||
var ab = new ArrayBuffer(256); // priority + max len per label is 63, max label sequence is 254
|
var ab = new ArrayBuffer(256); // priority + max len per label is 63, max label sequence is 254
|
||||||
var dv = new DataView(ab);
|
var dv = new DataView(ab);
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
|
Loading…
Reference in New Issue