w5500-dns

DNS client for the [Wiznet W5500] SPI internet offload chip.

Warning

Please proceed with caution, and review the code before use in a production environment.

This code was developed for one-off hobby projects.

Limitations

Example

```rust use w5500_dns::{hl::block, ll::Sn, servers, Client as DnsClient, Hostname, Response};

const DNSSOCKET: Sn = Sn::Sn3; const DNSSRC_PORT: u16 = 45917;

let mut dnsclient: DnsClient = DnsClient::new(DNSSOCKET, DNSSRCPORT, servers::CLOUDFLARE, random_number); let hostname: Hostname = Hostname::new("docs.rs").expect("hostname is invalid");

let mut hostname_buffer: [u8; 16] = [0; 16];

let queryid: u16 = dnsclient.aquestion(&mut w5500, &hostname)?; let mut response: Response<_> = block!(dnsclient.response(&mut w5500, &mut hostnamebuffer, queryid))?;

while let Some(answer) = response.next_answer()? { println!("name: {:?}", answer.name); println!("TTL: {}", answer.ttl); println!("IP: {:?}", answer.rdata); } response.done()?; ```

Relevant Specifications

Feature Flags

All features are disabled by default.