| 1 | /****************************************************************************** |
| 2 | ** |
| 3 | ** FILE NAME : ifx_atm.h |
| 4 | ** PROJECT : UEIP |
| 5 | ** MODULES : ATM |
| 6 | ** |
| 7 | ** DATE : 17 Jun 2009 |
| 8 | ** AUTHOR : Xu Liang |
| 9 | ** DESCRIPTION : Global ATM driver header file |
| 10 | ** COPYRIGHT : Copyright (c) 2006 |
| 11 | ** Infineon Technologies AG |
| 12 | ** Am Campeon 1-12, 85579 Neubiberg, Germany |
| 13 | ** |
| 14 | ** This program is free software; you can redistribute it and/or modify |
| 15 | ** it under the terms of the GNU General Public License as published by |
| 16 | ** the Free Software Foundation; either version 2 of the License, or |
| 17 | ** (at your option) any later version. |
| 18 | ** |
| 19 | ** HISTORY |
| 20 | ** $Date $Author $Comment |
| 21 | ** 07 JUL 2009 Xu Liang Init Version |
| 22 | *******************************************************************************/ |
| 23 | |
| 24 | #ifndef IFX_ATM_H |
| 25 | #define IFX_ATM_H |
| 26 | |
| 27 | |
| 28 | |
| 29 | /* |
| 30 | * ATM MIB |
| 31 | */ |
| 32 | |
| 33 | typedef struct { |
| 34 | __u32 ifHCInOctets_h; /*!< byte counter of ingress cells (upper 32 bits, total 64 bits) */ |
| 35 | __u32 ifHCInOctets_l; /*!< byte counter of ingress cells (lower 32 bits, total 64 bits) */ |
| 36 | __u32 ifHCOutOctets_h; /*!< byte counter of egress cells (upper 32 bits, total 64 bits) */ |
| 37 | __u32 ifHCOutOctets_l; /*!< byte counter of egress cells (lower 32 bits, total 64 bits) */ |
| 38 | __u32 ifInErrors; /*!< counter of error ingress cells */ |
| 39 | __u32 ifInUnknownProtos; /*!< counter of unknown ingress cells */ |
| 40 | __u32 ifOutErrors; /*!< counter of error egress cells */ |
| 41 | } atm_cell_ifEntry_t; |
| 42 | |
| 43 | typedef struct { |
| 44 | __u32 ifHCInOctets_h; /*!< byte counter of ingress packets (upper 32 bits, total 64 bits) */ |
| 45 | __u32 ifHCInOctets_l; /*!< byte counter of ingress packets (lower 32 bits, total 64 bits) */ |
| 46 | __u32 ifHCOutOctets_h; /*!< byte counter of egress packets (upper 32 bits, total 64 bits) */ |
| 47 | __u32 ifHCOutOctets_l; /*!< byte counter of egress packets (lower 32 bits, total 64 bits) */ |
| 48 | __u32 ifInUcastPkts; /*!< counter of ingress packets */ |
| 49 | __u32 ifOutUcastPkts; /*!< counter of egress packets */ |
| 50 | __u32 ifInErrors; /*!< counter of error ingress packets */ |
| 51 | __u32 ifInDiscards; /*!< counter of dropped ingress packets */ |
| 52 | __u32 ifOutErros; /*!< counter of error egress packets */ |
| 53 | __u32 ifOutDiscards; /*!< counter of dropped egress packets */ |
| 54 | } atm_aal5_ifEntry_t; |
| 55 | |
| 56 | typedef struct { |
| 57 | __u32 aal5VccCrcErrors; /*!< counter of ingress packets with CRC error */ |
| 58 | __u32 aal5VccSarTimeOuts; /*!< counter of ingress packets with Re-assemble timeout */ //no timer support yet |
| 59 | __u32 aal5VccOverSizedSDUs; /*!< counter of oversized ingress packets */ |
| 60 | } atm_aal5_vcc_t; |
| 61 | |
| 62 | typedef struct { |
| 63 | int vpi; /*!< VPI of the VCC to get MIB counters */ |
| 64 | int vci; /*!< VCI of the VCC to get MIB counters */ |
| 65 | atm_aal5_vcc_t mib_vcc; /*!< structure to get MIB counters */ |
| 66 | } atm_aal5_vcc_x_t; |
| 67 | |
| 68 | /*! |
| 69 | \brief ATM IOCTL Magic Number |
| 70 | */ |
| 71 | #define PPE_ATM_IOC_MAGIC 'o' |
| 72 | /*! |
| 73 | \brief ATM IOCTL Command - Get Cell Level MIB Counters |
| 74 | |
| 75 | This command is obsolete. User can get cell level MIB from DSL API. |
| 76 | This command uses structure "atm_cell_ifEntry_t" as parameter for output of MIB counters. |
| 77 | */ |
| 78 | #define PPE_ATM_MIB_CELL _IOW(PPE_ATM_IOC_MAGIC, 0, atm_cell_ifEntry_t) |
| 79 | /*! |
| 80 | \brief ATM IOCTL Command - Get AAL5 Level MIB Counters |
| 81 | |
| 82 | Get AAL5 packet counters. |
| 83 | This command uses structure "atm_aal5_ifEntry_t" as parameter for output of MIB counters. |
| 84 | */ |
| 85 | #define PPE_ATM_MIB_AAL5 _IOW(PPE_ATM_IOC_MAGIC, 1, atm_aal5_ifEntry_t) |
| 86 | /*! |
| 87 | \brief ATM IOCTL Command - Get Per PVC MIB Counters |
| 88 | |
| 89 | Get AAL5 packet counters for each PVC. |
| 90 | This command uses structure "atm_aal5_vcc_x_t" as parameter for input of VPI/VCI information and output of MIB counters. |
| 91 | */ |
| 92 | #define PPE_ATM_MIB_VCC _IOWR(PPE_ATM_IOC_MAGIC, 2, atm_aal5_vcc_x_t) |
| 93 | /*! |
| 94 | \brief Total Number of ATM IOCTL Commands |
| 95 | */ |
| 96 | #define PPE_ATM_IOC_MAXNR 3 |
| 97 | |
| 98 | /*@}*/ |
| 99 | |
| 100 | |
| 101 | |
| 102 | #ifdef __KERNEL__ |
| 103 | struct port_cell_info { |
| 104 | unsigned int port_num; |
| 105 | unsigned int tx_link_rate[2]; |
| 106 | }; |
| 107 | #endif |
| 108 | #endif |
| 109 | |