This commit is contained in:
silverwind 2019-02-21 23:33:07 +01:00
parent 4932026f66
commit c8fd22c8a1
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443
2 changed files with 12 additions and 9 deletions

View File

@ -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

View File

@ -37,6 +37,7 @@
"types.js",
"rcodes.js",
"opcodes.js",
"classes.js"
"classes.js",
"optioncodes.js"
]
}