summaryrefslogtreecommitdiff
path: root/package/lqdsl/src/ifx_atm.h
blob: 32deca54e053fa91277361f1b20312fa72324a86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/******************************************************************************
**
** FILE NAME    : ifx_atm.h
** PROJECT      : UEIP
** MODULES      : ATM
**
** DATE         : 17 Jun 2009
** AUTHOR       : Xu Liang
** DESCRIPTION  : Global ATM driver header file
** COPYRIGHT    :       Copyright (c) 2006
**                      Infineon Technologies AG
**                      Am Campeon 1-12, 85579 Neubiberg, Germany
**
**    This program is free software; you can redistribute it and/or modify
**    it under the terms of the GNU General Public License as published by
**    the Free Software Foundation; either version 2 of the License, or
**    (at your option) any later version.
**
** HISTORY
** $Date        $Author         $Comment
** 07 JUL 2009  Xu Liang        Init Version
*******************************************************************************/

#ifndef IFX_ATM_H
#define IFX_ATM_H



/*
 *  ATM MIB
 */

typedef struct {
	__u32	ifHCInOctets_h;     /*!< byte counter of ingress cells (upper 32 bits, total 64 bits)   */
	__u32	ifHCInOctets_l;     /*!< byte counter of ingress cells (lower 32 bits, total 64 bits)   */
	__u32	ifHCOutOctets_h;    /*!< byte counter of egress cells (upper 32 bits, total 64 bits)    */
	__u32	ifHCOutOctets_l;    /*!< byte counter of egress cells (lower 32 bits, total 64 bits)    */
	__u32	ifInErrors;         /*!< counter of error ingress cells     */
	__u32	ifInUnknownProtos;  /*!< counter of unknown ingress cells   */
	__u32	ifOutErrors;        /*!< counter of error egress cells      */
} atm_cell_ifEntry_t;

typedef struct {
	__u32	ifHCInOctets_h;     /*!< byte counter of ingress packets (upper 32 bits, total 64 bits) */
	__u32	ifHCInOctets_l;     /*!< byte counter of ingress packets (lower 32 bits, total 64 bits) */
	__u32	ifHCOutOctets_h;    /*!< byte counter of egress packets (upper 32 bits, total 64 bits)  */
	__u32	ifHCOutOctets_l;    /*!< byte counter of egress packets (lower 32 bits, total 64 bits)  */
	__u32	ifInUcastPkts;      /*!< counter of ingress packets         */
	__u32	ifOutUcastPkts;     /*!< counter of egress packets          */
	__u32	ifInErrors;         /*!< counter of error ingress packets   */
	__u32	ifInDiscards;       /*!< counter of dropped ingress packets */
	__u32	ifOutErros;         /*!< counter of error egress packets    */
	__u32	ifOutDiscards;      /*!< counter of dropped egress packets  */
} atm_aal5_ifEntry_t;

typedef struct {
	__u32	aal5VccCrcErrors;       /*!< counter of ingress packets with CRC error  */
	__u32	aal5VccSarTimeOuts;     /*!< counter of ingress packets with Re-assemble timeout    */  //no timer support yet
	__u32	aal5VccOverSizedSDUs;   /*!< counter of oversized ingress packets       */
} atm_aal5_vcc_t;

typedef struct {
	int             vpi;        /*!< VPI of the VCC to get MIB counters */
	int             vci;        /*!< VCI of the VCC to get MIB counters */
	atm_aal5_vcc_t  mib_vcc;    /*!< structure to get MIB counters      */
} atm_aal5_vcc_x_t;

/*!
  \brief ATM IOCTL Magic Number
 */
#define PPE_ATM_IOC_MAGIC       'o'
/*!
  \brief ATM IOCTL Command - Get Cell Level MIB Counters

   This command is obsolete. User can get cell level MIB from DSL API.
   This command uses structure "atm_cell_ifEntry_t" as parameter for output of MIB counters.
 */
#define PPE_ATM_MIB_CELL        _IOW(PPE_ATM_IOC_MAGIC,  0, atm_cell_ifEntry_t)
/*!
  \brief ATM IOCTL Command - Get AAL5 Level MIB Counters

   Get AAL5 packet counters.
   This command uses structure "atm_aal5_ifEntry_t" as parameter for output of MIB counters.
 */
#define PPE_ATM_MIB_AAL5        _IOW(PPE_ATM_IOC_MAGIC,  1, atm_aal5_ifEntry_t)
/*!
  \brief ATM IOCTL Command - Get Per PVC MIB Counters

   Get AAL5 packet counters for each PVC.
   This command uses structure "atm_aal5_vcc_x_t" as parameter for input of VPI/VCI information and output of MIB counters.
 */
#define PPE_ATM_MIB_VCC         _IOWR(PPE_ATM_IOC_MAGIC, 2, atm_aal5_vcc_x_t)
/*!
  \brief Total Number of ATM IOCTL Commands
 */
#define PPE_ATM_IOC_MAXNR       3

/*@}*/



#ifdef __KERNEL__
struct port_cell_info {
    unsigned int    port_num;
    unsigned int    tx_link_rate[2];
};
#endif
#endif