403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.46
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/include/net-snmp/agent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/include/net-snmp/agent/sysORTable.h
#ifndef NETSNMP_SYSORTABLE_H
#define NETSNMP_SYSORTABLE_H

struct sysORTable {
    char            *OR_descr;
    oid             *OR_oid;
    size_t           OR_oidlen;
    netsnmp_session *OR_sess;
    u_long           OR_uptime;
};

struct register_sysOR_parameters {
    char            *descr;
    oid             *name;
    size_t           namelen;
};

#define SYS_ORTABLE_REGISTERED_OK              0
#define SYS_ORTABLE_REGISTRATION_FAILED       -1
#define SYS_ORTABLE_UNREGISTERED_OK            0
#define SYS_ORTABLE_NO_SUCH_REGISTRATION      -1

#include <net-snmp/agent/agent_callbacks.h>

#define REGISTER_SYSOR_TABLE(theoid, len, descr)           \
  do {                                                     \
    struct sysORTable t;                                   \
    t.OR_descr = NETSNMP_REMOVE_CONST(char *, descr);      \
    t.OR_oid = theoid;                                     \
    t.OR_oidlen = len;                                     \
    t.OR_sess = NULL;                                      \
    t.OR_uptime = 0;                                       \
    snmp_call_callbacks(SNMP_CALLBACK_APPLICATION,         \
                        SNMPD_CALLBACK_REQ_REG_SYSOR, &t); \
  } while(0);

#define REGISTER_SYSOR_ENTRY(theoid, descr)                     \
  REGISTER_SYSOR_TABLE(theoid, sizeof(theoid) / sizeof(oid),    \
                       descr)

#define UNREGISTER_SYSOR_TABLE(theoid, len)                     \
  do {                                                          \
    struct sysORTable t;                                        \
    t.OR_descr = NULL;                                          \
    t.OR_oid = theoid;                                          \
    t.OR_oidlen = len;                                          \
    t.OR_sess = NULL;                                           \
    t.OR_uptime = 0;                                            \
    snmp_call_callbacks(SNMP_CALLBACK_APPLICATION,              \
                        SNMPD_CALLBACK_REQ_UNREG_SYSOR, &t);    \
  } while(0);

#define UNREGISTER_SYSOR_ENTRY(theoid)                          \
  UNREGISTER_SYSOR_TABLE(theoid, sizeof(theoid) / sizeof(oid))

#define UNREGISTER_SYSOR_SESS(sess)                             \
  snmp_call_callbacks(SNMP_CALLBACK_APPLICATION,                \
                      SNMPD_CALLBACK_REQ_UNREG_SYSOR_SESS,      \
                      sess);


#endif /* NETSNMP_SYSORTABLE_H */

Youez - 2016 - github.com/yon3zu
LinuXploit