@types/dns-packet
Advanced tools
Comparing version 5.2.3 to 5.2.4
@@ -100,7 +100,11 @@ // Type definitions for dns-packet 5.2 | ||
export interface BaseAnswer<T, D> { | ||
export interface GenericAnswer<T> { | ||
type: T; | ||
name: string; | ||
} | ||
export interface BaseAnswer<T, D> extends GenericAnswer<T> { | ||
ttl?: number | undefined; | ||
class?: RecordClass | undefined; | ||
flush?: boolean | undefined; | ||
data: D; | ||
@@ -140,3 +144,2 @@ } | ||
| "NULL" | ||
| "OPT" | ||
| "RRSIG" | ||
@@ -161,2 +164,66 @@ | "RP" | ||
interface OptCodes { | ||
"OPTION_0": 0; | ||
"LLQ": 1; | ||
"UL": 2; | ||
"NSID": 3; | ||
"OPTION_4": 4; | ||
"DAU": 5; | ||
"DHU": 6; | ||
"N3U": 7; | ||
"CLIENT_SUBNET": 8; | ||
"EXPIRE": 9; | ||
"COOKIE": 10; | ||
"TCP_KEEPALIVE": 11; | ||
"PADDING": 12; | ||
"CHAIN": 13; | ||
"KEY_TAG": 14; | ||
"DEVICEID": 26946; | ||
"OPTION_65535": 65535; | ||
} | ||
type OptCodeType = keyof OptCodes; | ||
type OptCode<K extends OptCodeType> = OptCodes[K]; | ||
interface GenericOpt<T extends OptCodeType> { | ||
code: OptCode<T>; | ||
type?: T | undefined; | ||
data?: Buffer | undefined; | ||
} | ||
interface ClientSubnetOpt extends GenericOpt<"CLIENT_SUBNET"> { | ||
family?: number | undefined; | ||
sourcePrefixLength?: number | undefined; | ||
scopePrefixLength?: number | undefined; | ||
ip: string | undefined; | ||
} | ||
interface KeepAliveOpt extends GenericOpt<"TCP_KEEPALIVE"> { | ||
timeout?: number | undefined; | ||
} | ||
interface PaddingOpt extends GenericOpt<"PADDING"> { | ||
length?: number | undefined; | ||
} | ||
interface TagOpt extends GenericOpt<"KEY_TAG"> { | ||
tags: number[]; | ||
} | ||
export type PacketOpt = ClientSubnetOpt | KeepAliveOpt | PaddingOpt | TagOpt; | ||
export interface OptAnswer extends GenericAnswer<"OPT"> { | ||
udpPayloadSize: number; | ||
extendedRcode: number; | ||
ednsVersion: number; | ||
flags: number; | ||
/** | ||
* Whether or not the DNS DO bit is set | ||
*/ | ||
flag_do: boolean; | ||
options: PacketOpt[]; | ||
} | ||
export type Answer = | ||
@@ -170,3 +237,4 @@ | StringAnswer | ||
| MxAnswer | ||
| BufferAnswer; | ||
| BufferAnswer | ||
| OptAnswer; | ||
@@ -223,1 +291,3 @@ export interface Packet { | ||
} | ||
export {}; |
{ | ||
"name": "@types/dns-packet", | ||
"version": "5.2.3", | ||
"version": "5.2.4", | ||
"description": "TypeScript definitions for dns-packet", | ||
@@ -25,4 +25,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dns-packet", | ||
}, | ||
"typesPublisherContentHash": "70483b0f64398557fdda578b58c0bdc177ff9e39e092a186def5930c6d716d0d", | ||
"typeScriptVersion": "3.7" | ||
"typesPublisherContentHash": "a82b2d309b3500182ef6e7b8e2334ca09ce18dcb88afdd0568a7a462c604b157", | ||
"typeScriptVersion": "3.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 15 Nov 2021 17:01:34 GMT | ||
* Last updated: Wed, 08 Dec 2021 00:31:01 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8770
255