Root/package/ltq-dsl/src/ifx_atm.h

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  \defgroup IFX_ATM UEIP Project - ATM driver module
31  \brief UEIP Project - ATM driver module, support Danube, Amazon-SE, AR9, VR9.
32 */
33
34/*!
35  \defgroup IFX_ATM_IOCTL IOCTL Commands
36  \ingroup IFX_ATM
37  \brief IOCTL Commands used by user application.
38 */
39
40/*!
41  \defgroup IFX_ATM_STRUCT Structures
42  \ingroup IFX_ATM
43  \brief Structures used by user application.
44 */
45
46/*!
47  \file ifx_atm.h
48  \ingroup IFX_ATM
49  \brief ATM driver header file
50 */
51
52
53
54/*
55 * ####################################
56 * Definition
57 * ####################################
58 */
59
60/*!
61  \addtogroup IFX_ATM_STRUCT
62 */
63/*@{*/
64
65/*
66 * ATM MIB
67 */
68
69/*!
70  \struct atm_cell_ifEntry_t
71  \brief Structure used for Cell Level MIB Counters.
72
73  User application use this structure to call IOCTL command "PPE_ATM_MIB_CELL".
74 */
75typedef struct {
76    __u32 ifHCInOctets_h; /*!< byte counter of ingress cells (upper 32 bits, total 64 bits) */
77    __u32 ifHCInOctets_l; /*!< byte counter of ingress cells (lower 32 bits, total 64 bits) */
78    __u32 ifHCOutOctets_h; /*!< byte counter of egress cells (upper 32 bits, total 64 bits) */
79    __u32 ifHCOutOctets_l; /*!< byte counter of egress cells (lower 32 bits, total 64 bits) */
80    __u32 ifInErrors; /*!< counter of error ingress cells */
81    __u32 ifInUnknownProtos; /*!< counter of unknown ingress cells */
82    __u32 ifOutErrors; /*!< counter of error egress cells */
83} atm_cell_ifEntry_t;
84
85/*!
86  \struct atm_aal5_ifEntry_t
87  \brief Structure used for AAL5 Frame Level MIB Counters.
88
89  User application use this structure to call IOCTL command "PPE_ATM_MIB_AAL5".
90 */
91typedef struct {
92    __u32 ifHCInOctets_h; /*!< byte counter of ingress packets (upper 32 bits, total 64 bits) */
93    __u32 ifHCInOctets_l; /*!< byte counter of ingress packets (lower 32 bits, total 64 bits) */
94    __u32 ifHCOutOctets_h; /*!< byte counter of egress packets (upper 32 bits, total 64 bits) */
95    __u32 ifHCOutOctets_l; /*!< byte counter of egress packets (lower 32 bits, total 64 bits) */
96    __u32 ifInUcastPkts; /*!< counter of ingress packets */
97    __u32 ifOutUcastPkts; /*!< counter of egress packets */
98    __u32 ifInErrors; /*!< counter of error ingress packets */
99    __u32 ifInDiscards; /*!< counter of dropped ingress packets */
100    __u32 ifOutErros; /*!< counter of error egress packets */
101    __u32 ifOutDiscards; /*!< counter of dropped egress packets */
102} atm_aal5_ifEntry_t;
103
104/*!
105  \struct atm_aal5_vcc_t
106  \brief Structure used for per PVC AAL5 Frame Level MIB Counters.
107
108  This structure is a part of structure "atm_aal5_vcc_x_t".
109 */
110typedef struct {
111    __u32 aal5VccCrcErrors; /*!< counter of ingress packets with CRC error */
112    __u32 aal5VccSarTimeOuts; /*!< counter of ingress packets with Re-assemble timeout */ //no timer support yet
113    __u32 aal5VccOverSizedSDUs; /*!< counter of oversized ingress packets */
114} atm_aal5_vcc_t;
115
116/*!
117  \struct atm_aal5_vcc_x_t
118  \brief Structure used for per PVC AAL5 Frame Level MIB Counters.
119
120  User application use this structure to call IOCTL command "PPE_ATM_MIB_VCC".
121 */
122typedef struct {
123    int vpi; /*!< VPI of the VCC to get MIB counters */
124    int vci; /*!< VCI of the VCC to get MIB counters */
125    atm_aal5_vcc_t mib_vcc; /*!< structure to get MIB counters */
126} atm_aal5_vcc_x_t;
127
128/*@}*/
129
130
131
132/*
133 * ####################################
134 * IOCTL
135 * ####################################
136 */
137
138/*!
139  \addtogroup IFX_ATM_IOCTL
140 */
141/*@{*/
142
143/*
144 * ioctl Command
145 */
146/*!
147  \brief ATM IOCTL Magic Number
148 */
149#define PPE_ATM_IOC_MAGIC 'o'
150/*!
151  \brief ATM IOCTL Command - Get Cell Level MIB Counters
152
153   This command is obsolete. User can get cell level MIB from DSL API.
154   This command uses structure "atm_cell_ifEntry_t" as parameter for output of MIB counters.
155 */
156#define PPE_ATM_MIB_CELL _IOW(PPE_ATM_IOC_MAGIC, 0, atm_cell_ifEntry_t)
157/*!
158  \brief ATM IOCTL Command - Get AAL5 Level MIB Counters
159
160   Get AAL5 packet counters.
161   This command uses structure "atm_aal5_ifEntry_t" as parameter for output of MIB counters.
162 */
163#define PPE_ATM_MIB_AAL5 _IOW(PPE_ATM_IOC_MAGIC, 1, atm_aal5_ifEntry_t)
164/*!
165  \brief ATM IOCTL Command - Get Per PVC MIB Counters
166
167   Get AAL5 packet counters for each PVC.
168   This command uses structure "atm_aal5_vcc_x_t" as parameter for input of VPI/VCI information and output of MIB counters.
169 */
170#define PPE_ATM_MIB_VCC _IOWR(PPE_ATM_IOC_MAGIC, 2, atm_aal5_vcc_x_t)
171/*!
172  \brief Total Number of ATM IOCTL Commands
173 */
174#define PPE_ATM_IOC_MAXNR 3
175
176/*@}*/
177
178
179
180/*
181 * ####################################
182 * API
183 * ####################################
184 */
185
186#ifdef __KERNEL__
187struct port_cell_info {
188    unsigned int port_num;
189    unsigned int tx_link_rate[2];
190};
191#endif
192
193
194
195#endif // IFX_ATM_H
196
197

Archive Download this file



interactive