Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS: Add DnsRecordType definitions for SVCB and HTTPS #13859

Merged
merged 1 commit into from Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -303,6 +303,18 @@ public class DnsRecordType implements Comparable<DnsRecordType> {
*/
public static final DnsRecordType DLV = new DnsRecordType(0x8001, "DLV");

/**
* Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records).
* See <a href="https://www.rfc-editor.org/rfc/rfc9460.html#section-14.1">RFC9460 SVCB RR Type</a>.
*/
public static final DnsRecordType SVCB = new DnsRecordType(0x0040, "SVCB");

/**
* Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records).
* See <a href="https://www.rfc-editor.org/rfc/rfc9460.html#section-14.2">RFC9460 HTTPS RR Type</a>.
*/
public static final DnsRecordType HTTPS = new DnsRecordType(0x0041, "HTTPS");

private static final Map<String, DnsRecordType> BY_NAME = new HashMap<String, DnsRecordType>();
private static final IntObjectHashMap<DnsRecordType> BY_TYPE = new IntObjectHashMap<DnsRecordType>();
private static final String EXPECTED;
Expand All @@ -311,7 +323,7 @@ public class DnsRecordType implements Comparable<DnsRecordType> {
DnsRecordType[] all = {
A, NS, CNAME, SOA, PTR, MX, TXT, RP, AFSDB, SIG, KEY, AAAA, LOC, SRV, NAPTR, KX, CERT, DNAME, OPT, APL,
DS, SSHFP, IPSECKEY, RRSIG, NSEC, DNSKEY, DHCID, NSEC3, NSEC3PARAM, TLSA, HIP, SPF, TKEY, TSIG, IXFR,
AXFR, ANY, CAA, TA, DLV
AXFR, ANY, CAA, TA, DLV, SVCB, HTTPS
};

final StringBuilder expected = new StringBuilder(512);
Expand Down