summaryrefslogtreecommitdiffstats
path: root/target/linux/amazon/files/include/asm-mips/amazon/atm_mib.h
blob: f8633425809530a4ab4ba6d70fc9552726507199 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#ifndef AMAZON_ATM_MIB_H
#define AMAZON_ATM_MIB_H

#ifdef CONFIG_IFX_ATM_MIB
#include <asm/types.h>
#ifdef __KERNEL__
#include <linux/list.h>
#endif
#endif /* CONFIG_IFX_ATM_MIB */

#ifndef __KERNEL__
#include <atmMIB/local_list.h>
typedef unsigned int __u32;
#endif

typedef struct{
	__u32	ifHCInOctets_h;
	__u32	ifHCInOctets_l;
	__u32	ifHCOutOctets_h;
	__u32	ifHCOutOctets_l;
	__u32	ifInErrors;
	__u32	ifInUnknownProtos;
	__u32	ifOutErrors;
}atm_cell_ifEntry_t;

typedef struct{
	__u32	ifHCInOctets_h;
	__u32	ifHCInOctets_l;
	__u32	ifHCOutOctets_h;
	__u32	ifHCOutOctets_l;
	__u32	ifInUcastPkts;
	__u32	ifOutUcastPkts;
	__u32	ifInErrors;
	__u32	ifInDiscards;
	__u32	ifOutErros;
	__u32	ifOutDiscards;
}atm_aal5_ifEntry_t;

typedef struct{
	__u32	aal5VccCrcErrors;
	__u32	aal5VccSarTimeOuts;//no timer support yet
	__u32	aal5VccOverSizedSDUs;
}atm_aal5_vcc_t;

#if defined(CONFIG_IFX_ATM_MIB) || defined(IFX_CONFIG_SNMP_ATM_MIB)
/* ATM-MIB data structures */
typedef struct atmIfConfEntry {
	int ifIndex;
    int atmInterfaceMaxVpcs;
    int atmInterfaceMaxVccs;
    int atmInterfaceConfVpcs;
    int atmInterfaceConfVccs;
    int atmInterfaceMaxActiveVpiBits;
    int atmInterfaceMaxActiveVciBits;
    int atmInterfaceIlmiVpi;
    int atmInterfaceIlmiVci;
    int atmInterfaceAddressType;
    char atmInterfaceAdminAddress[40];
    unsigned long atmInterfaceMyNeighborIpAddress;
    char atmInterfaceMyNeighborIfName[20];
    int atmInterfaceCurrentMaxVpiBits;
    int atmInterfaceCurrentMaxVciBits;
    char atmInterfaceSubscrAddress[40];
    int flags;
}atmIfConfEntry;

typedef struct atmTrafficDescParamEntry {
	/* Following three parameters are used to update VCC QoS values */
	int ifIndex;
	short atmVclvpi;
	int atmVclvci;

	unsigned int atmTrafficParamIndex;
	unsigned char   traffic_class;  
	int     max_pcr;
	/* Subramani: Added min_pcr */
	int 	min_pcr;
	int     cdv;
	int     scr;
	int     mbs;
	int atmTrafficRowStatus;
	int atmTrafficFrameDiscard;
	struct list_head vpivci_head;
	struct list_head list;
}atmTrafficDescParamEntry;


typedef struct  atmVclEntry {
 	int ifIndex;
 	short atmVclvpi;
 	int atmVclvci;
 	char vpivci[20];
 	int  atmVclAdminStatus;
 	int atmVclOperStatus;
	unsigned long atmVclLastChange;
 	struct atmTrafficDescParamEntry *atmVclRxTrafficPtr;
 	struct atmTrafficDescParamEntry *atmVclTxTrafficPtr;
 	unsigned char atmVccAalType;
 	unsigned int atmVccAal5TxSduSize;
 	unsigned int atmVccAal5RxSduSize;
 	int atmVccAal5Encap;
 	int atmVclRowStatus;
 	int atmVclCastType;
 	int atmVclConnKind;
 	struct list_head list;
 	int flags;
}atmVclEntry;


typedef union union_atmptrs {
	struct atmIfConfEntry *atmIfConfEntry_ptr;
	struct atmTrafficDescParamEntry *atmTrafficDescParamEntry_ptr;
	struct atmVclEntry *atmVclEntry_ptr;
}union_atmptrs;

/* ATM Character device major number */
#define ATM_MEI_MAJOR	107

/* Protocol Constants */
#define IFX_PROTO_RAW               0
#define IFX_PROTO_BR2684            1
#define IFX_PROTO_PPPOATM           2
#define IFX_PROTO_CLIP              3

/* IOCTL Command Set for ATM-MIB */
#define GET_ATM_IF_CONF_DATA  0x0AB0
#define SET_ATM_IF_CONF_DATA  0x0AB1

#define SET_ATM_QOS_DATA      0x0BC0

#define GET_ATM_VCL_DATA      0x0CD0
#define SET_ATM_VCL_DATA      0x0CD1

#define FIND_VCC_IN_KERNEL	  0x0DE0

/* User defined flags for VCL Table */
#define ATMVCCAAL5CPCSTRANSMITSDUSIZE	9  
#define ATMVCCAAL5CPCSRECEIVESDUSIZE	10 

#endif /* CONFIG_IFX_ATM_MIB || IFX_CONFIG_SNMP_ATM_MIB */

#endif //AMAZON_ATM_MIB_H