1*433d6423SLionel Sambuc /* 2*433d6423SLionel Sambuc server/gen/ip/eth_io.h 3*433d6423SLionel Sambuc */ 4*433d6423SLionel Sambuc 5*433d6423SLionel Sambuc #ifndef __SERVER__IP__GEN__ETH_IO_H__ 6*433d6423SLionel Sambuc #define __SERVER__IP__GEN__ETH_IO_H__ 7*433d6423SLionel Sambuc 8*433d6423SLionel Sambuc #include <net/if_ether.h> 9*433d6423SLionel Sambuc 10*433d6423SLionel Sambuc typedef struct nwio_ethopt 11*433d6423SLionel Sambuc { 12*433d6423SLionel Sambuc u32_t nweo_flags; 13*433d6423SLionel Sambuc ether_addr_t nweo_multi, nweo_rem; 14*433d6423SLionel Sambuc ether_type_t nweo_type; 15*433d6423SLionel Sambuc } nwio_ethopt_t; 16*433d6423SLionel Sambuc 17*433d6423SLionel Sambuc #define NWEO_NOFLAGS 0x0000L 18*433d6423SLionel Sambuc #define NWEO_ACC_MASK 0x0003L 19*433d6423SLionel Sambuc # define NWEO_EXCL 0x00000001L 20*433d6423SLionel Sambuc # define NWEO_SHARED 0x00000002L 21*433d6423SLionel Sambuc # define NWEO_COPY 0x00000003L 22*433d6423SLionel Sambuc #define NWEO_LOC_MASK 0x0010L 23*433d6423SLionel Sambuc # define NWEO_EN_LOC 0x00000010L 24*433d6423SLionel Sambuc # define NWEO_DI_LOC 0x00100000L 25*433d6423SLionel Sambuc #define NWEO_BROAD_MASK 0x0020L 26*433d6423SLionel Sambuc # define NWEO_EN_BROAD 0x00000020L 27*433d6423SLionel Sambuc # define NWEO_DI_BROAD 0x00200000L 28*433d6423SLionel Sambuc #define NWEO_MULTI_MASK 0x0040L 29*433d6423SLionel Sambuc # define NWEO_EN_MULTI 0x00000040L 30*433d6423SLionel Sambuc # define NWEO_DI_MULTI 0x00400000L 31*433d6423SLionel Sambuc #define NWEO_PROMISC_MASK 0x0080L 32*433d6423SLionel Sambuc # define NWEO_EN_PROMISC 0x00000080L 33*433d6423SLionel Sambuc # define NWEO_DI_PROMISC 0x00800000L 34*433d6423SLionel Sambuc #define NWEO_REM_MASK 0x0100L 35*433d6423SLionel Sambuc # define NWEO_REMSPEC 0x00000100L 36*433d6423SLionel Sambuc # define NWEO_REMANY 0x01000000L 37*433d6423SLionel Sambuc #define NWEO_TYPE_MASK 0x0200L 38*433d6423SLionel Sambuc # define NWEO_TYPESPEC 0x00000200L 39*433d6423SLionel Sambuc # define NWEO_TYPEANY 0x02000000L 40*433d6423SLionel Sambuc #define NWEO_RW_MASK 0x1000L 41*433d6423SLionel Sambuc # define NWEO_RWDATONLY 0x00001000L 42*433d6423SLionel Sambuc # define NWEO_RWDATALL 0x10000000L 43*433d6423SLionel Sambuc 44*433d6423SLionel Sambuc typedef struct eth_stat 45*433d6423SLionel Sambuc { 46*433d6423SLionel Sambuc unsigned long ets_recvErr, /* # receive errors */ 47*433d6423SLionel Sambuc ets_sendErr, /* # send error */ 48*433d6423SLionel Sambuc ets_OVW, /* # buffer overwrite warnings, 49*433d6423SLionel Sambuc (packets arrive faster than 50*433d6423SLionel Sambuc can be processed) */ 51*433d6423SLionel Sambuc ets_CRCerr, /* # crc errors of read */ 52*433d6423SLionel Sambuc ets_frameAll, /* # frames not alligned (# bits 53*433d6423SLionel Sambuc not a mutiple of 8) */ 54*433d6423SLionel Sambuc ets_missedP, /* # packets missed due to too 55*433d6423SLionel Sambuc slow packet processing */ 56*433d6423SLionel Sambuc ets_packetR, /* # packets received */ 57*433d6423SLionel Sambuc ets_packetT, /* # packets transmitted */ 58*433d6423SLionel Sambuc ets_transDef, /* # transmission defered (there 59*433d6423SLionel Sambuc was a transmission of an 60*433d6423SLionel Sambuc other station in progress */ 61*433d6423SLionel Sambuc ets_collision, /* # collissions */ 62*433d6423SLionel Sambuc ets_transAb, /* # transmissions aborted due 63*433d6423SLionel Sambuc to accesive collisions */ 64*433d6423SLionel Sambuc ets_carrSense, /* # carrier sense lost */ 65*433d6423SLionel Sambuc ets_fifoUnder, /* # fifo underruns (processor 66*433d6423SLionel Sambuc is too busy) */ 67*433d6423SLionel Sambuc ets_fifoOver, /* # fifo overruns (processor is 68*433d6423SLionel Sambuc too busy) */ 69*433d6423SLionel Sambuc ets_CDheartbeat, /* # times unable to transmit 70*433d6423SLionel Sambuc collision signal */ 71*433d6423SLionel Sambuc ets_OWC; /* # times out of window 72*433d6423SLionel Sambuc collision */ 73*433d6423SLionel Sambuc } eth_stat_t; 74*433d6423SLionel Sambuc 75*433d6423SLionel Sambuc typedef struct nwio_ethstat 76*433d6423SLionel Sambuc { 77*433d6423SLionel Sambuc ether_addr_t nwes_addr; 78*433d6423SLionel Sambuc eth_stat_t nwes_stat; 79*433d6423SLionel Sambuc } nwio_ethstat_t; 80*433d6423SLionel Sambuc 81*433d6423SLionel Sambuc #endif /* __SERVER__IP__GEN__ETH_IO_H__ */ 82