Esempio n. 1
0
static void
agentx_reopen_sysORTable(const struct sysORTable* data, void* v)
{
    netsnmp_session *agentx_ss = (netsnmp_session *) v;
  
    agentx_add_agentcaps(agentx_ss, data->OR_oid, data->OR_oidlen,
                         data->OR_descr);
}
Esempio n. 2
0
static int agentx_sysOR_callback (int majorID, int minorID, void *serverarg, void *clientarg)
{
    const struct register_sysOR_parameters *reg_parms = (const struct register_sysOR_parameters *) serverarg;

    netsnmp_session *agentx_ss = *(netsnmp_session **) clientarg;

    if (minorID == SNMPD_CALLBACK_REG_SYSOR)
        return agentx_add_agentcaps (agentx_ss, reg_parms->name, reg_parms->namelen, reg_parms->descr);
    else
        return agentx_remove_agentcaps (agentx_ss, reg_parms->name, reg_parms->namelen);
}