make records fields public
This commit is contained in:
parent
adb00b77b6
commit
5519e7faa8
@ -16,55 +16,55 @@ pub struct A {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NS {
|
pub struct NS {
|
||||||
nsdname: DnsCompressedName,
|
pub nsdname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MD {
|
pub struct MD {
|
||||||
madname: DnsCompressedName,
|
pub madname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MF {
|
pub struct MF {
|
||||||
madname: DnsCompressedName,
|
pub madname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct CNAME {
|
pub struct CNAME {
|
||||||
cname: DnsCompressedName,
|
pub cname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct SOA {
|
pub struct SOA {
|
||||||
mname: DnsCompressedName,
|
pub mname: DnsCompressedName,
|
||||||
rname: DnsCompressedName,
|
pub rname: DnsCompressedName,
|
||||||
serial: u32,
|
pub serial: u32,
|
||||||
refresh: u32,
|
pub refresh: u32,
|
||||||
retry: u32,
|
pub retry: u32,
|
||||||
expire: u32,
|
pub expire: u32,
|
||||||
minimum: u32,
|
pub minimum: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MB {
|
pub struct MB {
|
||||||
madname: DnsCompressedName,
|
pub madname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MG {
|
pub struct MG {
|
||||||
mgmname: DnsCompressedName,
|
pub mgmname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MR {
|
pub struct MR {
|
||||||
newname: DnsCompressedName,
|
pub newname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// not allowed in zone files anyway, i.e. no text representation.
|
// not allowed in zone files anyway, i.e. no text representation.
|
||||||
@ -80,42 +80,42 @@ pub struct MR {
|
|||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
// #[RRClass(IN)]
|
// #[RRClass(IN)]
|
||||||
// pub struct WKS {
|
// pub struct WKS {
|
||||||
// address: Ipv4Addr,
|
// pub address: Ipv4Addr,
|
||||||
// protocol: u8,
|
// pub protocol: u8,
|
||||||
// bitmap: ..., // remaining bytes
|
// pub bitmap: ..., // remaining bytes
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct PTR {
|
pub struct PTR {
|
||||||
ptrdname: DnsCompressedName,
|
pub ptrdname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct HINFO {
|
pub struct HINFO {
|
||||||
cpu: ShortText,
|
pub cpu: ShortText,
|
||||||
os: ShortText,
|
pub os: ShortText,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MINFO {
|
pub struct MINFO {
|
||||||
rmailbx: DnsCompressedName,
|
pub rmailbx: DnsCompressedName,
|
||||||
emailbx: DnsCompressedName,
|
pub emailbx: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct MX {
|
pub struct MX {
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
mxname: DnsCompressedName,
|
pub mxname: DnsCompressedName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct TXT {
|
pub struct TXT {
|
||||||
text: LongText,
|
pub text: LongText,
|
||||||
}
|
}
|
||||||
|
|
||||||
// end of RFC 1035: no DnsCompressedName below!
|
// end of RFC 1035: no DnsCompressedName below!
|
||||||
@ -123,15 +123,15 @@ pub struct TXT {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct RP {
|
pub struct RP {
|
||||||
mbox: DnsCanonicalName,
|
pub mbox: DnsCanonicalName,
|
||||||
txt: DnsCanonicalName,
|
pub txt: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct AFSDB {
|
pub struct AFSDB {
|
||||||
subtype: u16,
|
pub subtype: u16,
|
||||||
hostname: DnsCanonicalName,
|
pub hostname: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc1183#section-3.1 says "its format in
|
// https://tools.ietf.org/html/rfc1183#section-3.1 says "its format in
|
||||||
@ -146,20 +146,20 @@ pub struct AFSDB {
|
|||||||
//
|
//
|
||||||
// #[RRClass(ANY)]
|
// #[RRClass(ANY)]
|
||||||
// pub struct X25 {
|
// pub struct X25 {
|
||||||
// psdn_address: ShortText,
|
// pub psdn_address: ShortText,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #[RRClass(ANY)]
|
// #[RRClass(ANY)]
|
||||||
// pub struct ISDN {
|
// pub struct ISDN {
|
||||||
// isdn_address: ShortText,
|
// pub isdn_address: ShortText,
|
||||||
// subaddress: Option<ShortText>,
|
// pub subaddress: Option<ShortText>,
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct RT {
|
pub struct RT {
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
intermediate: DnsCanonicalName,
|
pub intermediate: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[RRClass(ANY)]
|
// #[RRClass(ANY)]
|
||||||
@ -170,55 +170,55 @@ pub struct RT {
|
|||||||
#[RRTypeName = "NSAP-PTR"]
|
#[RRTypeName = "NSAP-PTR"]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NSAP_PTR {
|
pub struct NSAP_PTR {
|
||||||
owner: DnsCanonicalName,
|
pub owner: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct SIG {
|
pub struct SIG {
|
||||||
rr_type: Type,
|
pub rr_type: Type,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
labels: u8,
|
pub labels: u8,
|
||||||
// RFC says this can be omitted in text form if it is the same as
|
// RFC says this can be omitted in text form if it is the same as
|
||||||
// the TTL on the SIG record. not supported to be omitted here
|
// the TTL on the SIG record. not supported to be omitted here
|
||||||
// (TODO?).
|
// (TODO?).
|
||||||
original_ttl: OptionalTTL,
|
pub original_ttl: OptionalTTL,
|
||||||
signature_expiration: TimeStrict,
|
pub signature_expiration: TimeStrict,
|
||||||
signature_inception: TimeStrict,
|
pub signature_inception: TimeStrict,
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
signers_name: DnsCanonicalName,
|
pub signers_name: DnsCanonicalName,
|
||||||
signature: Base64RemainingBlob,
|
pub signature: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct KEY {
|
pub struct KEY {
|
||||||
flags: u16,
|
pub flags: u16,
|
||||||
protocol: u8,
|
pub protocol: u8,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
public_key: Base64RemainingBlob,
|
pub public_key: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)]
|
#[RRClass(IN)]
|
||||||
pub struct PX {
|
pub struct PX {
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
map822: DnsCanonicalName,
|
pub map822: DnsCanonicalName,
|
||||||
mapx400: DnsCanonicalName,
|
pub mapx400: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)] // not restricted in rfc 1712
|
#[RRClass(ANY)] // not restricted in rfc 1712
|
||||||
pub struct GPOS {
|
pub struct GPOS {
|
||||||
longitude: ShortText,
|
pub longitude: ShortText,
|
||||||
latitude: ShortText,
|
pub latitude: ShortText,
|
||||||
altitude: ShortText,
|
pub altitude: ShortText,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)]
|
#[RRClass(IN)]
|
||||||
pub struct AAAA {
|
pub struct AAAA {
|
||||||
addr: Ipv6Addr,
|
pub addr: Ipv6Addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use super::weird_structs::LOC;
|
pub use super::weird_structs::LOC;
|
||||||
@ -226,8 +226,8 @@ pub use super::weird_structs::LOC;
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NXT {
|
pub struct NXT {
|
||||||
next: DnsCanonicalName,
|
pub next: DnsCanonicalName,
|
||||||
types: NxtTypeBitmap,
|
pub types: NxtTypeBitmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -241,10 +241,10 @@ pub struct NXT {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)]
|
#[RRClass(IN)]
|
||||||
pub struct SRV {
|
pub struct SRV {
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
weight: u16,
|
pub weight: u16,
|
||||||
port: u16,
|
pub port: u16,
|
||||||
target: DnsCanonicalName,
|
pub target: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -254,28 +254,28 @@ pub struct SRV {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NAPTR {
|
pub struct NAPTR {
|
||||||
order: u16,
|
pub order: u16,
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
flags: ShortText,
|
pub flags: ShortText,
|
||||||
service: ShortText,
|
pub service: ShortText,
|
||||||
regexp: ShortText,
|
pub regexp: ShortText,
|
||||||
replacement: DnsCanonicalName,
|
pub replacement: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)]
|
#[RRClass(IN)]
|
||||||
pub struct KX {
|
pub struct KX {
|
||||||
preference: u16,
|
pub preference: u16,
|
||||||
exchanger: DnsCanonicalName,
|
pub exchanger: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
// #[RRClass(?)]
|
// #[RRClass(?)]
|
||||||
pub struct CERT {
|
pub struct CERT {
|
||||||
cert_type: u16,
|
pub cert_type: u16,
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
certificate: Base64RemainingBlob,
|
pub certificate: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use super::weird_structs::A6;
|
pub use super::weird_structs::A6;
|
||||||
@ -283,7 +283,7 @@ pub use super::weird_structs::A6;
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct DNAME {
|
pub struct DNAME {
|
||||||
target: DnsCanonicalName,
|
pub target: DnsCanonicalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -301,20 +301,20 @@ pub struct DNAME {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct DS {
|
pub struct DS {
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
digest_type: u8,
|
pub digest_type: u8,
|
||||||
digest: HexRemainingBlob,
|
pub digest: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
// #[RRClass(?)]
|
// #[RRClass(?)]
|
||||||
pub struct SSHFP {
|
pub struct SSHFP {
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
fingerprint_type: u8,
|
pub fingerprint_type: u8,
|
||||||
// RFC 4255 doesn't specify whether whitespace is allowed.
|
// RFC 4255 doesn't specify whether whitespace is allowed.
|
||||||
// `HexRemainingBlob` allows whitespace.
|
// `HexRemainingBlob` allows whitespace.
|
||||||
fingerprint: HexRemainingBlob,
|
pub fingerprint: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use super::weird_structs::IPSECKEY;
|
pub use super::weird_structs::IPSECKEY;
|
||||||
@ -322,77 +322,77 @@ pub use super::weird_structs::IPSECKEY;
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct RRSIG {
|
pub struct RRSIG {
|
||||||
rr_type: Type,
|
pub rr_type: Type,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
labels: u8,
|
pub labels: u8,
|
||||||
original_ttl: u32,
|
pub original_ttl: u32,
|
||||||
signature_expiration: Time,
|
pub signature_expiration: Time,
|
||||||
signature_inception: Time,
|
pub signature_inception: Time,
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
signers_name: DnsCanonicalName,
|
pub signers_name: DnsCanonicalName,
|
||||||
signature: Base64RemainingBlob,
|
pub signature: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NSEC {
|
pub struct NSEC {
|
||||||
next: DnsName, // RFC 6840 says not canonic (updates RFC 4034)
|
pub next: DnsName, // RFC 6840 says not canonic (updates RFC 4034)
|
||||||
types: NsecTypeBitmap,
|
pub types: NsecTypeBitmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct DNSKEY {
|
pub struct DNSKEY {
|
||||||
flags: u16,
|
pub flags: u16,
|
||||||
protocol: u8,
|
pub protocol: u8,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
public_key: Base64RemainingBlob,
|
pub public_key: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)]
|
#[RRClass(IN)]
|
||||||
pub struct DHCID {
|
pub struct DHCID {
|
||||||
content: Base64RemainingBlob,
|
pub content: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NSEC3 {
|
pub struct NSEC3 {
|
||||||
hash_algorithm: u8,
|
pub hash_algorithm: u8,
|
||||||
flags: u8,
|
pub flags: u8,
|
||||||
iterations: u16,
|
pub iterations: u16,
|
||||||
salt: HexShortBlob,
|
pub salt: HexShortBlob,
|
||||||
next_hashed: NextHashedOwnerName,
|
pub next_hashed: NextHashedOwnerName,
|
||||||
types: NsecTypeBitmap,
|
pub types: NsecTypeBitmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NSEC3PARAM {
|
pub struct NSEC3PARAM {
|
||||||
hash_algorithm: u8,
|
pub hash_algorithm: u8,
|
||||||
flags: u8,
|
pub flags: u8,
|
||||||
iterations: u16,
|
pub iterations: u16,
|
||||||
salt: HexShortBlob,
|
pub salt: HexShortBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct TLSA {
|
pub struct TLSA {
|
||||||
// TODO: support acronyms from https://tools.ietf.org/html/rfc7218
|
// TODO: support acronyms from https://tools.ietf.org/html/rfc7218
|
||||||
cert_usage: u8,
|
pub cert_usage: u8,
|
||||||
selector: u8,
|
pub selector: u8,
|
||||||
matching_type: u8,
|
pub matching_type: u8,
|
||||||
data: HexRemainingBlob,
|
pub data: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct SMIMEA {
|
pub struct SMIMEA {
|
||||||
// TODO: support acronyms from https://tools.ietf.org/html/rfc7218
|
// TODO: support acronyms from https://tools.ietf.org/html/rfc7218
|
||||||
cert_usage: u8,
|
pub cert_usage: u8,
|
||||||
selector: u8,
|
pub selector: u8,
|
||||||
matching_type: u8,
|
pub matching_type: u8,
|
||||||
data: HexRemainingBlob,
|
pub data: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -402,17 +402,17 @@ pub struct SMIMEA {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct NINFO {
|
pub struct NINFO {
|
||||||
text: LongText,
|
pub text: LongText,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct RKEY {
|
pub struct RKEY {
|
||||||
flags: u16,
|
pub flags: u16,
|
||||||
protocol: u8,
|
pub protocol: u8,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
public_key: Base64RemainingBlob,
|
pub public_key: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -422,25 +422,25 @@ pub struct RKEY {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct CDS {
|
pub struct CDS {
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
digest_type: u8,
|
pub digest_type: u8,
|
||||||
digest: HexRemainingBlob,
|
pub digest: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct CDNSKEY {
|
pub struct CDNSKEY {
|
||||||
flags: u16,
|
pub flags: u16,
|
||||||
protocol: u8,
|
pub protocol: u8,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
public_key: Base64RemainingBlob,
|
pub public_key: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct OPENPGPKEY {
|
pub struct OPENPGPKEY {
|
||||||
public_key: Base64RemainingBlob,
|
pub public_key: Base64RemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -450,7 +450,7 @@ pub struct OPENPGPKEY {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
// #[RRClass(?)]
|
// #[RRClass(?)]
|
||||||
pub struct SPF {
|
pub struct SPF {
|
||||||
text: LongText,
|
pub text: LongText,
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
// #[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
@ -488,37 +488,37 @@ pub struct SPF {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct EUI48 {
|
pub struct EUI48 {
|
||||||
addr: EUI48Addr,
|
pub addr: EUI48Addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct EUI64 {
|
pub struct EUI64 {
|
||||||
addr: EUI64Addr
|
pub addr: EUI64Addr
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct TKEY {
|
pub struct TKEY {
|
||||||
algorithm: DnsName,
|
pub algorithm: DnsName,
|
||||||
inception: u32,
|
pub inception: u32,
|
||||||
expiration: u32,
|
pub expiration: u32,
|
||||||
mode: u16,
|
pub mode: u16,
|
||||||
error: u16,
|
pub error: u16,
|
||||||
key: Base64LongBlob,
|
pub key: Base64LongBlob,
|
||||||
other: Base64LongBlob,
|
pub other: Base64LongBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct TSIG {
|
pub struct TSIG {
|
||||||
algorithm: DnsName,
|
pub algorithm: DnsName,
|
||||||
signed: Time48,
|
pub signed: Time48,
|
||||||
fudge: u16,
|
pub fudge: u16,
|
||||||
mac: Base64LongBlob,
|
pub mac: Base64LongBlob,
|
||||||
original_id: u16,
|
pub original_id: u16,
|
||||||
error: u16,
|
pub error: u16,
|
||||||
other: Base64LongBlob,
|
pub other: Base64LongBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
// QTYPEs: IXFR, AXFR, MAILB, MAILA, ANY
|
// QTYPEs: IXFR, AXFR, MAILB, MAILA, ANY
|
||||||
@ -526,17 +526,17 @@ pub struct TSIG {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct URI {
|
pub struct URI {
|
||||||
priority: u16,
|
pub priority: u16,
|
||||||
weight: u16,
|
pub weight: u16,
|
||||||
target: UriText,
|
pub target: UriText,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
// #[RRClass(?)]
|
// #[RRClass(?)]
|
||||||
pub struct CAA {
|
pub struct CAA {
|
||||||
flags: u8,
|
pub flags: u8,
|
||||||
tag: UnquotedShortText,
|
pub tag: UnquotedShortText,
|
||||||
value: RemainingText,
|
pub value: RemainingText,
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub struct AVC;
|
// pub struct AVC;
|
||||||
@ -545,15 +545,15 @@ pub struct CAA {
|
|||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(ANY)]
|
#[RRClass(ANY)]
|
||||||
pub struct DLV {
|
pub struct DLV {
|
||||||
key_tag: u16,
|
pub key_tag: u16,
|
||||||
algorithm: u8,
|
pub algorithm: u8,
|
||||||
digest_type: u8,
|
pub digest_type: u8,
|
||||||
digest: HexRemainingBlob,
|
pub digest: HexRemainingBlob,
|
||||||
}
|
}
|
||||||
|
|
||||||
// powerdns
|
// powerdns
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
#[derive(Clone, PartialEq, Eq, Debug, DnsPacketData, DnsTextData, RRData)]
|
||||||
#[RRClass(IN)] // used to lookup A and AAAA - only useful in IN
|
#[RRClass(IN)] // used to lookup A and AAAA - only useful in IN
|
||||||
pub struct ALIAS {
|
pub struct ALIAS {
|
||||||
content: DnsName,
|
pub content: DnsName,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user