Skip to content

Commit d912518

Browse files
frcrothmiekg
andauthored
Add RESINFO rr (#1641)
* Add RESINFO rr * Update scan_rr.go --------- Co-authored-by: Miek Gieben <miek@miek.nl>
1 parent 8d0c412 commit d912518

File tree

6 files changed

+72
-0
lines changed

6 files changed

+72
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
194194
* 9461 - Service Binding Mapping for DNS Servers
195195
* 9462 - Discovery of Designated Resolvers
196196
* 9460 - SVCB and HTTPS Records
197+
* 9606 - DNS Resolver Information
197198
* Draft - Compact Denial of Existence in DNSSEC
198199

199200
## Loosely Based Upon

scan_rr.go

+10
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,16 @@ func (rr *NINFO) parse(c *zlexer, o string) *ParseError {
16201620
return nil
16211621
}
16221622

1623+
// Uses the same format as TXT
1624+
func (rr *RESINFO) parse(c *zlexer, o string) *ParseError {
1625+
s, e := endingToTxtSlice(c, "bad RESINFO Resinfo")
1626+
if e != nil {
1627+
return e
1628+
}
1629+
rr.Txt = s
1630+
return nil
1631+
}
1632+
16231633
func (rr *URI) parse(c *zlexer, o string) *ParseError {
16241634
l, _ := c.Next()
16251635
i, e := strconv.ParseUint(l.token, 10, 16)

types.go

+10
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const (
101101
TypeCAA uint16 = 257
102102
TypeAVC uint16 = 258
103103
TypeAMTRELAY uint16 = 260
104+
TypeRESINFO uint16 = 261
104105

105106
TypeTKEY uint16 = 249
106107
TypeTSIG uint16 = 250
@@ -1508,6 +1509,15 @@ func (rr *ZONEMD) String() string {
15081509
" " + rr.Digest
15091510
}
15101511

1512+
// RESINFO RR. See RFC 9606.
1513+
1514+
type RESINFO struct {
1515+
Hdr RR_Header
1516+
Txt []string `dns:"txt"`
1517+
}
1518+
1519+
func (rr *RESINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.Txt) }
1520+
15111521
// APL RR. See RFC 3123.
15121522
type APL struct {
15131523
Hdr RR_Header

zduplicate.go

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zmsg.go

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ztypes.go

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)