1#![cfg_attr(not(test), no_std)]
2
3#![deny(unsafe_code)]
5
6pub mod tcp;
7pub mod dns;
9pub mod addr;
10
11use tcp::TcpStack;
12
13use core::fmt::Debug;
14use crate::tcp::TcpError;
15use crate::dns::{DnsError, Dns};
16
17pub trait IpNetworkDriver {
19 type TcpSocket;
20 type TcpError: Into<TcpError> + Debug;
21
22 type DnsError: Into<DnsError> + Debug;
23
24 fn tcp(&self) -> &dyn TcpStack<TcpSocket=Self::TcpSocket, Error=Self::TcpError>;
28 fn dns(&self) -> &dyn Dns<Error=Self::DnsError>;
30}
31