⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nif.h

📁 Freescale MCF5445evb 参考测试代码
💻 H
字号:
/* * File:        nif.h * Purpose:     Definition of a Network InterFace. * * Notes: * */#ifndef _NIF_H#define _NIF_H/********************************************************************//*  * Maximum number of supported protoocls: IP, ARP, RARP  */#define MAX_SUP_PROTO   (3)typedef struct NIF_t{    ETH_ADDR    hwa;        /* ethernet card hardware address */    ETH_ADDR    broadcast;  /* broadcast address */    int         mtu;        /* hardware maximum transmission unit */    int         ch;         /* ethernet channel associated with this NIF */    void        (*txcallback)(NBUF *); /* Optional callback function                                          following Tx interrupt */    struct SUP_PROTO_t    {        uint16  protocol;        void    (*handler)(struct NIF_t *, NBUF *);        void    *info;    } protocol[MAX_SUP_PROTO];    unsigned short  num_protocol;} NIF;/* * Give everyone access to the two NIFs */extern NIF nif[];/********************************************************************/NIF *nif_init (NIF *);intnif_protocol_exist (NIF *, uint16);voidnif_protocol_handler (NIF *, uint16, NBUF *);void *nif_get_protocol_info (NIF *, uint16);intnif_bind_protocol (NIF *, uint16, void (*)(NIF *, NBUF *), void *);voidnif_set_hwa (NIF *, uint8*);voidnif_set_ch (NIF *, int);voidnif_set_txcallback (NIF *, void (*)(NBUF *));/********************************************************************/#endif /* _NIF_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -