31 lines
581 B
JavaScript
31 lines
581 B
JavaScript
(function (exports) {
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
exports.DNS_PACKER_TYPE_SOA = function (ab, dv, total, record) {
|
|
if(!record.sn){
|
|
throw new Error("no serial number for SOA record");
|
|
}
|
|
if(!record.ref){
|
|
throw new Error("no serial number for SOA record");
|
|
}
|
|
if(!record.ret){
|
|
throw new Error("no serial number for SOA record");
|
|
}
|
|
if(!record.ex){
|
|
throw new Error("no serial number for SOA record");
|
|
}
|
|
if(!record.nx){
|
|
throw new Error("no serial number for SOA record");
|
|
}
|
|
|
|
|
|
|
|
|
|
return total;
|
|
};
|
|
|
|
}('undefined' !== typeof window ? window : exports));
|