Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/miekg/dns
/ functions
Functions
1,687 in github.com/miekg/dns
⨍
Functions
1,687
◇
Types & classes
180
↓ 7 callers
Function
TsigGenerate
TsigGenerate fills out the TSIG record attached to the message. The message should contain a "stub" TSIG RR with the algorithm, key name (owner name o
tsig.go:166
↓ 7 callers
Method
Z
Z returns the Z part of the OPT RR as a uint16 with only the 14 least significant bits used.
edns.go:233
↓ 7 callers
Function
getSoa
()
dnssec_test.go:14
↓ 7 callers
Function
isDDD
(s T)
msg.go:550
↓ 7 callers
Method
unpack
unpack unpacks an RR from wire format. This will only be called on a new and empty RR type with only the header populated. It will only be called if
dns.go:55
↓ 6 callers
Method
Comment
Comment returns an optional text comment that occurred alongside the RR.
scan.go:277
↓ 6 callers
Method
Match
Match returns true if a name matches the NSEC3 record
nsecx.go:79
↓ 6 callers
Function
RunLocalTLSServer
(laddr string, config *tls.Config)
server_test.go:139
↓ 6 callers
Method
Sign
Sign signs an RRSet. The signature needs to be filled in with the values: Inception, Expiration, KeyTag, SignerName and Algorithm. The rest is copied
dnssec.go:252
↓ 6 callers
Function
TsigGenerateWithProvider
TsigGenerateWithProvider is similar to TsigGenerate, but allows for a custom TsigProvider.
tsig.go:171
↓ 6 callers
Method
Version
Version returns the EDNS version used. Only zero is defined.
edns.go:161
↓ 6 callers
Function
equal
equal compares a and b while ignoring case. It returns true when equal otherwise false.
labels.go:190
↓ 6 callers
Function
escapeByte
escapeByte returns the \DDD escaping of b which must satisfy b < ' ' || b > '~'.
types.go:653
↓ 6 callers
Function
isDigit
Helpers for dealing with escaped bytes
msg.go:548
↓ 6 callers
Function
msgLenWithCompressionMap
(dns *Msg, compression map[string]struct{})
msg.go:982
↓ 6 callers
Method
pack
pack packs the records RDATA into wire format. The header will already have been packed into msg.
dns.go:49
↓ 6 callers
Function
packRR
(rr RR, msg []byte, off int, compression compressionMap, compress bool)
msg.go:582
↓ 5 callers
Method
Copy
Copy copies the Rdata into the PrivateRdata argument.
privaterr.go:18
↓ 5 callers
Method
Err
()
scan.go:746
↓ 5 callers
Function
HashName
HashName hashes a string (label) according to RFC 5155. It returns the hashed string in uppercase.
nsecx.go:10
↓ 5 callers
Method
In
TODO: Think we need to away to stop the transfer In performs an incoming transfer with the server in a. If you would like to set the source IP, or som
xfr.go:49
↓ 5 callers
Function
NewServeMux
NewServeMux allocates and returns a new ServeMux.
serve_mux.go:24
↓ 5 callers
Method
PackBuffer
PackBuffer packs a Msg, using the given buffer buf. If buf is too small a new buffer is allocated.
msg.go:727
↓ 5 callers
Function
PrivateHandle
PrivateHandle registers a private resource record type. It requires string and numeric representation of private RR type and generator function as arg
privaterr.go:97
↓ 5 callers
Function
PrivateHandleRemove
PrivateHandleRemove removes definitions required to support private RR type.
privaterr.go:106
↓ 5 callers
Method
Read
Read implements the net.Conn read method.
client.go:319
↓ 5 callers
Method
ReadMsg
ReadMsg reads a message from the connection co. If the received message contains a TSIG record the transaction signature is verified. This method alwa
client.go:254
↓ 5 callers
Function
ReadRR
ReadRR reads the RR contained in r. The string file is used in error reporting and to resolve relative $INCLUDE directives. See NewRR for more docum
scan.go:127
↓ 5 callers
Method
Remove
Remove creates a dynamic update packet deletes RR from a RRSset, see RFC 2136 section 2.5.4 See [ANY] on how to make RRs without rdata.
update.go:109
↓ 5 callers
Method
SetAxfr
SetAxfr creates message for requesting an AXFR.
defaults.go:98
↓ 5 callers
Method
SetRcode
SetRcode creates an error message suitable for the request.
defaults.go:54
↓ 5 callers
Method
SetTsig
SetTsig appends a TSIG RR to the message. This is only a skeleton TSIG RR that is added as the last RR in the additional section. The TSIG is calculat
defaults.go:108
↓ 5 callers
Method
Verify
Verify validates an RRSet with the signature and key. This is only the cryptographic test, the signature validity period must be checked separately. T
dnssec.go:363
↓ 5 callers
Function
fatalIfErr
(err error)
types_generate.go:328
↓ 5 callers
Function
intToBytes
Helper function for packing and unpacking
msg.go:560
↓ 5 callers
Method
isStarted
()
server.go:270
↓ 5 callers
Function
newTsig
(algo string)
tsig_test.go:13
↓ 5 callers
Function
nextByte
(s string, offset int)
types.go:674
↓ 5 callers
Function
packDataAplPrefix
(p *APLPrefix, msg []byte, off int)
msg_helpers.go:685
↓ 5 callers
Function
packStringTxt
(s []string, msg []byte, off int)
msg_helpers.go:399
↓ 5 callers
Function
parseDstFromOOB
parseDstFromOOB takes oob data and returns the destination IP.
udp.go:69
↓ 5 callers
Function
reverseInt16
(m map[uint16]string)
reverse.go:41
↓ 5 callers
Function
splitN
SplitN splits a string into N sized string chunks. This might become an exported function once.
types.go:1694
↓ 5 callers
Function
stringToTTL
stringToTTL parses things like 2w, 2m, etc, and returns the time in seconds.
scan.go:1234
↓ 5 callers
Function
typeToInt
Extract the rr number from TYPExxx
scan.go:1221
↓ 5 callers
Function
unpackRRslice
unpackRRslice unpacks msg[off:] into an []RR. If we cannot unpack the whole array, then it will return nil
msg.go:653
↓ 5 callers
Function
unpackStringTxt
(msg []byte, off int)
msg_helpers.go:391
↓ 4 callers
Method
ActivateAndServe
ActivateAndServe starts a nameserver with the PacketConn or Listener configured in *Server. Its main use is to start a server from systemd.
server.go:369
↓ 4 callers
Function
CertificateToDANE
CertificateToDANE converts a certificate to a hex string as used in the TLSA or SMIMEA records.
dane.go:12
↓ 4 callers
Function
ClientConfigFromReader
ClientConfigFromReader works like ClientConfigFromFile but takes an io.Reader as argument
clientconfig.go:33
↓ 4 callers
Function
IsRRset
IsRRset reports whether a set of RRs is a valid RRset as defined by RFC 2181. This means the RRs need to have the same type, name, and class.
defaults.go:302
↓ 4 callers
Method
NameList
NameList returns all of the names that should be queried based on the config. It is based off of go's net/dns name building, but it does not check the
clientconfig.go:108
↓ 4 callers
Function
RunLocalServer
(pc net.PacketConn, l net.Listener, opts ...func(*Server))
server_test.go:71
↓ 4 callers
Method
SetIncludeFS
SetIncludeFS provides an [fs.FS] to use when looking for the target of $INCLUDE directives. ($INCLUDE must still be enabled separately by calling [Zo
scan.go:250
↓ 4 callers
Method
SetUDPSize
SetUDPSize sets the UDP buffer size.
edns.go:188
↓ 4 callers
Method
String
()
types.go:803
↓ 4 callers
Method
Unpack
Unpack unpacks a binary message to a Msg structure.
msg.go:883
↓ 4 callers
Function
checkInProgressQueriesAtShutdownServer
(t *testing.T, srv *Server, addr string, client *Client)
server_test.go:719
↓ 4 callers
Function
dddToByte
(s T)
msg.go:554
↓ 4 callers
Function
hashFromAlgorithm
(alg uint8)
hash.go:22
↓ 4 callers
Function
makeSVCBKeyValue
makeSVCBKeyValue returns an SVCBKeyValue struct with the key or nil for reserved keys.
svcb.go:188
↓ 4 callers
Method
packBufferWithCompressionMap
packBufferWithCompressionMap packs a Msg, using the given buffer buf.
msg.go:739
↓ 4 callers
Function
packUint48
(i uint64, msg []byte, off int)
msg_helpers.go:230
↓ 4 callers
Method
parse
parse parses an RR from zone file format. This will only be called on a new and empty RR type with only the header populated.
dns.go:60
↓ 4 callers
Function
sprintTxtOctet
(s string)
types.go:572
↓ 4 callers
Function
stringToCm
Parse LOC records' <digits>[.<digits>][mM] into a mantissa exponent format. Token should contain the entire string (i.e. no spaces allowed)
scan.go:1269
↓ 4 callers
Function
typeBitMapLen
typeBitMapLen is a helper function which computes the "maximum" length of a the NSEC Type BitMap field.
msg_helpers.go:524
↓ 4 callers
Function
unpackDataAplPrefix
(msg []byte, off int)
msg_helpers.go:749
↓ 4 callers
Function
unpackDataNsec
(msg []byte, off int)
msg_helpers.go:462
↓ 4 callers
Function
unpackMsgHdr
(msg []byte, off int)
msg.go:1180
↓ 3 callers
Function
ClientConfigFromFile
ClientConfigFromFile parses a resolv.conf(5) like file and returns a *ClientConfig.
clientconfig.go:23
↓ 3 callers
Function
Dial
Dial connects to the address on the named network.
client.go:393
↓ 3 callers
Method
Hijack
Hijack lets the caller take over the connection. After a call to Hijack(), the DNS package will not do anything with the connection.
server.go:59
↓ 3 callers
Function
IsDomainName
IsDomainName checks if s is a valid domain name, it returns the number of labels and true, when a domain name is valid. Note that non fully qualified
defaults.go:182
↓ 3 callers
Method
Out
Out performs an outgoing transfer with the client connecting in w. Basic use pattern: ch := make(chan *dns.Envelope) tr := new(dns.Transfer) var w
xfr.go:223
↓ 3 callers
Method
ReadPrivateKey
ReadPrivateKey reads a private key from the io.Reader q. The string file is only used in error reporting. The public key must be known, because some c
dnssec_keyscan.go:28
↓ 3 callers
Method
RemoteAddr
RemoteAddr returns the net.Addr of the client that sent the current request.
server.go:46
↓ 3 callers
Method
SetExtendedRcode
SetExtendedRcode sets the EDNS extended RCODE field. If the RCODE is not an extended RCODE, will reset the extended RCODE field to 0.
edns.go:178
↓ 3 callers
Method
Size
()
hash.go:17
↓ 3 callers
Function
TrimDomainName
TrimDomainName trims origin from s if s is a subdomain. This function will never return "", but returns "@" instead (@ represents the apex domain).
dnsutil/util.go:48
↓ 3 callers
Function
TsigVerify
TsigVerify verifies the TSIG on a message. If the signature does not validate the returned error contains the cause. If the signature is OK, the error
tsig.go:221
↓ 3 callers
Function
TsigVerifyWithProvider
TsigVerifyWithProvider is similar to TsigVerify, but allows for a custom TsigProvider.
tsig.go:226
↓ 3 callers
Method
UDPSize
UDPSize returns the UDP buffer size.
edns.go:183
↓ 3 callers
Function
UnpackRRWithHeader
UnpackRRWithHeader unpacks the record type specific payload given an existing RR_Header.
msg.go:619
↓ 3 callers
Function
areSVCBPairArraysEqual
areSVCBPairArraysEqual checks if SVCBKeyValue arrays are equal after sorting their copies. arrA and arrB have equal lengths, otherwise zduplicate.go w
svcb.go:903
↓ 3 callers
Function
compressionMapsDifference
(a map[string]struct{}, b map[string]int)
length_test.go:277
↓ 3 callers
Function
compressionMapsEqual
(a map[string]struct{}, b map[string]int)
length_test.go:263
↓ 3 callers
Function
correctSource
correctSource takes oob data and returns new oob data with the Src equal to the Dst
udp.go:85
↓ 3 callers
Method
getTimeoutForRequest
Return the appropriate timeout for a specific request
client.go:375
↓ 3 callers
Function
getTypeStruct
getTypeStruct will take a type and the package scope, and return the (innermost) struct if the type is considered a RR type (currently defined as thos
types_generate.go:71
↓ 3 callers
Function
getTypeStruct
getTypeStruct will take a type and the package scope, and return the (innermost) struct if the type is considered a RR type (currently defined as thos
msg_generate.go:35
↓ 3 callers
Function
noRdata
dynamicUpdate returns true if the Rdlength is zero.
msg_helpers.go:172
↓ 3 callers
Function
packDataA
(a net.IP, msg []byte, off int)
msg_helpers.go:26
↓ 3 callers
Function
packUint64
(i uint64, msg []byte, off int)
msg_helpers.go:251
↓ 3 callers
Method
parseDNSKEY
(c *zlexer, o, typ string)
scan_rr.go:1215
↓ 3 callers
Method
parseDS
(c *zlexer, o, typ string)
scan_rr.go:1433
↓ 3 callers
Method
parseError
(msg string, end int)
generate.go:112
↓ 3 callers
Method
publicKeyECDSA
publicKeyECDSA returns the Curve public key from the DNSKEY record.
dnssec.go:569
↓ 3 callers
Method
publicKeyRSA
publicKeyRSA returns the RSA public key from a DNSKEY record.
dnssec.go:516
↓ 3 callers
Method
readByte
readByte returns the next byte from the input
dnssec_keyscan.go:216
← previous
next →
101–200 of 1,687, ranked by callers