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.

Description

Format an explicit 14-bit packet offset as a DNS compression pointer token; does not verify packet layout or target labels.

A DNS compression pointer stores a packet offset in its lower 14 bits. The upper two bits identify the pointer form.1

When to use this tool

Format an explicit 14-bit packet offset as a DNS compression pointer token; does not verify packet layout or target labels.

  • Prepare the supplied offset 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

  1. Enter offset. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.bytes. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

For offset from 0 to 16,383, return bytes [192 plus floor(offset/256), offset modulo 256].2

Input fieldMeaning and representationAccepted input
offsetoffset.Integer from 0 to 16383 inclusive
Output fieldInterpretation
resultObject containing the named outputs below.
result.bytesThe bytes list in the ordering and representation described above.
json
{
  "input": {
    "offset": 300
  },
  "output": {
    "result": {
      "bytes": [
        193,
        44
      ]
    }
  }
}

Limitations and assumptions

  • Only the pointer token is formatted. Packet bounds, label boundaries and compression-chain validity are not checked.
  • 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

  1. RFC 1035, Section 4.1.4: Message compression — RFC Editor

  2. Tool behavior and example: DNS Compression Pointer Offset Formatter — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies