📄 dsu.h
字号:
/** 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:19:17 $* $Source: M:/psisrc/stack/incl/rcs/dsu.h $* $Revision: 1.9 $*************************************************************************** File Description: Network device specific structures and their unions***************************************************************************/#ifndef _DSU_#define _DSU_#include "config.h"#include "ccdep.h"#define i596 i32#ifdef NE2K_DEVICE /* Novell Ethernet std NE2000 controller */typedef struct ne2k { char * name; /* inferred vendor designation */ unsigned char tx_start_page; /* tx start page */ unsigned char rx_start_page; /* rx start page */ unsigned char stop_page; /* end of buffer area */ unsigned char next_packet;} ne2k;#else#define ne2k i32#endif#ifdef XEEA_DEVICE/* Specifics for Excelan EXOS Ethernet controller series */typedef struct xeea { u16 xeea_mlbx; /* Excelan type mailbox */ i16 xeea_post_cnt; /* number of receive buffers available */} xeea;#else#define xeea i32#endif#ifdef MEIA_DEVICE/* Multibus Ethernet Interlan NI3010A controller specifics */typedef struct meia { char meia_ie_reg; /* copy of interrupt enable register setting */ char meia_c_reg; /* copy of last issued command */ u16 meia_pad1; struct m * meia_mp; /* where packet was dma_ed into the heap */ struct en * meia_dma_enp; /* for devices with bus/board byte flips */} meia;#else#define meia i32#endif#ifdef MEIB_DEVICE/* Multibus Ethernet Interlan NI3210 controller specifics */typedef struct meib { struct dma_t * mu_dma_queue; struct dma_t * mu_dma_free_queue; struct cmd_t * mu_cmd_queue; struct cmd_t * mu_cmd_free_queue; int mu_rcvdmabuf; /* next buffer to dma from */ int mu_rcviobuf; /* buffer we expect to receive next */ u16 mu_status; /* driver state */ u16 mu_pad1;} meib;#else#define meib i32#endif#ifdef META_DEVICE/* Multibus Ethernet 3Com 3C400 controller specifics */typedef struct meta { i16 meta_retries; u16 meta_csr;} meta;#else#define meta i32#endif#ifdef PEIA_DEVICE/* PCbus Ethernet Interlan NI5010 controller specifics */typedef struct peia { u16 peia_offset; /* starting offset of current send */ u16 peia_pad1;} peia;#else#define peia i32#endif#ifdef PETA_DEVICE/* PCbus Ethernet 3Com IE controller specifics */typedef struct peta { u16 peta_offset; /* starting offset of current send */ char peta_rmode; /* recv mode */ char peta_pad1;} peta;#else#define peta i32#endif#ifdef PPPA_DEVICEtypedef struct pppa { boolean pppa_first_dma; u16 pppa_xmt_cnt; struct m * pppa_rcv_mp;} pppa;#else#define pppa i32#endif#ifdef UDDA_DEVICE/* Unibus DMR-11 DEC device */typedef struct udda { u16 udda_status; u16 udda_mode; struct b_tbl * udda_base_tbl; struct marr * udda_marr; struct marr * udda_emarr; struct tcb * udda_tcbp;} udda;#else#define udda i32#endif#ifdef UEDA_DEVICE/* Unibus Ethernet DEC controller specifics */typedef struct ueda { struct ring_d * ueda_rrdp; /* base of recv ring desc. */ struct ring_d * ueda_c_rrdp; /* current recv ring desc. */ struct ring_d * ueda_e_rrdp; /* end of recv ring desc. */ struct ring_d * ueda_trdp; /* base of trans ring desc. */ struct ring_d * ueda_c_trdp; /* current trans ring desc. */ struct ring_d * ueda_e_trdp; /* end of trans ring desc. */ struct pcb * ueda_pcbp; /* ptr to port command block */ char * ueda_ppad1; u16 ueda_flags; u16 ueda_pad1;} ueda;#else#define ueda i32#endif#ifdef UEIA_DEVICE/* Unibus Ethernet Interlan NI1010A controller specifics */typedef struct ueia { struct m * ueia_mp; /* where packet was dma_ed into the heap */ struct m * ueia_mlist[1];/* available receive buffer list */ char * ueia_ppad1; u16 ueia_flags; u16 ueia_sr; /* value from reading status register */ char ueia_cr; /* copy of last issued command */ char ueia_pad1[3];} ueia;#else#define ueia i32#endif#ifdef UETA_DEVICE/* Unibus Ethernet 3Com 3C300 controller specifics */typedef struct ueta { u16 ueta_rcsr; /* for writing receive csr */ u16 ueta_tcsr; /* for writing transmit csr */ char * ueta_buf; /* board buffer address */ struct m * ueta_mlist[5]; /* buffer pointer list */ char * ueta_ppad1; i16 ueta_retries; /* transmission retries */ u16 ueta_flags;} ueta;#else#define ueta i32#endif#ifdef VEVA_DEVICEtypedef struct veva { u32 veva_flags; /* flags */ struct pr_ent * veva_pr_tbl; /* pointer to protocol table */ struct irp * veva_xmtirp; /* transmit IRP */} veva;#else#define veva i32#endif /*VEVA_DEVICE*/#ifdef VDVA_DEVICEtypedef struct vdva { char vdva_devnam[6]; /* device name build area */ u16 vdva_flags; /* flags */ short vdva_chan; /* channel number */ u16 vdva_maxpkt; /* max packet size for link */ char * vdva_ucb; /* pointer to UCB */ struct irp * vdva_xmtirp; /* transmit IRP */ struct irp * vdva_rcvirp; /* receive IRP */ tcb vdva_tcb; /* transmit deadman */} vdva;#else#define vdva i32#endif /* VDVA_DEVICE */#ifdef UXAA_DEVICEtypedef struct uxaa { struct dda_cb * uxaa_cb; /* Logical channel control block */ u32 uxaa_flags; struct q * uxaa_sioq; /* start I/O queue */ struct tcb * uxaa_tcbp; /* timer entry */ char * uxaa_hp; /* pointer to allocated heap space */ struct ucb * uxaa_ucb; struct crb * uxaa_crb; struct u_buf ** uxaa_rubuf_s;/* receive buffer list */ struct u_buf ** uxaa_rubuf_c;/* current receive buffer */ struct u_buf ** uxaa_rubuf_e;/* end receive buffer list */} uxaa;#else#define uxaa i32#endif /* UXAA_DEVICE */#ifdef VXSA_DEVICEtypedef struct vxsa { u32 vxsa_flags; i32 out_cnt; i32 free_i;} vxsa;#else#define vxsa i32#endif /*VXSA_DEVICE*/#ifdef PLL_DEVICEtypedef struct pll_d { struct so_t * pd_sop; /* backptr. to process socket */ char * pd_ppad1;} pll_d;#else#define pll_d i32#endif#ifdef MPPA_DEVICE#define PROTEON#endif#ifdef UPPA_DEVICE#define PROTEON#endif#ifdef PROTEONtypedef struct proteon { struct m * pp_mp; struct tcb * pp_tcbp; struct m * pp_mlist[1]; u16 pp_flags; u16 pp_pad1;} proteon;#else#define proteon i32#endif/* Standard Microsystems Corp. SMC Elite16 Series EtherCard Plus */#ifdef SMC16_DEVICEtypedef struct smc16{ void (**smc16_old_vect)(); /* old vector routine from the vector table */ i16 smc16_new_vect; /* new vector that we will be using */ a48 smc16_ether_addr; /* ethernet address for this device */ i16 smc16_hdr_size; /* size of the header ??? */ u8 smc16_old_cur; /* last current register that we used */} smc16;#else /* SMC16_DEVICE */#define smc16 i32#endif /* !SMC16_DEVICE *//* SLIP Protocol or CMAN protocol */#ifdef SLIP_SEND_PROCESS/* One element in the sl_outring */typedef struct slout_s { struct q slout_q; int slout_bytes; char * slout_ptr;} slout_s;#endiftypedef struct slip_s { struct m * sl_inmp; u16 sl_inflag; i16 sl_inlen; i16 sl_cslip;/* 1=>CSLIP or 0=>SLIP */ i16 sl_chn; /* CMAN channel */ int sl_mtu; /* mtu */ void * sl_comp; /* compression */ char * sl_outbuf; /* data output buffer for CMAN */#ifdef SLIP_SEND_PROCESS slout_s sl_outring;#endif /* SLIP_SEND_PROCESS */} slip_s;#ifdef SLIP_PROTOCOL#define nslip_s slip_s#else#define nslip_s i32#endif#ifdef PPP_PROTOCOLtypedef struct ppp_s { void * ppp_sessp; /* (pppsession *) */} ppp_s;#else#define ppp_s i32#endif/* network device specific union */typedef union { i596 i596_u; meia meia_u; meib meib_u; meta meta_u; peia peia_u; peta peta_u; pppa pppa_u; ueda ueda_u; ueia ueia_u; ueta ueta_u; xeea xeea_u; pll_d pll_u; proteon pp_u; veva veva_u; vdva vdva_u; uxaa uxaa_u; vxsa vxsa_u; smc16 smc16_u; nslip_s slip_u; ppp_s ppp_u;} dsu;#endif /* _DSU_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -