@types/dns-packet
- Version 5.6.5
- Published
- 10.6 kB
- 1 dependency
- MIT license
Install
npm i @types/dns-packet
yarn add @types/dns-packet
pnpm add @types/dns-packet
Overview
TypeScript definitions for dns-packet
Index
Variables
Functions
Interfaces
Type Aliases
Namespaces
Variables
variable AUTHENTIC_DATA
const AUTHENTIC_DATA: number;
variable AUTHORITATIVE_ANSWER
const AUTHORITATIVE_ANSWER: number;
variable CHECKING_DISABLED
const CHECKING_DISABLED: number;
variable DNSSEC_OK
const DNSSEC_OK: number;
variable RECURSION_AVAILABLE
const RECURSION_AVAILABLE: number;
variable RECURSION_DESIRED
const RECURSION_DESIRED: number;
variable TRUNCATED_RESPONSE
const TRUNCATED_RESPONSE: number;
Functions
function decode
decode: typeof decode;
function encode
encode: typeof encode;
function encodingLength
encodingLength: (packet: Packet) => number;
function streamDecode
streamDecode: typeof streamDecode;
function streamEncode
streamEncode: typeof streamEncode;
Interfaces
interface BaseAnswer
interface BaseAnswer<T, D> extends GenericAnswer<T> {}
interface CaaData
interface CaaData {}
property flags
flags?: number | undefined;
property issuerCritical
issuerCritical?: boolean | undefined;
property tag
tag: 'issue' | 'issuewild' | 'iodef';
property value
value: string;
interface DecodedPacket
interface DecodedPacket extends Packet {}
interface DnskeyData
interface DnskeyData {}
interface DsData
interface DsData {}
property algorithm
algorithm: number;
property digest
digest: Buffer;
property digestType
digestType: number;
property keyTag
keyTag: number;
interface GenericAnswer
interface GenericAnswer<T> {}
interface MxData
interface MxData {}
property exchange
exchange: string;
property preference
preference?: number | undefined;
interface NaptrData
interface NaptrData {}
property flags
flags: string;
property order
order: number;
property preference
preference: number;
property regexp
regexp: string;
property replacement
replacement: string;
property services
services: string;
interface Nsec3Data
interface Nsec3Data {}
property algorithm
algorithm: number;
property flags
flags: number;
property iterations
iterations: number;
property nextDomain
nextDomain: Buffer;
property rrtypes
rrtypes: string[];
property salt
salt: Buffer;
interface NsecData
interface NsecData {}
property nextDomain
nextDomain: string;
property rrtypes
rrtypes: string[];
interface OptAnswer
interface OptAnswer extends GenericAnswer<'OPT'> {}
property ednsVersion
ednsVersion: number;
property extendedRcode
extendedRcode: number;
property flag_do
flag_do: boolean;
Whether or not the DNS DO bit is set
property flags
flags: number;
property options
options: PacketOpt[];
property udpPayloadSize
udpPayloadSize: number;
interface Packet
interface Packet {}
property additionals
additionals?: Answer[] | undefined;
property answers
answers?: Answer[] | undefined;
property authorities
authorities?: Answer[] | undefined;
property flags
flags?: number | undefined;
A bit-mask combination of zero or more of: AUTHORITATIVE_ANSWER, TRUNCATED_RESPONSE, RECURSION_DESIRED, RECURSION_AVAILABLE, AUTHENTIC_DATA, CHECKING_DISABLED.
property id
id?: number | undefined;
property questions
questions?: Question[] | undefined;
property type
type?: 'query' | 'response' | undefined;
Whether the packet is a query or a response. This field may be omitted if it is clear from the context of usage what type of packet it is.
interface Question
interface Question {}
interface RrsigData
interface RrsigData {}
property algorithm
algorithm: number;
property expiration
expiration: number;
property inception
inception: number;
property keyTag
keyTag: number;
property labels
labels: number;
property originalTTL
originalTTL: number;
property signature
signature: Buffer;
property signersName
signersName: string;
property typeCovered
typeCovered: string;
interface SoaData
interface SoaData {}
interface SrvData
interface SrvData {}
interface SshfpData
interface SshfpData {}
property algorithm
algorithm: number;
property fingerprint
fingerprint: string;
property hash
hash: number;
interface TlsaData
interface TlsaData {}
property certificate
certificate: Buffer;
property matchingType
matchingType: number;
property selector
selector: number;
property usage
usage: number;
Type Aliases
type Answer
type Answer = | StringAnswer | BufferAnswer | CaaAnswer | DnskeyAnswer | DSAnswer | HInfoAnswer | MxAnswer | NaptrAnswer | Nsec3Answer | NsecAnswer | OptAnswer | RpAnswer | RrsigAnswer | SoaAnswer | SrvAnswer | SshfpAnswer | TlsaAnswer | TxtAnswer;
type BufferAnswer
type BufferAnswer = BaseAnswer<OtherRecordType, Buffer>;
type CaaAnswer
type CaaAnswer = BaseAnswer<'CAA', CaaData>;
type DnskeyAnswer
type DnskeyAnswer = BaseAnswer<'DNSKEY', DnskeyData>;
type DSAnswer
type DSAnswer = BaseAnswer<'DS', DsData>;
type HInfoAnswer
type HInfoAnswer = BaseAnswer<'HINFO', HInfoData>;
type MxAnswer
type MxAnswer = BaseAnswer<'MX', MxData>;
type NaptrAnswer
type NaptrAnswer = BaseAnswer<'NAPTR', NaptrData>;
type Nsec3Answer
type Nsec3Answer = BaseAnswer<'NSEC3', Nsec3Data>;
type NsecAnswer
type NsecAnswer = BaseAnswer<'NSEC', NsecData>;
type OtherRecordType
type OtherRecordType = | 'AFSDB' | 'APL' | 'AXFR' | 'CDNSKEY' | 'CDS' | 'CERT' | 'DHCID' | 'DLV' | 'HIP' | 'IPSECKEY' | 'IXFR' | 'KEY' | 'KX' | 'LOC' | 'NSEC3PARAM' | 'NULL' | 'SIG' | 'TA' | 'TKEY' | 'TSIG' | 'URI';
Record types for which the library does not attempt to process the data field.
type PacketOpt
type PacketOpt = ClientSubnetOpt | KeepAliveOpt | PaddingOpt | TagOpt;
type RecordClass
type RecordClass = 'IN' | 'CS' | 'CH' | 'HS' | 'ANY';
type RecordType
type RecordType = | 'A' | 'AAAA' | 'AFSDB' | 'APL' | 'AXFR' | 'CAA' | 'CDNSKEY' | 'CDS' | 'CERT' | 'CNAME' | 'DNAME' | 'DHCID' | 'DLV' | 'DNSKEY' | 'DS' | 'HINFO' | 'HIP' | 'IXFR' | 'IPSECKEY' | 'KEY' | 'KX' | 'LOC' | 'MX' | 'NAPTR' | 'NS' | 'NSEC' | 'NSEC3' | 'NSEC3PARAM' | 'NULL' | 'OPT' | 'PTR' | 'RRSIG' | 'RP' | 'SIG' | 'SOA' | 'SRV' | 'SSHFP' | 'TA' | 'TKEY' | 'TLSA' | 'TSIG' | 'TXT' | 'URI';
The currently defined set of DNS record types.
type RpAnswer
type RpAnswer = BaseAnswer<'RP', RpData>;
type RrsigAnswer
type RrsigAnswer = BaseAnswer<'RRSIG', RrsigData>;
type SoaAnswer
type SoaAnswer = BaseAnswer<'SOA', SoaData>;
type SrvAnswer
type SrvAnswer = BaseAnswer<'SRV', SrvData>;
type SshfpAnswer
type SshfpAnswer = BaseAnswer<'SSHFP', SshfpData>;
type StringAnswer
type StringAnswer = BaseAnswer<StringRecordType, string>;
type StringRecordType
type StringRecordType = 'A' | 'AAAA' | 'CNAME' | 'DNAME' | 'NS' | 'PTR';
Record types for which the library will provide a string in the data field.
type TlsaAnswer
type TlsaAnswer = BaseAnswer<'TLSA', TlsaData>;
type TxtAnswer
type TxtAnswer = BaseAnswer<'TXT', TxtData>;
type TxtData
type TxtData = string | Buffer | Array<string | Buffer>;
Namespaces
namespace streamDecode
namespace streamDecode {}
variable bytes
let bytes: number;
namespace streamEncode
namespace streamEncode {}
variable bytes
let bytes: number;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/dns-packet
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/dns-packet)
- HTML<a href="https://www.jsdocs.io/package/@types/dns-packet"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2076 ms. - Missing or incorrect documentation? Open an issue for this package.