forked from LittleChest/dns-packet
tweaks
This commit is contained in:
parent
4932026f66
commit
c8fd22c8a1
18
README.md
18
README.md
@ -262,25 +262,27 @@ And an answer, additional, or authority looks like this
|
|||||||
code: 12,
|
code: 12,
|
||||||
data: Buffer.alloc(31)
|
data: Buffer.alloc(31)
|
||||||
}, {
|
}, {
|
||||||
// Several EDNS0 options have explicit support
|
// Several EDNS0 options have enhanced support
|
||||||
code: 'padding',
|
code: 'PADDING',
|
||||||
length: 31
|
length: 31,
|
||||||
}, {
|
}, {
|
||||||
code: 'CLIENT-SUBNET',
|
code: 'CLIENT_SUBNET',
|
||||||
family: 2, // 1 for IPv4, 2 for IPv6
|
family: 2, // 1 for IPv4, 2 for IPv6
|
||||||
sourcePrefixLength: 64, // used to truncate IP address
|
sourcePrefixLength: 64, // used to truncate IP address
|
||||||
scopePrefixLength: 0,
|
scopePrefixLength: 0,
|
||||||
ip: 'fe80::'
|
ip: 'fe80::',
|
||||||
}, {
|
}, {
|
||||||
code: 'tcp-keepalive',
|
code: 'TCP_KEEPALIVE',
|
||||||
timeout: 150 // increments of 100ms. This means 15s.
|
timeout: 150 // increments of 100ms. This means 15s.
|
||||||
}, {
|
}, {
|
||||||
code: 'key-tag',
|
code: 'KEY_TAG',
|
||||||
tags: [1, 2, 3]
|
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`
|
#### `PTR`
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
"types.js",
|
"types.js",
|
||||||
"rcodes.js",
|
"rcodes.js",
|
||||||
"opcodes.js",
|
"opcodes.js",
|
||||||
"classes.js"
|
"classes.js",
|
||||||
|
"optioncodes.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user