edns

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 174

Documentation

Overview

Package edns provides function useful for adding/inspecting OPT records to/in messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSupportedOption added in v1.3.0

func SetSupportedOption(option uint16)

SetSupportedOption adds an EDNS0 option to the set of options that CoreDNS may copy from a request to an OPT-less response. Plugins typically call this in their setup code to signal support for a custom option.

func Size

func Size(proto string, size uint16) uint16

Size returns a normalized size based on proto.

func SupportedOption added in v1.3.0

func SupportedOption(option uint16) bool

SupportedOption returns true if the option code was explicitly registered.

func Version

func Version(req *dns.Msg) (*dns.Msg, error)

Version checks the EDNS version in the request. If error is nil everything is OK and we can invoke the plugin. If non-nil, the returned Msg is valid to be returned to the client (and should).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL