LwIP with PPP & Ethernet integration
This is the mbed port of the LwIP stack: http://savannah.nongnu.org/projects/lwip/
It includes contributed content from NXP's port for LPCxxxx devices: http://www.lpcware.com/content/project/lightweight-ip-lwip-networking-stack
Licence
LwIP is licenced under the BSD licence:
Copyright (c) 2001-2004 Swedish Institute of Computer Science. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
src/include/lwip/snmp.h@2:1a87f74b8e3b, 2012-05-25 (annotated)
- Committer:
- donatien
- Date:
- Fri May 25 08:56:35 2012 +0000
- Revision:
- 2:1a87f74b8e3b
- Parent:
- 0:8e01dca41002
Removed compilation of EMAC driver when using PPP
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
donatien | 0:8e01dca41002 | 1 | /* |
donatien | 0:8e01dca41002 | 2 | * Copyright (c) 2001, 2002 Leon Woestenberg <leon.woestenberg@axon.tv> |
donatien | 0:8e01dca41002 | 3 | * Copyright (c) 2001, 2002 Axon Digital Design B.V., The Netherlands. |
donatien | 0:8e01dca41002 | 4 | * All rights reserved. |
donatien | 0:8e01dca41002 | 5 | * |
donatien | 0:8e01dca41002 | 6 | * Redistribution and use in source and binary forms, with or without modification, |
donatien | 0:8e01dca41002 | 7 | * are permitted provided that the following conditions are met: |
donatien | 0:8e01dca41002 | 8 | * |
donatien | 0:8e01dca41002 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
donatien | 0:8e01dca41002 | 10 | * this list of conditions and the following disclaimer. |
donatien | 0:8e01dca41002 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
donatien | 0:8e01dca41002 | 12 | * this list of conditions and the following disclaimer in the documentation |
donatien | 0:8e01dca41002 | 13 | * and/or other materials provided with the distribution. |
donatien | 0:8e01dca41002 | 14 | * 3. The name of the author may not be used to endorse or promote products |
donatien | 0:8e01dca41002 | 15 | * derived from this software without specific prior written permission. |
donatien | 0:8e01dca41002 | 16 | * |
donatien | 0:8e01dca41002 | 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
donatien | 0:8e01dca41002 | 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
donatien | 0:8e01dca41002 | 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
donatien | 0:8e01dca41002 | 20 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
donatien | 0:8e01dca41002 | 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
donatien | 0:8e01dca41002 | 22 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
donatien | 0:8e01dca41002 | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
donatien | 0:8e01dca41002 | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
donatien | 0:8e01dca41002 | 25 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
donatien | 0:8e01dca41002 | 26 | * OF SUCH DAMAGE. |
donatien | 0:8e01dca41002 | 27 | * |
donatien | 0:8e01dca41002 | 28 | * This file is part of the lwIP TCP/IP stack. |
donatien | 0:8e01dca41002 | 29 | * |
donatien | 0:8e01dca41002 | 30 | * Author: Leon Woestenberg <leon.woestenberg@axon.tv> |
donatien | 0:8e01dca41002 | 31 | * |
donatien | 0:8e01dca41002 | 32 | */ |
donatien | 0:8e01dca41002 | 33 | #ifndef __LWIP_SNMP_H__ |
donatien | 0:8e01dca41002 | 34 | #define __LWIP_SNMP_H__ |
donatien | 0:8e01dca41002 | 35 | |
donatien | 0:8e01dca41002 | 36 | #include "lwip/opt.h" |
donatien | 0:8e01dca41002 | 37 | |
donatien | 0:8e01dca41002 | 38 | #ifdef __cplusplus |
donatien | 0:8e01dca41002 | 39 | extern "C" { |
donatien | 0:8e01dca41002 | 40 | #endif |
donatien | 0:8e01dca41002 | 41 | |
donatien | 0:8e01dca41002 | 42 | #include "lwip/ip_addr.h" |
donatien | 0:8e01dca41002 | 43 | |
donatien | 0:8e01dca41002 | 44 | struct udp_pcb; |
donatien | 0:8e01dca41002 | 45 | struct netif; |
donatien | 0:8e01dca41002 | 46 | |
donatien | 0:8e01dca41002 | 47 | /** |
donatien | 0:8e01dca41002 | 48 | * @see RFC1213, "MIB-II, 6. Definitions" |
donatien | 0:8e01dca41002 | 49 | */ |
donatien | 0:8e01dca41002 | 50 | enum snmp_ifType { |
donatien | 0:8e01dca41002 | 51 | snmp_ifType_other=1, /* none of the following */ |
donatien | 0:8e01dca41002 | 52 | snmp_ifType_regular1822, |
donatien | 0:8e01dca41002 | 53 | snmp_ifType_hdh1822, |
donatien | 0:8e01dca41002 | 54 | snmp_ifType_ddn_x25, |
donatien | 0:8e01dca41002 | 55 | snmp_ifType_rfc877_x25, |
donatien | 0:8e01dca41002 | 56 | snmp_ifType_ethernet_csmacd, |
donatien | 0:8e01dca41002 | 57 | snmp_ifType_iso88023_csmacd, |
donatien | 0:8e01dca41002 | 58 | snmp_ifType_iso88024_tokenBus, |
donatien | 0:8e01dca41002 | 59 | snmp_ifType_iso88025_tokenRing, |
donatien | 0:8e01dca41002 | 60 | snmp_ifType_iso88026_man, |
donatien | 0:8e01dca41002 | 61 | snmp_ifType_starLan, |
donatien | 0:8e01dca41002 | 62 | snmp_ifType_proteon_10Mbit, |
donatien | 0:8e01dca41002 | 63 | snmp_ifType_proteon_80Mbit, |
donatien | 0:8e01dca41002 | 64 | snmp_ifType_hyperchannel, |
donatien | 0:8e01dca41002 | 65 | snmp_ifType_fddi, |
donatien | 0:8e01dca41002 | 66 | snmp_ifType_lapb, |
donatien | 0:8e01dca41002 | 67 | snmp_ifType_sdlc, |
donatien | 0:8e01dca41002 | 68 | snmp_ifType_ds1, /* T-1 */ |
donatien | 0:8e01dca41002 | 69 | snmp_ifType_e1, /* european equiv. of T-1 */ |
donatien | 0:8e01dca41002 | 70 | snmp_ifType_basicISDN, |
donatien | 0:8e01dca41002 | 71 | snmp_ifType_primaryISDN, /* proprietary serial */ |
donatien | 0:8e01dca41002 | 72 | snmp_ifType_propPointToPointSerial, |
donatien | 0:8e01dca41002 | 73 | snmp_ifType_ppp, |
donatien | 0:8e01dca41002 | 74 | snmp_ifType_softwareLoopback, |
donatien | 0:8e01dca41002 | 75 | snmp_ifType_eon, /* CLNP over IP [11] */ |
donatien | 0:8e01dca41002 | 76 | snmp_ifType_ethernet_3Mbit, |
donatien | 0:8e01dca41002 | 77 | snmp_ifType_nsip, /* XNS over IP */ |
donatien | 0:8e01dca41002 | 78 | snmp_ifType_slip, /* generic SLIP */ |
donatien | 0:8e01dca41002 | 79 | snmp_ifType_ultra, /* ULTRA technologies */ |
donatien | 0:8e01dca41002 | 80 | snmp_ifType_ds3, /* T-3 */ |
donatien | 0:8e01dca41002 | 81 | snmp_ifType_sip, /* SMDS */ |
donatien | 0:8e01dca41002 | 82 | snmp_ifType_frame_relay |
donatien | 0:8e01dca41002 | 83 | }; |
donatien | 0:8e01dca41002 | 84 | |
donatien | 0:8e01dca41002 | 85 | #if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ |
donatien | 0:8e01dca41002 | 86 | |
donatien | 0:8e01dca41002 | 87 | /** SNMP "sysuptime" Interval */ |
donatien | 0:8e01dca41002 | 88 | #define SNMP_SYSUPTIME_INTERVAL 10 |
donatien | 0:8e01dca41002 | 89 | |
donatien | 0:8e01dca41002 | 90 | /** fixed maximum length for object identifier type */ |
donatien | 0:8e01dca41002 | 91 | #define LWIP_SNMP_OBJ_ID_LEN 32 |
donatien | 0:8e01dca41002 | 92 | |
donatien | 0:8e01dca41002 | 93 | /** internal object identifier representation */ |
donatien | 0:8e01dca41002 | 94 | struct snmp_obj_id |
donatien | 0:8e01dca41002 | 95 | { |
donatien | 0:8e01dca41002 | 96 | u8_t len; |
donatien | 0:8e01dca41002 | 97 | s32_t id[LWIP_SNMP_OBJ_ID_LEN]; |
donatien | 0:8e01dca41002 | 98 | }; |
donatien | 0:8e01dca41002 | 99 | |
donatien | 0:8e01dca41002 | 100 | /* system */ |
donatien | 0:8e01dca41002 | 101 | void snmp_set_sysdesr(u8_t* str, u8_t* len); |
donatien | 0:8e01dca41002 | 102 | void snmp_set_sysobjid(struct snmp_obj_id *oid); |
donatien | 0:8e01dca41002 | 103 | void snmp_get_sysobjid_ptr(struct snmp_obj_id **oid); |
donatien | 0:8e01dca41002 | 104 | void snmp_inc_sysuptime(void); |
donatien | 0:8e01dca41002 | 105 | void snmp_add_sysuptime(u32_t value); |
donatien | 0:8e01dca41002 | 106 | void snmp_get_sysuptime(u32_t *value); |
donatien | 0:8e01dca41002 | 107 | void snmp_set_syscontact(u8_t *ocstr, u8_t *ocstrlen); |
donatien | 0:8e01dca41002 | 108 | void snmp_set_sysname(u8_t *ocstr, u8_t *ocstrlen); |
donatien | 0:8e01dca41002 | 109 | void snmp_set_syslocation(u8_t *ocstr, u8_t *ocstrlen); |
donatien | 0:8e01dca41002 | 110 | |
donatien | 0:8e01dca41002 | 111 | /* network interface */ |
donatien | 0:8e01dca41002 | 112 | void snmp_add_ifinoctets(struct netif *ni, u32_t value); |
donatien | 0:8e01dca41002 | 113 | void snmp_inc_ifinucastpkts(struct netif *ni); |
donatien | 0:8e01dca41002 | 114 | void snmp_inc_ifinnucastpkts(struct netif *ni); |
donatien | 0:8e01dca41002 | 115 | void snmp_inc_ifindiscards(struct netif *ni); |
donatien | 0:8e01dca41002 | 116 | void snmp_add_ifoutoctets(struct netif *ni, u32_t value); |
donatien | 0:8e01dca41002 | 117 | void snmp_inc_ifoutucastpkts(struct netif *ni); |
donatien | 0:8e01dca41002 | 118 | void snmp_inc_ifoutnucastpkts(struct netif *ni); |
donatien | 0:8e01dca41002 | 119 | void snmp_inc_ifoutdiscards(struct netif *ni); |
donatien | 0:8e01dca41002 | 120 | void snmp_inc_iflist(void); |
donatien | 0:8e01dca41002 | 121 | void snmp_dec_iflist(void); |
donatien | 0:8e01dca41002 | 122 | |
donatien | 0:8e01dca41002 | 123 | /* ARP (for atTable and ipNetToMediaTable) */ |
donatien | 0:8e01dca41002 | 124 | void snmp_insert_arpidx_tree(struct netif *ni, ip_addr_t *ip); |
donatien | 0:8e01dca41002 | 125 | void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip); |
donatien | 0:8e01dca41002 | 126 | |
donatien | 0:8e01dca41002 | 127 | /* IP */ |
donatien | 0:8e01dca41002 | 128 | void snmp_inc_ipinreceives(void); |
donatien | 0:8e01dca41002 | 129 | void snmp_inc_ipinhdrerrors(void); |
donatien | 0:8e01dca41002 | 130 | void snmp_inc_ipinaddrerrors(void); |
donatien | 0:8e01dca41002 | 131 | void snmp_inc_ipforwdatagrams(void); |
donatien | 0:8e01dca41002 | 132 | void snmp_inc_ipinunknownprotos(void); |
donatien | 0:8e01dca41002 | 133 | void snmp_inc_ipindiscards(void); |
donatien | 0:8e01dca41002 | 134 | void snmp_inc_ipindelivers(void); |
donatien | 0:8e01dca41002 | 135 | void snmp_inc_ipoutrequests(void); |
donatien | 0:8e01dca41002 | 136 | void snmp_inc_ipoutdiscards(void); |
donatien | 0:8e01dca41002 | 137 | void snmp_inc_ipoutnoroutes(void); |
donatien | 0:8e01dca41002 | 138 | void snmp_inc_ipreasmreqds(void); |
donatien | 0:8e01dca41002 | 139 | void snmp_inc_ipreasmoks(void); |
donatien | 0:8e01dca41002 | 140 | void snmp_inc_ipreasmfails(void); |
donatien | 0:8e01dca41002 | 141 | void snmp_inc_ipfragoks(void); |
donatien | 0:8e01dca41002 | 142 | void snmp_inc_ipfragfails(void); |
donatien | 0:8e01dca41002 | 143 | void snmp_inc_ipfragcreates(void); |
donatien | 0:8e01dca41002 | 144 | void snmp_inc_iproutingdiscards(void); |
donatien | 0:8e01dca41002 | 145 | void snmp_insert_ipaddridx_tree(struct netif *ni); |
donatien | 0:8e01dca41002 | 146 | void snmp_delete_ipaddridx_tree(struct netif *ni); |
donatien | 0:8e01dca41002 | 147 | void snmp_insert_iprteidx_tree(u8_t dflt, struct netif *ni); |
donatien | 0:8e01dca41002 | 148 | void snmp_delete_iprteidx_tree(u8_t dflt, struct netif *ni); |
donatien | 0:8e01dca41002 | 149 | |
donatien | 0:8e01dca41002 | 150 | /* ICMP */ |
donatien | 0:8e01dca41002 | 151 | void snmp_inc_icmpinmsgs(void); |
donatien | 0:8e01dca41002 | 152 | void snmp_inc_icmpinerrors(void); |
donatien | 0:8e01dca41002 | 153 | void snmp_inc_icmpindestunreachs(void); |
donatien | 0:8e01dca41002 | 154 | void snmp_inc_icmpintimeexcds(void); |
donatien | 0:8e01dca41002 | 155 | void snmp_inc_icmpinparmprobs(void); |
donatien | 0:8e01dca41002 | 156 | void snmp_inc_icmpinsrcquenchs(void); |
donatien | 0:8e01dca41002 | 157 | void snmp_inc_icmpinredirects(void); |
donatien | 0:8e01dca41002 | 158 | void snmp_inc_icmpinechos(void); |
donatien | 0:8e01dca41002 | 159 | void snmp_inc_icmpinechoreps(void); |
donatien | 0:8e01dca41002 | 160 | void snmp_inc_icmpintimestamps(void); |
donatien | 0:8e01dca41002 | 161 | void snmp_inc_icmpintimestampreps(void); |
donatien | 0:8e01dca41002 | 162 | void snmp_inc_icmpinaddrmasks(void); |
donatien | 0:8e01dca41002 | 163 | void snmp_inc_icmpinaddrmaskreps(void); |
donatien | 0:8e01dca41002 | 164 | void snmp_inc_icmpoutmsgs(void); |
donatien | 0:8e01dca41002 | 165 | void snmp_inc_icmpouterrors(void); |
donatien | 0:8e01dca41002 | 166 | void snmp_inc_icmpoutdestunreachs(void); |
donatien | 0:8e01dca41002 | 167 | void snmp_inc_icmpouttimeexcds(void); |
donatien | 0:8e01dca41002 | 168 | void snmp_inc_icmpoutparmprobs(void); |
donatien | 0:8e01dca41002 | 169 | void snmp_inc_icmpoutsrcquenchs(void); |
donatien | 0:8e01dca41002 | 170 | void snmp_inc_icmpoutredirects(void); |
donatien | 0:8e01dca41002 | 171 | void snmp_inc_icmpoutechos(void); |
donatien | 0:8e01dca41002 | 172 | void snmp_inc_icmpoutechoreps(void); |
donatien | 0:8e01dca41002 | 173 | void snmp_inc_icmpouttimestamps(void); |
donatien | 0:8e01dca41002 | 174 | void snmp_inc_icmpouttimestampreps(void); |
donatien | 0:8e01dca41002 | 175 | void snmp_inc_icmpoutaddrmasks(void); |
donatien | 0:8e01dca41002 | 176 | void snmp_inc_icmpoutaddrmaskreps(void); |
donatien | 0:8e01dca41002 | 177 | |
donatien | 0:8e01dca41002 | 178 | /* TCP */ |
donatien | 0:8e01dca41002 | 179 | void snmp_inc_tcpactiveopens(void); |
donatien | 0:8e01dca41002 | 180 | void snmp_inc_tcppassiveopens(void); |
donatien | 0:8e01dca41002 | 181 | void snmp_inc_tcpattemptfails(void); |
donatien | 0:8e01dca41002 | 182 | void snmp_inc_tcpestabresets(void); |
donatien | 0:8e01dca41002 | 183 | void snmp_inc_tcpinsegs(void); |
donatien | 0:8e01dca41002 | 184 | void snmp_inc_tcpoutsegs(void); |
donatien | 0:8e01dca41002 | 185 | void snmp_inc_tcpretranssegs(void); |
donatien | 0:8e01dca41002 | 186 | void snmp_inc_tcpinerrs(void); |
donatien | 0:8e01dca41002 | 187 | void snmp_inc_tcpoutrsts(void); |
donatien | 0:8e01dca41002 | 188 | |
donatien | 0:8e01dca41002 | 189 | /* UDP */ |
donatien | 0:8e01dca41002 | 190 | void snmp_inc_udpindatagrams(void); |
donatien | 0:8e01dca41002 | 191 | void snmp_inc_udpnoports(void); |
donatien | 0:8e01dca41002 | 192 | void snmp_inc_udpinerrors(void); |
donatien | 0:8e01dca41002 | 193 | void snmp_inc_udpoutdatagrams(void); |
donatien | 0:8e01dca41002 | 194 | void snmp_insert_udpidx_tree(struct udp_pcb *pcb); |
donatien | 0:8e01dca41002 | 195 | void snmp_delete_udpidx_tree(struct udp_pcb *pcb); |
donatien | 0:8e01dca41002 | 196 | |
donatien | 0:8e01dca41002 | 197 | /* SNMP */ |
donatien | 0:8e01dca41002 | 198 | void snmp_inc_snmpinpkts(void); |
donatien | 0:8e01dca41002 | 199 | void snmp_inc_snmpoutpkts(void); |
donatien | 0:8e01dca41002 | 200 | void snmp_inc_snmpinbadversions(void); |
donatien | 0:8e01dca41002 | 201 | void snmp_inc_snmpinbadcommunitynames(void); |
donatien | 0:8e01dca41002 | 202 | void snmp_inc_snmpinbadcommunityuses(void); |
donatien | 0:8e01dca41002 | 203 | void snmp_inc_snmpinasnparseerrs(void); |
donatien | 0:8e01dca41002 | 204 | void snmp_inc_snmpintoobigs(void); |
donatien | 0:8e01dca41002 | 205 | void snmp_inc_snmpinnosuchnames(void); |
donatien | 0:8e01dca41002 | 206 | void snmp_inc_snmpinbadvalues(void); |
donatien | 0:8e01dca41002 | 207 | void snmp_inc_snmpinreadonlys(void); |
donatien | 0:8e01dca41002 | 208 | void snmp_inc_snmpingenerrs(void); |
donatien | 0:8e01dca41002 | 209 | void snmp_add_snmpintotalreqvars(u8_t value); |
donatien | 0:8e01dca41002 | 210 | void snmp_add_snmpintotalsetvars(u8_t value); |
donatien | 0:8e01dca41002 | 211 | void snmp_inc_snmpingetrequests(void); |
donatien | 0:8e01dca41002 | 212 | void snmp_inc_snmpingetnexts(void); |
donatien | 0:8e01dca41002 | 213 | void snmp_inc_snmpinsetrequests(void); |
donatien | 0:8e01dca41002 | 214 | void snmp_inc_snmpingetresponses(void); |
donatien | 0:8e01dca41002 | 215 | void snmp_inc_snmpintraps(void); |
donatien | 0:8e01dca41002 | 216 | void snmp_inc_snmpouttoobigs(void); |
donatien | 0:8e01dca41002 | 217 | void snmp_inc_snmpoutnosuchnames(void); |
donatien | 0:8e01dca41002 | 218 | void snmp_inc_snmpoutbadvalues(void); |
donatien | 0:8e01dca41002 | 219 | void snmp_inc_snmpoutgenerrs(void); |
donatien | 0:8e01dca41002 | 220 | void snmp_inc_snmpoutgetrequests(void); |
donatien | 0:8e01dca41002 | 221 | void snmp_inc_snmpoutgetnexts(void); |
donatien | 0:8e01dca41002 | 222 | void snmp_inc_snmpoutsetrequests(void); |
donatien | 0:8e01dca41002 | 223 | void snmp_inc_snmpoutgetresponses(void); |
donatien | 0:8e01dca41002 | 224 | void snmp_inc_snmpouttraps(void); |
donatien | 0:8e01dca41002 | 225 | void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid); |
donatien | 0:8e01dca41002 | 226 | void snmp_set_snmpenableauthentraps(u8_t *value); |
donatien | 0:8e01dca41002 | 227 | void snmp_get_snmpenableauthentraps(u8_t *value); |
donatien | 0:8e01dca41002 | 228 | |
donatien | 0:8e01dca41002 | 229 | /* LWIP_SNMP support not available */ |
donatien | 0:8e01dca41002 | 230 | /* define everything to be empty */ |
donatien | 0:8e01dca41002 | 231 | #else |
donatien | 0:8e01dca41002 | 232 | |
donatien | 0:8e01dca41002 | 233 | /* system */ |
donatien | 0:8e01dca41002 | 234 | #define snmp_set_sysdesr(str, len) |
donatien | 0:8e01dca41002 | 235 | #define snmp_set_sysobjid(oid); |
donatien | 0:8e01dca41002 | 236 | #define snmp_get_sysobjid_ptr(oid) |
donatien | 0:8e01dca41002 | 237 | #define snmp_inc_sysuptime() |
donatien | 0:8e01dca41002 | 238 | #define snmp_add_sysuptime(value) |
donatien | 0:8e01dca41002 | 239 | #define snmp_get_sysuptime(value) |
donatien | 0:8e01dca41002 | 240 | #define snmp_set_syscontact(ocstr, ocstrlen); |
donatien | 0:8e01dca41002 | 241 | #define snmp_set_sysname(ocstr, ocstrlen); |
donatien | 0:8e01dca41002 | 242 | #define snmp_set_syslocation(ocstr, ocstrlen); |
donatien | 0:8e01dca41002 | 243 | |
donatien | 0:8e01dca41002 | 244 | /* network interface */ |
donatien | 0:8e01dca41002 | 245 | #define snmp_add_ifinoctets(ni,value) |
donatien | 0:8e01dca41002 | 246 | #define snmp_inc_ifinucastpkts(ni) |
donatien | 0:8e01dca41002 | 247 | #define snmp_inc_ifinnucastpkts(ni) |
donatien | 0:8e01dca41002 | 248 | #define snmp_inc_ifindiscards(ni) |
donatien | 0:8e01dca41002 | 249 | #define snmp_add_ifoutoctets(ni,value) |
donatien | 0:8e01dca41002 | 250 | #define snmp_inc_ifoutucastpkts(ni) |
donatien | 0:8e01dca41002 | 251 | #define snmp_inc_ifoutnucastpkts(ni) |
donatien | 0:8e01dca41002 | 252 | #define snmp_inc_ifoutdiscards(ni) |
donatien | 0:8e01dca41002 | 253 | #define snmp_inc_iflist() |
donatien | 0:8e01dca41002 | 254 | #define snmp_dec_iflist() |
donatien | 0:8e01dca41002 | 255 | |
donatien | 0:8e01dca41002 | 256 | /* ARP */ |
donatien | 0:8e01dca41002 | 257 | #define snmp_insert_arpidx_tree(ni,ip) |
donatien | 0:8e01dca41002 | 258 | #define snmp_delete_arpidx_tree(ni,ip) |
donatien | 0:8e01dca41002 | 259 | |
donatien | 0:8e01dca41002 | 260 | /* IP */ |
donatien | 0:8e01dca41002 | 261 | #define snmp_inc_ipinreceives() |
donatien | 0:8e01dca41002 | 262 | #define snmp_inc_ipinhdrerrors() |
donatien | 0:8e01dca41002 | 263 | #define snmp_inc_ipinaddrerrors() |
donatien | 0:8e01dca41002 | 264 | #define snmp_inc_ipforwdatagrams() |
donatien | 0:8e01dca41002 | 265 | #define snmp_inc_ipinunknownprotos() |
donatien | 0:8e01dca41002 | 266 | #define snmp_inc_ipindiscards() |
donatien | 0:8e01dca41002 | 267 | #define snmp_inc_ipindelivers() |
donatien | 0:8e01dca41002 | 268 | #define snmp_inc_ipoutrequests() |
donatien | 0:8e01dca41002 | 269 | #define snmp_inc_ipoutdiscards() |
donatien | 0:8e01dca41002 | 270 | #define snmp_inc_ipoutnoroutes() |
donatien | 0:8e01dca41002 | 271 | #define snmp_inc_ipreasmreqds() |
donatien | 0:8e01dca41002 | 272 | #define snmp_inc_ipreasmoks() |
donatien | 0:8e01dca41002 | 273 | #define snmp_inc_ipreasmfails() |
donatien | 0:8e01dca41002 | 274 | #define snmp_inc_ipfragoks() |
donatien | 0:8e01dca41002 | 275 | #define snmp_inc_ipfragfails() |
donatien | 0:8e01dca41002 | 276 | #define snmp_inc_ipfragcreates() |
donatien | 0:8e01dca41002 | 277 | #define snmp_inc_iproutingdiscards() |
donatien | 0:8e01dca41002 | 278 | #define snmp_insert_ipaddridx_tree(ni) |
donatien | 0:8e01dca41002 | 279 | #define snmp_delete_ipaddridx_tree(ni) |
donatien | 0:8e01dca41002 | 280 | #define snmp_insert_iprteidx_tree(dflt, ni) |
donatien | 0:8e01dca41002 | 281 | #define snmp_delete_iprteidx_tree(dflt, ni) |
donatien | 0:8e01dca41002 | 282 | |
donatien | 0:8e01dca41002 | 283 | /* ICMP */ |
donatien | 0:8e01dca41002 | 284 | #define snmp_inc_icmpinmsgs() |
donatien | 0:8e01dca41002 | 285 | #define snmp_inc_icmpinerrors() |
donatien | 0:8e01dca41002 | 286 | #define snmp_inc_icmpindestunreachs() |
donatien | 0:8e01dca41002 | 287 | #define snmp_inc_icmpintimeexcds() |
donatien | 0:8e01dca41002 | 288 | #define snmp_inc_icmpinparmprobs() |
donatien | 0:8e01dca41002 | 289 | #define snmp_inc_icmpinsrcquenchs() |
donatien | 0:8e01dca41002 | 290 | #define snmp_inc_icmpinredirects() |
donatien | 0:8e01dca41002 | 291 | #define snmp_inc_icmpinechos() |
donatien | 0:8e01dca41002 | 292 | #define snmp_inc_icmpinechoreps() |
donatien | 0:8e01dca41002 | 293 | #define snmp_inc_icmpintimestamps() |
donatien | 0:8e01dca41002 | 294 | #define snmp_inc_icmpintimestampreps() |
donatien | 0:8e01dca41002 | 295 | #define snmp_inc_icmpinaddrmasks() |
donatien | 0:8e01dca41002 | 296 | #define snmp_inc_icmpinaddrmaskreps() |
donatien | 0:8e01dca41002 | 297 | #define snmp_inc_icmpoutmsgs() |
donatien | 0:8e01dca41002 | 298 | #define snmp_inc_icmpouterrors() |
donatien | 0:8e01dca41002 | 299 | #define snmp_inc_icmpoutdestunreachs() |
donatien | 0:8e01dca41002 | 300 | #define snmp_inc_icmpouttimeexcds() |
donatien | 0:8e01dca41002 | 301 | #define snmp_inc_icmpoutparmprobs() |
donatien | 0:8e01dca41002 | 302 | #define snmp_inc_icmpoutsrcquenchs() |
donatien | 0:8e01dca41002 | 303 | #define snmp_inc_icmpoutredirects() |
donatien | 0:8e01dca41002 | 304 | #define snmp_inc_icmpoutechos() |
donatien | 0:8e01dca41002 | 305 | #define snmp_inc_icmpoutechoreps() |
donatien | 0:8e01dca41002 | 306 | #define snmp_inc_icmpouttimestamps() |
donatien | 0:8e01dca41002 | 307 | #define snmp_inc_icmpouttimestampreps() |
donatien | 0:8e01dca41002 | 308 | #define snmp_inc_icmpoutaddrmasks() |
donatien | 0:8e01dca41002 | 309 | #define snmp_inc_icmpoutaddrmaskreps() |
donatien | 0:8e01dca41002 | 310 | /* TCP */ |
donatien | 0:8e01dca41002 | 311 | #define snmp_inc_tcpactiveopens() |
donatien | 0:8e01dca41002 | 312 | #define snmp_inc_tcppassiveopens() |
donatien | 0:8e01dca41002 | 313 | #define snmp_inc_tcpattemptfails() |
donatien | 0:8e01dca41002 | 314 | #define snmp_inc_tcpestabresets() |
donatien | 0:8e01dca41002 | 315 | #define snmp_inc_tcpinsegs() |
donatien | 0:8e01dca41002 | 316 | #define snmp_inc_tcpoutsegs() |
donatien | 0:8e01dca41002 | 317 | #define snmp_inc_tcpretranssegs() |
donatien | 0:8e01dca41002 | 318 | #define snmp_inc_tcpinerrs() |
donatien | 0:8e01dca41002 | 319 | #define snmp_inc_tcpoutrsts() |
donatien | 0:8e01dca41002 | 320 | |
donatien | 0:8e01dca41002 | 321 | /* UDP */ |
donatien | 0:8e01dca41002 | 322 | #define snmp_inc_udpindatagrams() |
donatien | 0:8e01dca41002 | 323 | #define snmp_inc_udpnoports() |
donatien | 0:8e01dca41002 | 324 | #define snmp_inc_udpinerrors() |
donatien | 0:8e01dca41002 | 325 | #define snmp_inc_udpoutdatagrams() |
donatien | 0:8e01dca41002 | 326 | #define snmp_insert_udpidx_tree(pcb) |
donatien | 0:8e01dca41002 | 327 | #define snmp_delete_udpidx_tree(pcb) |
donatien | 0:8e01dca41002 | 328 | |
donatien | 0:8e01dca41002 | 329 | /* SNMP */ |
donatien | 0:8e01dca41002 | 330 | #define snmp_inc_snmpinpkts() |
donatien | 0:8e01dca41002 | 331 | #define snmp_inc_snmpoutpkts() |
donatien | 0:8e01dca41002 | 332 | #define snmp_inc_snmpinbadversions() |
donatien | 0:8e01dca41002 | 333 | #define snmp_inc_snmpinbadcommunitynames() |
donatien | 0:8e01dca41002 | 334 | #define snmp_inc_snmpinbadcommunityuses() |
donatien | 0:8e01dca41002 | 335 | #define snmp_inc_snmpinasnparseerrs() |
donatien | 0:8e01dca41002 | 336 | #define snmp_inc_snmpintoobigs() |
donatien | 0:8e01dca41002 | 337 | #define snmp_inc_snmpinnosuchnames() |
donatien | 0:8e01dca41002 | 338 | #define snmp_inc_snmpinbadvalues() |
donatien | 0:8e01dca41002 | 339 | #define snmp_inc_snmpinreadonlys() |
donatien | 0:8e01dca41002 | 340 | #define snmp_inc_snmpingenerrs() |
donatien | 0:8e01dca41002 | 341 | #define snmp_add_snmpintotalreqvars(value) |
donatien | 0:8e01dca41002 | 342 | #define snmp_add_snmpintotalsetvars(value) |
donatien | 0:8e01dca41002 | 343 | #define snmp_inc_snmpingetrequests() |
donatien | 0:8e01dca41002 | 344 | #define snmp_inc_snmpingetnexts() |
donatien | 0:8e01dca41002 | 345 | #define snmp_inc_snmpinsetrequests() |
donatien | 0:8e01dca41002 | 346 | #define snmp_inc_snmpingetresponses() |
donatien | 0:8e01dca41002 | 347 | #define snmp_inc_snmpintraps() |
donatien | 0:8e01dca41002 | 348 | #define snmp_inc_snmpouttoobigs() |
donatien | 0:8e01dca41002 | 349 | #define snmp_inc_snmpoutnosuchnames() |
donatien | 0:8e01dca41002 | 350 | #define snmp_inc_snmpoutbadvalues() |
donatien | 0:8e01dca41002 | 351 | #define snmp_inc_snmpoutgenerrs() |
donatien | 0:8e01dca41002 | 352 | #define snmp_inc_snmpoutgetrequests() |
donatien | 0:8e01dca41002 | 353 | #define snmp_inc_snmpoutgetnexts() |
donatien | 0:8e01dca41002 | 354 | #define snmp_inc_snmpoutsetrequests() |
donatien | 0:8e01dca41002 | 355 | #define snmp_inc_snmpoutgetresponses() |
donatien | 0:8e01dca41002 | 356 | #define snmp_inc_snmpouttraps() |
donatien | 0:8e01dca41002 | 357 | #define snmp_get_snmpgrpid_ptr(oid) |
donatien | 0:8e01dca41002 | 358 | #define snmp_set_snmpenableauthentraps(value) |
donatien | 0:8e01dca41002 | 359 | #define snmp_get_snmpenableauthentraps(value) |
donatien | 0:8e01dca41002 | 360 | |
donatien | 0:8e01dca41002 | 361 | #endif /* LWIP_SNMP */ |
donatien | 0:8e01dca41002 | 362 | |
donatien | 0:8e01dca41002 | 363 | #ifdef __cplusplus |
donatien | 0:8e01dca41002 | 364 | } |
donatien | 0:8e01dca41002 | 365 | #endif |
donatien | 0:8e01dca41002 | 366 | |
donatien | 0:8e01dca41002 | 367 | #endif /* __LWIP_SNMP_H__ */ |