Skip to content

Commit

Permalink
Implementation of DNAME in rtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Litr0 committed Oct 31, 2023
1 parent 30562ca commit 486b4ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/message/type_rtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub enum Rtype {
WKS,
MX,
TXT,
DNAME,
UNKNOWN(u16),
}

Expand All @@ -29,6 +30,7 @@ impl Rtype{
Rtype::MINFO => 14,
Rtype::MX => 15,
Rtype::TXT => 16,
Rtype::DNAME => 39,
Rtype::UNKNOWN(val) => val
}
}
Expand All @@ -45,6 +47,7 @@ impl Rtype{
Rtype::MINFO => String::from("MINFO"),
Rtype::MX => String::from("MX"),
Rtype::TXT => String::from("TXT"),
Rtype::DNAME => String::from("DNAME"),
Rtype::UNKNOWN(_val) => String::from("UNKNOWN TYPE")
}
}
Expand All @@ -62,6 +65,7 @@ impl Rtype{
14 => Rtype::MINFO,
15 => Rtype::MX,
16 => Rtype::TXT,
39 => Rtype::DNAME,
_ => Rtype::UNKNOWN(val),
}
}
Expand All @@ -79,6 +83,7 @@ impl Rtype{
"MINFO" => Rtype::MINFO,
"MX" => Rtype::MX,
"TXT" => Rtype::TXT,
"DNAME" => Rtype::DNAME,
_ => Rtype::UNKNOWN(99),
}
}
Expand Down

0 comments on commit 486b4ad

Please sign in to comment.