forked from LittleChest/dns-packet
readme tweaks
This commit is contained in:
parent
4e540801ab
commit
3c7b50f1ac
20
README.md
20
README.md
@ -1,14 +1,12 @@
|
|||||||
# dns-packet
|
# dns-packet
|
||||||
|
[](https://www.npmjs.org/package/dns-packet) [](https://www.npmjs.org/package/dns-packet) [](https://travis-ci.org/mafintosh/dns-packet)
|
||||||
|
|
||||||
An [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant module for encoding / decoding DNS packets.
|
An [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant module for encoding / decoding DNS packets. Lifted out of [multicast-dns](https://github.com/mafintosh/multicast-dns) as a separate module.
|
||||||
Lifted out of [multicast-dns](https://github.com/mafintosh/multicast-dns) as a separate module.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install dns-packet
|
npm install dns-packet
|
||||||
```
|
```
|
||||||
|
|
||||||
[](https://travis-ci.org/mafintosh/dns-packet)
|
|
||||||
|
|
||||||
## UDP Usage
|
## UDP Usage
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
@ -128,7 +126,7 @@ And an answers, additional, or authority looks like this
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Currently the different available records are
|
## Supported record types
|
||||||
|
|
||||||
#### `A`
|
#### `A`
|
||||||
|
|
||||||
@ -178,7 +176,7 @@ Currently the different available records are
|
|||||||
{
|
{
|
||||||
flags: 257, // 16 bits
|
flags: 257, // 16 bits
|
||||||
algorithm: 1, // octet
|
algorithm: 1, // octet
|
||||||
key: buffer
|
key: Buffer
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -189,7 +187,7 @@ Currently the different available records are
|
|||||||
keyTag: 12345,
|
keyTag: 12345,
|
||||||
algorithm: 8,
|
algorithm: 8,
|
||||||
digestType: 1,
|
digestType: 1,
|
||||||
digest: buffer
|
digest: Buffer
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -237,8 +235,8 @@ Currently the different available records are
|
|||||||
algorithm: 1,
|
algorithm: 1,
|
||||||
flags: 0,
|
flags: 0,
|
||||||
iterations: 2,
|
iterations: 2,
|
||||||
salt: buffer,
|
salt: Buffer,
|
||||||
nextDomain: buffer, // Hashed per RFC5155
|
nextDomain: Buffer, // Hashed per RFC5155
|
||||||
rrtypes: ['A', 'TXT', 'RRSIG']
|
rrtypes: ['A', 'TXT', 'RRSIG']
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -286,7 +284,7 @@ Currently the different available records are
|
|||||||
inception: timestamp,
|
inception: timestamp,
|
||||||
keyTag: 12345,
|
keyTag: 12345,
|
||||||
signersName: 'a.name',
|
signersName: 'a.name',
|
||||||
signature: buffer
|
signature: Buffer
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -330,7 +328,7 @@ Currently the different available records are
|
|||||||
|
|
||||||
When encoding, scalar values are converted to an array and strings are converted to UTF-8 encoded Buffers. When decoding, the return value will always be an array of Buffer.
|
When encoding, scalar values are converted to an array and strings are converted to UTF-8 encoded Buffers. When decoding, the return value will always be an array of Buffer.
|
||||||
|
|
||||||
If you need another one, open an issue and we'll try to add it.
|
If you need another record type, open an issue and we'll try to add it.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,6 @@
|
|||||||
"test": "eslint --color *.js && tape test.js"
|
"test": "eslint --color *.js && tape test.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.18.0",
|
|
||||||
"ip": "^1.1.5",
|
"ip": "^1.1.5",
|
||||||
"safe-buffer": "^5.1.1"
|
"safe-buffer": "^5.1.1"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user