Debian Codegraph @

agent/mibgroup/sctp-mib/sctpScalars_common.h

raw
1 #ifndef SCTP_SCALARS_COMMON_H
2 #define SCTP_SCALARS_COMMON_H
3
4 /*
5 * Define OIDs
6 */
7 #define SCTP_CURRESTAB 1
8 #define SCTP_ACTIVEESTABS 2
9 #define SCTP_PASSIVEESTABS 3
10 #define SCTP_ABORTEDS 4
11 #define SCTP_SHUTDOWNS 5
12 #define SCTP_OUTOFBLUES 6
13 #define SCTP_CHECKSUMERRORS 7
14 #define SCTP_OUTCTRLCHUNKS 8
15 #define SCTP_OUTORDERCHUNKS 9
16 #define SCTP_OUTUNORDERCHUNKS 10
17 #define SCTP_INCTRLCHUNKS 11
18 #define SCTP_INORDERCHUNKS 12
19 #define SCTP_INUNORDERCHUNKS 13
20 #define SCTP_FRAGUSRMSGS 14
21 #define SCTP_REASMUSRMSGS 15
22 #define SCTP_OUTSCTPPACKS 16
23 #define SCTP_INSCTPPACKS 17
24 #define SCTP_DISCONTINUITYTIME 18
25
26 #define SCTP_RTOALGORITHM 1
27 #define SCTP_RTOMIN 2
28 #define SCTP_RTOMAX 3
29 #define SCTP_RTOINITIAL 4
30 #define SCTP_MAXASSOCS 5
31 #define SCTP_VALCOOKIELIFE 6
32 #define SCTP_MAXINITRETR 7
33
34 /*
35 * Define cache timeouts
36 */
37 #define SCTP_STATS_CACHE_TIMEOUT 30
38 #define SCTP_PARAMS_CACHE_TIMEOUT 30
39
40 /*
41 * Structure to hold sctpStats
42 */
43 typedef struct netsnmp_sctp_stats_s {
44 u_int curr_estab;
45 u_int active_estabs;
46 u_int passive_estabs;
47 u_int aborteds;
48 u_int shutdowns;
49 u_int out_of_blues;
50 u_int checksum_errors;
51 struct counter64 out_ctrl_chunks;
52 struct counter64 out_order_chunks;
53 struct counter64 out_unorder_chunks;
54 struct counter64 in_ctrl_chunks;
55 struct counter64 in_order_chunks;
56 struct counter64 in_unorder_chunks;
57 struct counter64 frag_usr_msgs;
58 struct counter64 reasm_usr_msgs;
59 struct counter64 out_sctp_packs;
60 struct counter64 in_sctp_packs;
61 u_long discontinuity_time;
62 } netsnmp_sctp_stats;
63
64 /*
65 * Enums for sctpParams
66 */
67 #define NETSNMP_SCTP_ALGORITHM_OTHER 1
68 #define NETSNMP_SCTP_ALGORITHM_VANJ 2
69
70 /*
71 * Structure to hold sctpParams
72 */
73 typedef struct netsnmp_sctp_params_s {
74 u_int rto_algorithm;
75 u_int rto_min;
76 u_int rto_max;
77 u_int rto_initial;
78 int max_assocs;
79 u_int val_cookie_life;
80 u_int max_init_retr;
81 } netsnmp_sctp_params;
82
83
84 /*
85 * sctpStats cached values.
86 * Will be used to reconstruct 64-bit counters when the underlying platform
87 * provides only 32-bit ones.
88 */
89 extern netsnmp_sctp_stats sctp_stats;
90
91 /*
92 * sctpParams cached values.
93 */
94 extern netsnmp_sctp_params sctp_params;
95
96 Netsnmp_Node_Handler sctp_stats_handler;
97 Netsnmp_Node_Handler sctp_params_handler;
98
99 /*
100 * function declarations
101 */
102
103
104 /*
105 * =======================================================
106 * Platform independent functions.
107 * Mostly just wrappers around the platform dependent ones.
108 * =======================================================
109 */
110 extern void netsnmp_access_sctp_stats_init(void);
111 extern NetsnmpCacheLoad netsnmp_access_sctp_stats_load;
112 extern NetsnmpCacheFree netsnmp_access_sctp_stats_free;
113
114 extern void netsnmp_access_sctp_params_init(void);
115 extern NetsnmpCacheLoad netsnmp_access_sctp_params_load;
116 extern NetsnmpCacheFree netsnmp_access_sctp_params_free;
117
118 /*
119 * =======================================================
120 * Platform dependent functions.
121 * These do the real work.
122 * =======================================================
123 */
124
125 /*
126 * Initialize patform dependent part of sctpStats.
127 */
128 extern void netsnmp_access_sctp_stats_arch_init(void);
129
130 /*
131 * Load the sctpStats from underlying platform. The caller will reconstruct
132 * 64-bit counters if the platform provided 32-bit ones only.
133 */
134 extern int netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats *
135 sctp_stats);
136
137 /*
138 * Initialize patform dependent part of sctpParams.
139 */
140 extern void netsnmp_access_sctp_params_arch_init(void);
141
142 /*
143 * Load the sctpParams.
144 */
145 extern int netsnmp_access_sctp_params_arch_load(netsnmp_sctp_params *
146 sctp_params);
147
148 #endif /* SCTP_SCALARS_COMMON_H */