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