From c8fd22c8a101251157079006bbb3c0a9f2ac68c0 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 21 Feb 2019 23:33:07 +0100 Subject: [PATCH] tweaks --- README.md | 18 ++++++++++-------- package.json | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 139e1f6..9917234 100644 --- a/README.md +++ b/README.md @@ -262,25 +262,27 @@ And an answer, additional, or authority looks like this code: 12, data: Buffer.alloc(31) }, { - // Several EDNS0 options have explicit support - code: 'padding', - length: 31 + // Several EDNS0 options have enhanced support + code: 'PADDING', + length: 31, }, { - code: 'CLIENT-SUBNET', + code: 'CLIENT_SUBNET', family: 2, // 1 for IPv4, 2 for IPv6 sourcePrefixLength: 64, // used to truncate IP address scopePrefixLength: 0, - ip: 'fe80::' + ip: 'fe80::', }, { - code: 'tcp-keepalive', + code: 'TCP_KEEPALIVE', timeout: 150 // increments of 100ms. This means 15s. }, { - code: 'key-tag', - tags: [1, 2, 3] + code: 'KEY_TAG', + tags: [1, 2, 3], }] } ``` +The options `PADDING`, `CLIENT_SUBNET`, `TCP_KEEPALIVE` and `KEY_TAG` support enhanced de/encoding. See [optionscodes.js](https://github.com/mafintosh/dns-packet/blob/master/optioncodes.js) for all supported option codes. If the `data` property is present on a option, it takes precedence. On decoding, `data` will always be defined. + #### `PTR` ``` js diff --git a/package.json b/package.json index 632676d..edcbc2d 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "types.js", "rcodes.js", "opcodes.js", - "classes.js" + "classes.js", + "optioncodes.js" ] }