1 |
583 |
jeremybenn |
/*
|
2 |
|
|
* Copyright (c) 2001, 2002 Leon Woestenberg <leon.woestenberg@axon.tv>
|
3 |
|
|
* Copyright (c) 2001, 2002 Axon Digital Design B.V., The Netherlands.
|
4 |
|
|
* All rights reserved.
|
5 |
|
|
*
|
6 |
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
7 |
|
|
* are permitted provided that the following conditions are met:
|
8 |
|
|
*
|
9 |
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
10 |
|
|
* this list of conditions and the following disclaimer.
|
11 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
12 |
|
|
* this list of conditions and the following disclaimer in the documentation
|
13 |
|
|
* and/or other materials provided with the distribution.
|
14 |
|
|
* 3. The name of the author may not be used to endorse or promote products
|
15 |
|
|
* derived from this software without specific prior written permission.
|
16 |
|
|
*
|
17 |
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
18 |
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19 |
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
20 |
|
|
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
21 |
|
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
22 |
|
|
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
23 |
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
24 |
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
25 |
|
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
26 |
|
|
* OF SUCH DAMAGE.
|
27 |
|
|
*
|
28 |
|
|
* This file is part of the lwIP TCP/IP stack.
|
29 |
|
|
*
|
30 |
|
|
* Author: Leon Woestenberg <leon.woestenberg@axon.tv>
|
31 |
|
|
*
|
32 |
|
|
*/
|
33 |
|
|
#ifndef __LWIP_SNMP_H__
|
34 |
|
|
#define __LWIP_SNMP_H__
|
35 |
|
|
|
36 |
|
|
#include "lwip/opt.h"
|
37 |
|
|
|
38 |
|
|
/* SNMP support available? */
|
39 |
|
|
#if defined(LWIP_SNMP) && (LWIP_SNMP > 0)
|
40 |
|
|
|
41 |
|
|
/* network interface */
|
42 |
|
|
void snmp_add_ifinoctets(unsigned long value);
|
43 |
|
|
void snmp_inc_ifinucastpkts(void);
|
44 |
|
|
void snmp_inc_ifinnucastpkts(void);
|
45 |
|
|
void snmp_inc_ifindiscards(void);
|
46 |
|
|
void snmp_add_ifoutoctets(unsigned long value);
|
47 |
|
|
void snmp_inc_ifoutucastpkts(void);
|
48 |
|
|
void snmp_inc_ifoutnucastpkts(void);
|
49 |
|
|
void snmp_inc_ifoutdiscards(void);
|
50 |
|
|
|
51 |
|
|
/* IP */
|
52 |
|
|
void snmp_inc_ipinreceives(void);
|
53 |
|
|
void snmp_inc_ipindelivers(void);
|
54 |
|
|
void snmp_inc_ipindiscards(void);
|
55 |
|
|
void snmp_inc_ipoutdiscards(void);
|
56 |
|
|
void snmp_inc_ipoutrequests(void);
|
57 |
|
|
void snmp_inc_ipunknownprotos(void);
|
58 |
|
|
void snmp_inc_ipnoroutes(void);
|
59 |
|
|
void snmp_inc_ipforwdatagrams(void);
|
60 |
|
|
|
61 |
|
|
/* ICMP */
|
62 |
|
|
void snmp_inc_icmpinmsgs(void);
|
63 |
|
|
void snmp_inc_icmpinerrors(void);
|
64 |
|
|
void snmp_inc_icmpindestunreachs(void);
|
65 |
|
|
void snmp_inc_icmpintimeexcds(void);
|
66 |
|
|
void snmp_inc_icmpinparmprobs(void);
|
67 |
|
|
void snmp_inc_icmpinsrcquenchs(void);
|
68 |
|
|
void snmp_inc_icmpinredirects(void);
|
69 |
|
|
void snmp_inc_icmpinechos(void);
|
70 |
|
|
void snmp_inc_icmpinechoreps(void);
|
71 |
|
|
void snmp_inc_icmpintimestamps(void);
|
72 |
|
|
void snmp_inc_icmpintimestampreps(void);
|
73 |
|
|
void snmp_inc_icmpinaddrmasks(void);
|
74 |
|
|
void snmp_inc_icmpinaddrmaskreps(void);
|
75 |
|
|
void snmp_inc_icmpoutmsgs(void);
|
76 |
|
|
void snmp_inc_icmpouterrors(void);
|
77 |
|
|
void snmp_inc_icmpoutdestunreachs(void);
|
78 |
|
|
void snmp_inc_icmpouttimeexcds(void);
|
79 |
|
|
void snmp_inc_icmpoutparmprobs(void);
|
80 |
|
|
void snmp_inc_icmpoutsrcquenchs(void);
|
81 |
|
|
void snmp_inc_icmpoutredirects(void);
|
82 |
|
|
void snmp_inc_icmpoutechos(void);
|
83 |
|
|
void snmp_inc_icmpoutechoreps(void);
|
84 |
|
|
void snmp_inc_icmpouttimestamps(void);
|
85 |
|
|
void snmp_inc_icmpouttimestampreps(void);
|
86 |
|
|
void snmp_inc_icmpoutaddrmasks(void);
|
87 |
|
|
void snmp_inc_icmpoutaddrmaskreps(void);
|
88 |
|
|
|
89 |
|
|
/* TCP */
|
90 |
|
|
void snmp_inc_tcpactiveopens(void);
|
91 |
|
|
void snmp_inc_tcppassiveopens(void);
|
92 |
|
|
void snmp_inc_tcpattemptfails(void);
|
93 |
|
|
void snmp_inc_tcpestabresets(void);
|
94 |
|
|
void snmp_inc_tcpcurrestab(void);
|
95 |
|
|
void snmp_inc_tcpinsegs(void);
|
96 |
|
|
void snmp_inc_tcpoutsegs(void);
|
97 |
|
|
void snmp_inc_tcpretranssegs(void);
|
98 |
|
|
void snmp_inc_tcpinerrs(void);
|
99 |
|
|
void snmp_inc_tcpoutrsts(void);
|
100 |
|
|
|
101 |
|
|
/* UDP */
|
102 |
|
|
void snmp_inc_udpindatagrams(void);
|
103 |
|
|
void snmp_inc_udpnoports(void);
|
104 |
|
|
void snmp_inc_udpinerrors(void);
|
105 |
|
|
void snmp_inc_udpoutdatagrams(void);
|
106 |
|
|
|
107 |
|
|
/* LWIP_SNMP support not available */
|
108 |
|
|
/* define everything to be empty */
|
109 |
|
|
#else
|
110 |
|
|
|
111 |
|
|
/* network interface */
|
112 |
|
|
#define snmp_add_ifinoctets(value)
|
113 |
|
|
#define snmp_inc_ifinucastpkts()
|
114 |
|
|
#define snmp_inc_ifinnucastpkts()
|
115 |
|
|
#define snmp_inc_ifindiscards()
|
116 |
|
|
#define snmp_add_ifoutoctets(value)
|
117 |
|
|
#define snmp_inc_ifoutucastpkts()
|
118 |
|
|
#define snmp_inc_ifoutnucastpkts()
|
119 |
|
|
#define snmp_inc_ifoutdiscards()
|
120 |
|
|
|
121 |
|
|
/* IP */
|
122 |
|
|
#define snmp_inc_ipinreceives()
|
123 |
|
|
#define snmp_inc_ipindelivers()
|
124 |
|
|
#define snmp_inc_ipindiscards()
|
125 |
|
|
#define snmp_inc_ipoutdiscards()
|
126 |
|
|
#define snmp_inc_ipoutrequests()
|
127 |
|
|
#define snmp_inc_ipunknownprotos()
|
128 |
|
|
#define snmp_inc_ipnoroutes()
|
129 |
|
|
#define snmp_inc_ipforwdatagrams()
|
130 |
|
|
|
131 |
|
|
/* ICMP */
|
132 |
|
|
#define snmp_inc_icmpinmsgs()
|
133 |
|
|
#define snmp_inc_icmpinerrors()
|
134 |
|
|
#define snmp_inc_icmpindestunreachs()
|
135 |
|
|
#define snmp_inc_icmpintimeexcds()
|
136 |
|
|
#define snmp_inc_icmpinparmprobs()
|
137 |
|
|
#define snmp_inc_icmpinsrcquenchs()
|
138 |
|
|
#define snmp_inc_icmpinredirects()
|
139 |
|
|
#define snmp_inc_icmpinechos()
|
140 |
|
|
#define snmp_inc_icmpinechoreps()
|
141 |
|
|
#define snmp_inc_icmpintimestamps()
|
142 |
|
|
#define snmp_inc_icmpintimestampreps()
|
143 |
|
|
#define snmp_inc_icmpinaddrmasks()
|
144 |
|
|
#define snmp_inc_icmpinaddrmaskreps()
|
145 |
|
|
#define snmp_inc_icmpoutmsgs()
|
146 |
|
|
#define snmp_inc_icmpouterrors()
|
147 |
|
|
#define snmp_inc_icmpoutdestunreachs()
|
148 |
|
|
#define snmp_inc_icmpouttimeexcds()
|
149 |
|
|
#define snmp_inc_icmpoutparmprobs()
|
150 |
|
|
#define snmp_inc_icmpoutsrcquenchs()
|
151 |
|
|
#define snmp_inc_icmpoutredirects()
|
152 |
|
|
#define snmp_inc_icmpoutechos()
|
153 |
|
|
#define snmp_inc_icmpoutechoreps()
|
154 |
|
|
#define snmp_inc_icmpouttimestamps()
|
155 |
|
|
#define snmp_inc_icmpouttimestampreps()
|
156 |
|
|
#define snmp_inc_icmpoutaddrmasks()
|
157 |
|
|
#define snmp_inc_icmpoutaddrmaskreps()
|
158 |
|
|
/* TCP */
|
159 |
|
|
#define snmp_inc_tcpactiveopens()
|
160 |
|
|
#define snmp_inc_tcppassiveopens()
|
161 |
|
|
#define snmp_inc_tcpattemptfails()
|
162 |
|
|
#define snmp_inc_tcpestabresets()
|
163 |
|
|
#define snmp_inc_tcpcurrestab()
|
164 |
|
|
#define snmp_inc_tcpinsegs()
|
165 |
|
|
#define snmp_inc_tcpoutsegs()
|
166 |
|
|
#define snmp_inc_tcpretranssegs()
|
167 |
|
|
#define snmp_inc_tcpinerrs()
|
168 |
|
|
#define snmp_inc_tcpoutrsts()
|
169 |
|
|
|
170 |
|
|
/* UDP */
|
171 |
|
|
#define snmp_inc_udpindatagrams()
|
172 |
|
|
#define snmp_inc_udpnoports()
|
173 |
|
|
#define snmp_inc_udpinerrors()
|
174 |
|
|
#define snmp_inc_udpoutdatagrams()
|
175 |
|
|
|
176 |
|
|
#endif
|
177 |
|
|
|
178 |
|
|
#endif /* __LWIP_SNMP_H__ */
|