DNS Compression Pointer Offset Parser
Parse exactly one two-byte DNS compression pointer into its 14-bit packet offset; does not dereference the pointer.
Description
Parse exactly one two-byte DNS compression pointer into its 14-bit packet offset; does not dereference the pointer.
A two-byte DNS compression token can be decoded without following it. This parser extracts only its offset field.1
When to use this tool
Parse exactly one two-byte DNS compression pointer into its 14-bit packet offset; does not dereference the pointer.
- Prepare the supplied bytes fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter bytes. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.offset. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Require exactly two bytes and require the first byte's upper two bits to be set. Return (first byte AND 63) times 256 plus the second byte.2
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| bytes | bytes. | List of integers from 0 to 255; at most 128 bytes |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.offset | Exact zero-based offset under the stated address or byte convention; null where nonmembership is allowed. |
{
"input": {
"bytes": [
193,
44
]
},
"output": {
"result": {
"offset": 300
}
}
} Limitations and assumptions
- The target is not dereferenced or checked against a packet. Other DNS label forms are rejected.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Use a packet-aware DNS parser or resolver when the task requires compression-chain validation, live records or complete resource-record semantics. Keep byte labels, presentation text and network packets distinct.
References
Similar or alternative tools
- DNS Compression Pointer Offset Formatter
Format an explicit 14-bit packet offset as a DNS compression pointer token; does not verify packet layout or target labels.
- DNS Compression Pointer Target Audit
Audit an explicit DNS compression pointer against packet bounds, backward direction and independently supplied label boundaries; not pointer-chain decoding or loop proof.