📄 devtable.hhh
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/09/20 10:22:07 $* $Source: M:/psisrc/stack/incl/rcs/devtable.hhh $* $Revision: 1.14 $*************************************************************************** File Description: Fusion Network device table configuration header file***************************************************************************//************************************************************************** * * Fusion network device table. * * There is one entry for each device recognized by the Fusion stack. * The first few entries are generic device entries for some well known * for which Fusion provides one or more of the entry point functions. * * The last entry is a template entry which can be used as described * above the entry. * */BEGIN_FUSION_DEVICE_TABLE#ifdef PPP_PROTOCOL /* Generic PPP entry - only compiles when PPP_PROTOCOL is defined. If you have multiple PPP interfaces you may copy this entry and add additional entries, each with a unique FNS_STR_DEV_NAME field. Normally you won't have to modify any other fields in PPP entries. See the PPP porting guide for more information. */ BEGIN_FUSION_DEVICE_TABLE_ENTRY FNS_STR_DEV_NAME("ppp0") FNS_U16_DEV_MINOR_ID(0) FNS_U16_DEV_XFLAGS(0) FNS_U32_DEV_OEM_FIELD1(0) FNS_U32_DEV_OEM_FIELD2(0) FNS_U32_DEV_OEM_FIELD3(0) FNS_U32_DEV_OEM_FIELD4(0) FNS_U16_DEV_ADDRESS_FAMILY(AF_PPP) FNS_FPTR_DEV_INIT(ppp_init) FNS_FPTR_DEV_UPDOWN(ppp_updown) FNS_FPTR_DEV_SEND(ppp_scomm) FNS_FPTR_DEV_TX_START(ppp_start) FNS_FPTR_DEV_IOCTL(noent_ioctl) END_FUSION_DEVICE_TABLE_ENTRY#endif#ifdef ETHER_PROTOCOL /* Generic Ethernet entry for Ethernet interface. You will need to replace the oem_xxx driver entry points with the actual function names of the entry points to your driver. If you have multiple Ethernet interfaces you may copy this entry and add addtional entries, each with a unique FNS_STR_DEV_NAME field. See the porting guide for more information. Fusion already provides the en_scomm function which among other things creates the Ethernet packet protocol header so that when your oem_ether_start function is called the packet already has the Ethernet header attached. */ BEGIN_FUSION_DEVICE_TABLE_ENTRY FNS_STR_DEV_NAME("eth0") FNS_U16_DEV_MINOR_ID(0) FNS_U16_DEV_XFLAGS(0) FNS_U32_DEV_OEM_FIELD1(0) FNS_U32_DEV_OEM_FIELD2(0) FNS_U32_DEV_OEM_FIELD3(0) FNS_U32_DEV_OEM_FIELD4(0) FNS_U16_DEV_ADDRESS_FAMILY(AF_ETHER) FNS_FPTR_DEV_INIT(oem_ether_init) FNS_FPTR_DEV_UPDOWN(oem_ether_updown) FNS_FPTR_DEV_SEND(en_scomm) FNS_FPTR_DEV_TX_START(oem_ether_start) FNS_FPTR_DEV_IOCTL(oem_ether_ioctl) END_FUSION_DEVICE_TABLE_ENTRY #endif#if 0 /* This is just an example and provides and explanation of each of the fields in a Fusion device table entry. See the porting guide for more information. */ BEGIN_FUSION_DEVICE_TABLE_ENTRY FNS_STR_DEV_NAME(NIL_DEV_NAME) /* String name of device, for example, "eth0" */ FNS_U16_DEV_MINOR_ID(0) /* Device minor id for OEM driver use with drivers that support multiple links/ports. Note that with such a driver, one FNS_DEVICE_TABLE_ENTRY is required for each link, but each entry will normally be identical except for the FNS_STR_DEV_NAME, which is REQUIRED to be unique by Fusion, the FNS_U16_DEV_MINOR_ID (ignored by Fusion but recommended to be unique), and any of the FNS_U32_DEV_OEM_FIELD1-4 (ignored by Fusion but available for use by driver code). */ FNS_U16_DEV_XFLAGS(0) /* Extended flags - Flags which can be used to configure additional operational parameters such as multicast support. See the porting guide for more info. */ FNS_U32_DEV_OEM_FIELD1(0) /* For OEM use */ FNS_U32_DEV_OEM_FIELD2(0) /* " " */ FNS_U32_DEV_OEM_FIELD3(0) /* " " */ FNS_U32_DEV_OEM_FIELD4(0) /* " " */ FNS_U16_DEV_ADDRESS_FAMILY(AF_UNSPEC) /* Link layer address family. Fusion recognizes the following families: AF_PPP - Point-To-Point Protocol AF_ETHER - Ethernet AF_CMAN - Serial Channel manager AF_IMPLINK - IMP "host at IMP" addresses AF_SLIP - SLIP link layers AF_DDN - DDN X.25 AF_TRN - Token Ring Support for additional families may be added but will require customization of the stack. */ /* The following device-driver entry point functions must conform to the expected Fusion prototype. See the definitions of noent_init etc. in netdev.h for prototypes, and also the porting guide for more information. */ FNS_FPTR_DEV_INIT(noent_init) /* Device inititialization entry point */ FNS_FPTR_DEV_UPDOWN(noent_updown) /* Device up/down entry point */ FNS_FPTR_DEV_SEND(noent_send) /* Device transmit funtion */ FNS_FPTR_DEV_TX_START(noent_start) /* Device start transmission entry point */ FNS_FPTR_DEV_IOCTL(noent_ioctl) /* Device I/O control entry point */ END_FUSION_DEVICE_TABLE_ENTRY#endifEND_FUSION_DEVICE_TABLE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -