1 #ifndef MINIX_NET_LWIP_NDEV_H 2 #define MINIX_NET_LWIP_NDEV_H 3 4 /* The maximum supported number of network device drivers. */ 5 #define NR_NDEV 8 6 7 typedef uint32_t ndev_id_t; 8 9 struct ndev_hwaddr { 10 uint8_t nhwa_addr[NDEV_HWADDR_MAX]; 11 }; 12 13 struct ndev_conf { 14 uint32_t nconf_set; /* fields to set (NDEV_SET_) */ 15 uint32_t nconf_mode; /* desired mode (NDEV_MODE_) */ 16 struct ndev_hwaddr *nconf_mclist; /* multicast list pointer */ 17 size_t nconf_mccount; /* multicast list count */ 18 uint32_t nconf_caps; /* capabilities (NDEV_CAP_) */ 19 uint32_t nconf_flags; /* flags to set (NDEV_FLAG_) */ 20 uint32_t nconf_media; /* media selection (IFM_) */ 21 struct ndev_hwaddr nconf_hwaddr; /* desired hardware address */ 22 }; 23 24 void ndev_init(void); 25 void ndev_check(void); 26 void ndev_process(const message * m_ptr, int ipc_status); 27 28 int ndev_conf(ndev_id_t id, const struct ndev_conf * nconf); 29 int ndev_send(ndev_id_t id, const struct pbuf * pbuf); 30 int ndev_can_recv(ndev_id_t id); 31 int ndev_recv(ndev_id_t id, struct pbuf * pbuf); 32 33 #endif /* !MINIX_NET_LWIP_NDEV_H */ 34