dir for packer

This commit is contained in:
AJ ONeal 2017-02-17 16:07:26 -07:00
parent 27ddd5f1bf
commit 72fece4124
9 changed files with 6 additions and 6 deletions

View File

@ -28,13 +28,13 @@ exports.DNS_RDATA_PACK = function (ab, dv, total, record) {
try {
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)*/ }
if (!packer) {
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)"
);
}

View File

@ -1,6 +1,6 @@
'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 dv = new DataView(ab);
var total;

View File

@ -1,6 +1,6 @@
'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 dv = new DataView(ab);
var total = 0;

View File

@ -1,6 +1,6 @@
'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 dv = new DataView(ab);
var total = 0;

View File

@ -1,6 +1,6 @@
'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 dv = new DataView(ab);
var total = 0;