/** * @file * SNMP MIB2 API */ /* * 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. * * This file is part of the lwIP TCP/IP stack. * * Author: Dirk Ziegelmeier * */ #ifndef LWIP_HDR_APPS_SNMP_MIB2_H #define LWIP_HDR_APPS_SNMP_MIB2_H #include "lwip/apps/snmp_opts.h" #ifdef __cplusplus extern "C" { #endif #if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ #if SNMP_LWIP_MIB2 #include "lwip/apps/snmp_core.h" extern const struct snmp_mib mib2; #if SNMP_USE_NETCONN #include "lwip/apps/snmp_threadsync.h" void snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg); extern struct snmp_threadsync_instance snmp_mib2_lwip_locks; #endif #ifndef SNMP_SYSSERVICES #define SNMP_SYSSERVICES ((1 << 6) | (1 << 3) | ((IP_FORWARD) << 2)) #endif void snmp_mib2_set_sysdescr(const u8_t* str, const u16_t* len); /* read-only be definition */ void snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); void snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen); void snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); void snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen); void snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); void snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen); #endif /* SNMP_LWIP_MIB2 */ #endif /* LWIP_SNMP */ #ifdef __cplusplus } #endif #endif /* LWIP_HDR_APPS_SNMP_MIB2_H */