Implemented DNS on blockchain. Beautified a lot of code, fixed some things.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use crate::dns::protocol::{QueryType, DnsPacket};
|
||||
|
||||
pub trait DnsFilter {
|
||||
fn lookup(&self, qname: &str, qtype: QueryType) -> Option<DnsPacket>;
|
||||
}
|
||||
|
||||
pub struct DummyFilter {
|
||||
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl DnsFilter for DummyFilter {
|
||||
fn lookup(&self, qname: &str, qtype: QueryType) -> Option<DnsPacket> {
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user