#![no_std]
#![cfg_attr(doc, feature(doc_cfg))]
extern crate alloc;
#[cfg(feature = "fxmac")]
pub mod fxmac;
#[cfg(feature = "ixgbe")]
pub mod ixgbe;
#[doc(no_inline)]
pub use axdriver_base::{BaseDriverOps, DevError, DevResult, DeviceType};
mod net_buf;
pub use self::net_buf::{NetBuf, NetBufBox, NetBufPool, NetBufPtr};
pub struct EthernetAddress(pub [u8; 6]);
pub trait NetDriverOps: BaseDriverOps {
fn mac_address(&self) -> EthernetAddress;
fn can_transmit(&self) -> bool;
fn can_receive(&self) -> bool;
fn rx_queue_size(&self) -> usize;
fn tx_queue_size(&self) -> usize;
fn recycle_rx_buffer(&mut self, rx_buf: NetBufPtr) -> DevResult;
fn recycle_tx_buffers(&mut self) -> DevResult;
fn transmit(&mut self, tx_buf: NetBufPtr) -> DevResult;
fn receive(&mut self) -> DevResult<NetBufPtr>;
fn alloc_tx_buffer(&mut self, size: usize) -> DevResult<NetBufPtr>;
}