HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //etc/snmp/mib2c.check_values_local.conf
## -*- c -*-
######################################################################
## Do the .h file
######################################################################
@open ${name}_checkfns_local.h@
/*
 * Note: this file originally auto-generated by mib2c using
 *        : $Id$
 * 
 */
#ifndef $name.uc_CHECKFNS_H
#define $name.uc_CHECKFNS_H

@foreach $t table@
/* these functions are designed to check incoming values for 
columns in the $t table for legality with respect to 
datatype and value according to local conventions.  You should modify
them as appropriate.  They will be called from parent check_value
functions that are auto-generated using mib2c and the parent functions
should NOT be modified.
 */

  @foreach $i column@
    @if $i.access =~ /(Write|Create)/@
    int check_${i}_local(int type, $i.decl *val, size_t val_len, $i.decl *old_val, size_t old_val_len);
    @end@
  @end@
@end@

#endif /* $name.uc_CHECKFNS_H */

######################################################################
## Do the .c file
######################################################################
@open ${name}_checkfns_local.c@
/*
 * Note: this file originally auto-generated by mib2c using
 *        $Id$
 */

/* standard headers */
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "${name}_checkfns.h"
#include "${name}_enums.h"
@run mib2c.column_enums.conf@

@foreach $t table@
  @foreach $i column@
    @if $i.access =~ /(Write|Create)/@
/** Decides if an incoming value for the $i mib node is legal, from a local implementation specific viewpoint.
 *  @param type    The incoming data type.
 *  @param val     The value to be checked.
 *  @param val_len The length of data stored in val (in bytes).
 *  @return 0 if the incoming value is legal, an SNMP error code otherwise.
 */
    int
    check_${i}_local(int type, $i.decl *val, size_t val_len, $i.decl *old_val, size_t old_val_len) {

    /** XXX: you may want to check aspects of the new value that
       were not covered by the automatic checks by the parent function. */

    /** XXX: you make want to check that the requested change from
        the old value to the new value is legal (ie, the transistion
        from one value to another is legal */
      
    /** if everything looks ok, return SNMP_ERR_NOERROR */
      return SNMP_ERR_NOERROR;
    }
    @end@
  @end@
@end@