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
↓ 287 callers
Method
String
String returns the text representation of the resource record.
dns.go:36
↓ 264 callers
Method
Next
()
scan.go:804
↓ 218 callers
Method
Error
()
dns.go:23
↓ 129 callers
Function
NewRR
NewRR reads a string s and returns the first RR. If s contains no records, NewRR will return nil with no error. The class defaults to IN, TTL default
scan.go:114
↓ 93 callers
Function
testRR
testRR is a helper that wraps a call to NewRR and panics if the error is non-nil.
rr_test.go:4
↓ 86 callers
Method
len
len returns the length (in octets) of the compressed or uncompressed RR in wire format. If compression is nil, the uncompressed size will be returned
dns.go:45
↓ 80 callers
Method
SetQuestion
SetQuestion creates a question message, it sets the Question section, generates an Id and sets the RecursionDesired (RD) bit to true.
defaults.go:33
↓ 72 callers
Method
Header
Header returns the header of an resource record. The header contains everything up to the rdata.
dns.go:34
↓ 69 callers
Function
packUint16
(i uint16, msg []byte, off int)
msg_helpers.go:196
↓ 59 callers
Function
unpackUint16
(msg []byte, off int)
msg_helpers.go:189
↓ 56 callers
Function
packUint8
(i uint8, msg []byte, off int)
msg_helpers.go:181
↓ 55 callers
Function
UnpackDomainName
Unpack a domain name. In addition to the simple sequences of counted strings above, domain names are allowed to refer to strings elsewhere in the pack
msg.go:381
↓ 53 callers
Method
Shutdown
Shutdown shuts down a server. After a call to Shutdown, ListenAndServe and ActivateAndServe will return.
server.go:402
↓ 52 callers
Function
unpackUint8
(msg []byte, off int)
msg_helpers.go:174
↓ 51 callers
Method
Len
Len returns the length in octets of the Rdata.
privaterr.go:20
↓ 48 callers
Function
cloneSlice
cloneSlice returns a shallow copy of s.
types.go:1677
↓ 45 callers
Method
setParseError
(err string, l lex)
scan.go:270
↓ 43 callers
Method
Next
Next advances the parser to the next RR in the zonefile and returns the (RR, true). It will return (nil, false) when the parsing stops, either by reac
scan.go:315
↓ 41 callers
Method
Write
Write writes a raw buffer back to the client.
server.go:50
↓ 40 callers
Function
packDomainName
(s string, msg []byte, off int, compression compressionMap, compress bool)
msg.go:206
↓ 39 callers
Method
Pack
Pack is used when packing a private RR into a buffer.
privaterr.go:14
↓ 39 callers
Function
isDuplicateName
isDuplicateName checks if the domain names s1 and s2 are equal.
duplicate.go:37
↓ 39 callers
Function
slurpRemainder
"Eat" the rest of the "line"
scan.go:1386
↓ 38 callers
Method
Exchange
Exchange performs a synchronous query. It sends the message m to the address contained in a and waits for a reply. Basic use pattern with a *dns.Clien
client.go:169
↓ 38 callers
Function
HandleFunc
HandleFunc registers the handler function with the given pattern in the DefaultServeMux.
serve_mux.go:120
↓ 37 callers
Function
sprintName
(s string)
types.go:526
↓ 36 callers
Function
CanonicalName
CanonicalName returns the domain name in canonical form. A name in canonical form is lowercase and fully qualified. Only US-ASCII letters are affected
defaults.go:332
↓ 35 callers
Function
domainNameLen
(s string, off int, compression map[string]struct{}, compress bool)
msg.go:1007
↓ 35 callers
Function
toAbsoluteName
(name, origin string)
scan.go:1315
↓ 31 callers
Function
HandleRemove
HandleRemove deregisters the handle with the given pattern in the DefaultServeMux.
serve_mux.go:116
↓ 30 callers
Method
Unpack
Unpack is used when unpacking a private RR from a buffer.
privaterr.go:16
↓ 28 callers
Method
Close
Close closes the connection.
server.go:52
↓ 27 callers
Function
Fqdn
Fqdn return the fully qualified domain name from s. If s is already fully qualified, it behaves as the identity function.
defaults.go:322
↓ 26 callers
Method
Verify
Verify is passed the DNS message to be verified and the TSIG RR. If the signature is valid it will return nil, otherwise an error.
tsig.go:32
↓ 25 callers
Function
NewZoneParser
NewZoneParser returns an RFC 1035 style zonefile parser that reads from r. The string file is used in error reporting and to resolve relative $INCLUD
scan.go:199
↓ 25 callers
Function
packUint32
(i uint32, msg []byte, off int)
msg_helpers.go:211
↓ 23 callers
Method
Err
Err returns the first non-EOF error that was encountered by the ZoneParser.
scan.go:256
↓ 23 callers
Method
KeyTag
KeyTag calculates the keytag (or key-id) of the DNSKEY.
dnssec.go:132
↓ 23 callers
Function
Len
Len returns the length (in octets) of the uncompressed RR in wire format.
msg.go:1070
↓ 23 callers
Function
RunLocalUDPServer
(laddr string, opts ...func(*Server))
server_test.go:114
↓ 23 callers
Method
SetReply
Everything is assumed in ClassINET. SetReply creates a reply message from a request message.
defaults.go:15
↓ 22 callers
Function
PackRR
PackRR packs a resource record rr into msg[off:]. See PackDomainName for documentation about the compression.
msg.go:572
↓ 22 callers
Method
WriteMsg
WriteMsg writes a reply back to the client.
server.go:48
↓ 22 callers
Method
copy
copy returns a copy of the RR
dns.go:39
↓ 21 callers
Function
IsDuplicate
go:generate go run duplicate_generate.go IsDuplicate checks of r1 and r2 are duplicates of each other, excluding the TTL. So this means the header dat
duplicate.go:8
↓ 21 callers
Function
packStringHex
(s string, msg []byte, off int)
msg_helpers.go:362
↓ 21 callers
Function
unpackUint32
(msg []byte, off int)
msg_helpers.go:204
↓ 18 callers
Method
String
String returns the string representation of the option.
edns.go:252
↓ 18 callers
Function
unpackStringHex
(msg []byte, off, end int)
msg_helpers.go:350
↓ 17 callers
Method
Key
()
svcb.go:242
↓ 17 callers
Function
NextLabel
NextLabel returns the index of the start of the next label in the string s starting at offset. A negative offset will cause a panic. The bool end is t
labels.go:128
↓ 17 callers
Function
toBase64
(b []byte)
msg_helpers.go:169
↓ 17 callers
Function
unpackString
(msg []byte, off int)
msg_helpers.go:260
↓ 16 callers
Function
CountLabel
CountLabel counts the number of labels in the string s. s must be a syntactically valid domain name.
labels.go:88
↓ 16 callers
Function
PackDomainName
Domain names are a sequence of counted strings split at the dots. They end with a zero-length string. PackDomainName packs a domain name s into msg[of
msg.go:202
↓ 16 callers
Function
endingToString
A remainder of the rdata with embedded spaces, return the parsed string (sans the spaces) or an error
scan_rr.go:14
↓ 15 callers
Method
Dial
Dial connects to the address on the named network.
client.go:115
↓ 15 callers
Method
IsTsig
IsTsig checks if the message has a TSIG record as the last record in the additional section. It returns the TSIG record found or nil.
defaults.go:135
↓ 14 callers
Function
StringToTime
StringToTime translates the RRSIG's incep. and expir. times from string values like "20110403154150" to an 32 bit integer. It takes serial arithmetic
types.go:1642
↓ 14 callers
Method
Sum
(b []byte)
hash.go:20
↓ 14 callers
Function
isPacketConn
(c net.Conn)
client.go:20
↓ 13 callers
Function
CompareDomainName
CompareDomainName compares the names s1 and s2 and returns how many labels they have in common starting from the *right*. The comparison stops at the
labels.go:49
↓ 13 callers
Function
PrevLabel
PrevLabel returns the index of the label when starting from the right and jumping n labels to the left. The bool start is true when the start of the s
labels.go:154
↓ 13 callers
Function
RunLocalTCPServer
(laddr string, opts ...func(*Server))
server_test.go:130
↓ 13 callers
Function
packString
(s string, msg []byte, off int)
msg_helpers.go:297
↓ 12 callers
Method
Do
Do returns the value of the DO (DNSSEC OK) bit.
edns.go:193
↓ 12 callers
Function
packStringBase64
(s string, msg []byte, off int)
msg_helpers.go:337
↓ 11 callers
Function
IsFqdn
IsFqdn checks if a domain name is fully qualified.
defaults.go:279
↓ 11 callers
Method
LocalAddr
LocalAddr returns the net.Addr of the server
server.go:44
↓ 11 callers
Method
Sign
Sign signs a dns.Msg. It fills the signature with the appropriate data. The SIG record should have the SignerName, KeyTag, Algorithm, Inception and Ex
sig0.go:16
↓ 11 callers
Function
Split
Split splits a name s into its label indexes. www.miek.nl. returns []int{0, 4, 9}, www.miek.nl also returns []int{0, 4, 9}. The root name (.) returns
labels.go:107
↓ 11 callers
Function
compressionLenSearch
(c map[string]struct{}, s string, msgOff int)
msg.go:1052
↓ 11 callers
Function
fromBase64
(s []byte)
msg_helpers.go:161
↓ 11 callers
Function
sprintTxt
(txt []string)
types.go:595
↓ 11 callers
Function
unpackStringBase64
(msg []byte, off, end int)
msg_helpers.go:326
↓ 10 callers
Function
Field
Field returns the rdata field i as a string. Fields are indexed starting from 1. RR types that holds slice data, for instance the NSEC type bitmap wil
format.go:18
↓ 10 callers
Method
Generate
Generate is passed the DNS message to be signed and the partial TSIG RR. It returns the signature and nil, otherwise an error.
tsig.go:30
↓ 10 callers
Function
UnpackRR
UnpackRR unpacks msg[off:] into an RR.
msg.go:608
↓ 10 callers
Function
cmToM
cmToM takes a cm value expressed in RFC 1876 SIZE mantissa/exponent format and returns a string in m (two decimals for the cm).
types.go:853
↓ 10 callers
Function
endingToTxtSlice
A remainder of the rdata with embedded spaces, split on unquoted whitespace and return the parsed string slice or an error
scan_rr.go:36
↓ 10 callers
Function
tsigVerify
actual implementation of TsigVerify, taking the current time ('now') as a parameter for the convenience of tests.
tsig.go:231
↓ 9 callers
Method
SetEdns0
SetEdns0 appends a EDNS0 OPT RR to the message. TSIG should always the last RR in a message.
defaults.go:121
↓ 9 callers
Method
SetIncludeAllowed
SetIncludeAllowed controls whether $INCLUDE directives are allowed. $INCLUDE directives are not supported by default. The $INCLUDE directive will ope
scan.go:232
↓ 9 callers
Method
String
unpack sets the value.
svcb.go:245
↓ 9 callers
Function
TimeToString
TimeToString translates the RRSIG's incep. and expir. times to the string representation used when printing the record. It takes serial arithmetic (RF
types.go:1630
↓ 9 callers
Method
match
(q string, t uint16)
serve_mux.go:31
↓ 8 callers
Function
IsSubDomain
IsSubDomain checks if child is indeed a child of the parent. If child and parent are the same domain true is returned as well.
defaults.go:261
↓ 8 callers
Method
SetDo
SetDo sets the DO (DNSSEC OK) bit. If we pass an argument, set the DO bit to that value. It is possible to pass 2 or more arguments, but they will be
edns.go:200
↓ 8 callers
Function
packDataNsec
(bitmap []uint16, msg []byte, off int)
msg_helpers.go:545
↓ 7 callers
Method
Co
Co returns the value of the CO (Compact Answers OK) bit.
edns.go:213
↓ 7 callers
Method
ExtendedRcode
ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL).
edns.go:171
↓ 7 callers
Method
Handle
Handle adds a handler to the ServeMux for pattern.
serve_mux.go:60
↓ 7 callers
Method
IsEdns0
IsEdns0 checks if the message has a EDNS0 (OPT) record, any EDNS0 record in the additional section will do. It returns the OPT record found or nil.
defaults.go:147
↓ 7 callers
Method
ListenAndServe
ListenAndServe starts a nameserver on the configured address in *Server.
server.go:309
↓ 7 callers
Method
NewPrivateKey
NewPrivateKey returns a PrivateKey by parsing the string s. s should be in the same form of the BIND private key files.
dnssec_keyscan.go:17
↓ 7 callers
Method
Parse
Parse parses the Rdata of the private RR.
privaterr.go:12
↓ 7 callers
Method
PrivateKeyString
PrivateKeyString converts a PrivateKey to a string. This string has the same format as the private-key-file of BIND9 (Private-key-format: v1.3). It ne
dnssec_privkey.go:20
↓ 7 callers
Method
SetCo
SetCo sets the CO (Compact Answers OK) bit. If we pass an argument, set the CO bit to that value. It is possible to pass 2 or more arguments, but they
edns.go:220
↓ 7 callers
Method
ToDS
ToDS converts a DNSKEY record to a DS record.
dnssec.go:173
↓ 7 callers
Method
Truncate
Truncate ensures the reply message will fit into the requested buffer size by removing records that exceed the requested size. It will first check if
msg_truncate.go:29
next →
1–100 of 1,687, ranked by callers