Fw: cache load never gets called

Kathy McLeod <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <OF180D35D8.F21BCC9F-ON86257704.0074DA30-86257704.00750DC6@us.ibm.com>

Hi -

I am trying to combine notes so you get all the info.  Here is a history of
the problem - in a nutshell, after I get called to free the cache, I never
get another load call.  Let me know if you need more info.  There are files
attached below.

I replaced the table init code with the call to
netsnmp_cache_check_and_reload( cache ) and that seems to be working ok.
(When I ran the mib2c with the cache option, it still generated the comment
to "initialize the table here", so I assumed I still had to initialize it
even with the cache.)

After 60 seconds, the cache free is called and then when I issue a command,
I don't see any load debug messages.

If I don't put the netsnmp_cache_check_and_reload( cache ) call in the
table init routine, the load is not called when I issue a command.

In either case, the status of the snmpd continues to show "running - I am
not seeing the agent crash.  So I am not seeing exactly what you are.



Kathy McLeod

----- Forwarded by Kathy McLeod/Rochester/IBM on 04/13/2010 04:16 PM -----
                                                                           
             Kathy                                                         
             McLeod/Rochester/                                             
             IBM@IBMUS                                                  To 
                                       [email protected] 
             04/06/2010 02:59          t                                   
             PM                                                         cc 
                                                                           
                                                                   Subject 
                                       Re: cache load never gets called    
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





Thanks.  That worked and it now does cache loads/frees.  But it is not
working as I expected.

1)  I thought it would always issue a free before a load.  However, the
first time I issue a command (this happens whether I issue it right away
after the table init routine or if I wait more than 60 seconds (my timeout
value), I see the load without a free first.  My table is now 8 rows long
instead of 4.  (The table init creates indexes 1 - 4, and the cache load
creates 5 - 8.  See screen1 file attached.)

2) After 60 seconds, I see the cache free.  This works ok, but when I issue
another command, I never see another load and I get an error message for
the command.

I have included my .c, a debug file, and the output of my snmptable
command.  I have net-snmp-5.3.2.2-7.el5_4.2 on RedHat 5.4. Let me know if
you need more info.  Thanks.

(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)

Kathy McLeod



             Dave Shield
             <D.T.Shield@liver
             pool.ac.uk>                                                To
             Sent by:                  Kathy McLeod/Rochester/IBM@IBMUS
             dave.shield@googl                                          cc
             email.com                 [email protected]
                                       t
                                                                   Subject
             04/06/2010 04:51          Re: cache load never gets called
             AM









On 30 March 2010 21:12, Kathy McLeod <[email protected]> wrote:
> I ran the mib2c to generate a cache handler for a file created using
> mib2c.table_data.conf.  The main function still works ok, but even tho I
> set the cache timeout value to -1, it never seems to expire.  I also
tested
> with a timeout value of 60 and it didn't expire.  The only debug
statements
> I get are the ones in the init and deinit routines.  I am not able to
> figure out what is wrong.

The cache helper is not getting injected into the helper chain correctly.
It needs to be inserted before the handler "TABLE_TDATA_NAME"
rather than "TABLE_DATA_NAME".

I'll tweak the mib2c config file accordingly.

Dave
(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)
------------------------------------------------------------------------------

Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lldpPortConfigTable.c (application/octet-stream, 19.6 KB)
/*
 * Note: this file originally auto-generated by mib2c using
 *  : mib2c.table_data.conf 16004 2007-03-27 09:20:28Z dts12 $
 */

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/library/tools.h>
#include <net-snmp/agent/cache_handler.h>
#include <net-snmp/agent/table_tdata.h>
#include "lldpPortConfigTable.h"

static oid      lldpPortConfigTable_oid[] =
        { 1, 0, 8802, 1, 1, 2, 1, 1, 6 };
size_t          lldpPortConfigTable_oid_len =
        OID_LENGTH(lldpPortConfigTable_oid);

netsnmp_tdata_row * lldpPortConfigTable_createEntry(netsnmp_tdata * table_data,
                                long lldpPortConfigPortNum);

static char bits[] = {0x80, 0x40, 0x20, 0x10};
static char nullset = 0x00;

static port_tab_entry_t *tempNode;

int checkNumericRange(int min, int max, int newValue)
{
   if (newValue >= min &&
       newValue <= max)
       return(SNMP_ERR_NOERROR);
   else
      return(SNMP_ERR_WRONGVALUE);
}

int checkBoolean(int newValue)
{
   if (newValue == TRUE ||
       newValue == FALSE)
       return(SNMP_ERR_NOERROR);
   else
      return(SNMP_ERR_WRONGVALUE);
}

int checkTlvsBITS(int newVal)
{
    if (newVal == nullset ||
        newVal == bits[0] ||
        newVal == bits[1] ||
        newVal == bits[2] ||
        newVal == bits[3])
        return(SNMP_ERR_NOERROR);
    else
      return(SNMP_ERR_WRONGVALUE);	
} 

   /*
     * Typical data structure for a row entry 
     */
struct lldpPortConfigTable_entry {
    /*
     * Index values 
     */
    long            lldpPortConfigPortNum;

    /*
     * Column values 
     */
    long            lldpPortConfigAdminStatus;
    long            old_lldpPortConfigAdminStatus;
    long            lldpPortConfigNotificationEnable;
    long            old_lldpPortConfigNotificationEnable;
    char            lldpPortConfigTLVsTxEnable[1];
    size_t          lldpPortConfigTLVsTxEnable_len;
    char            old_lldpPortConfigTLVsTxEnable[1];
    size_t          old_lldpPortConfigTLVsTxEnable_len;

    int             valid;
};

/** Initializes the lldpPortConfigTable module */
void
init_lldpPortConfigTable(void)
{
    /*
     * here we initialize all the tables we're planning on supporting 
     */
    initialize_table_lldpPortConfigTable();
}

/*# Determine the first/last column names */

/** Initialize the lldpPortConfigTable table by defining its contents and how it's structured */
void
initialize_table_lldpPortConfigTable(void)
{
    static oid      lldpPortConfigTable_oid[] =
        { 1, 0, 8802, 1, 1, 2, 1, 1, 6 };
    size_t          lldpPortConfigTable_oid_len =
        OID_LENGTH(lldpPortConfigTable_oid);
    netsnmp_handler_registration *reg;
    netsnmp_tdata  *table_data;
    netsnmp_table_registration_info *table_info;
    netsnmp_cache  *cache;
    netsnmp_tdata_row *row; 
    short int i = 0;
    struct lldpPortConfigTable_entry * ent;
     
    //entry = SNMP_MALLOC_TYPEDEF(struct lldpPortConfigTable_entry);
    
    //if(!entry)
      //return 0;

 //   row = netsnmp_tdata_create_row();
    //if(!row) {
      //  SNMP_FREE(entry);
       // return 0;
//    }
//    row->data = entry;  
    DEBUGMSGTL(("lldpPortConfigTable", "initing table1\n"));
    if (alreadyReg > 0)
      return;

    DEBUGMSGTL(("lldpPortConfigTable", "initing table\n"));	


    reg =
        netsnmp_create_handler_registration("lldpPortConfigTable",
                                            lldpPortConfigTable_handler,
                                            lldpPortConfigTable_oid,
                                            lldpPortConfigTable_oid_len,
                                            HANDLER_CAN_RWRITE);

    table_data = netsnmp_tdata_create_table("lldpPortConfigTable", 0);
    table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
    netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER,   /* index: lldpPortConfigPortNum */
                                     0);

    table_info->min_column = COLUMN_LLDPPORTCONFIGADMINSTATUS;
    table_info->max_column = COLUMN_LLDPPORTCONFIGTLVSTXENABLE;

    netsnmp_tdata_register(reg, table_data, table_info);
    cache = netsnmp_cache_create(LLDPPORTCONFIGTABLE_TIMEOUT,
                                 lldpPortConfigTable_load,
                                 lldpPortConfigTable_free,
                                 lldpPortConfigTable_oid,
                                 lldpPortConfigTable_oid_len);
    cache->magic = (void *) table_data;
    netsnmp_inject_handler_before(reg, netsnmp_cache_handler_get(cache), TABLE_TDATA_NAME);

        /*
         * Initialise the contents of the table here 
         */
    DEBUGMSGTL(("lldpPortConfigTable", "for loop\n"));

    tempNode = SNMP_MALLOC_TYPEDEF(port_tab_entry_t);
    for(i=0; i<4; i++)
    {
DEBUGMSGTL(("lldpPortConfigTable", "for loop%d\n", i));
       
       tempNode->port_tab_portnum = i+1;  
       tempNode->port_tab_status  = (i+1) % 5; /* 1 thru 4 */
       tempNode->port_tab_notify = i % 2;     /* true or false */
       tempNode->port_tab_tlvs     = bits[i];   /* 0 - 3 */
       row = lldpPortConfigTable_createEntry(table_data, tempNode->port_tab_portnum);

       ent = (struct lldpPortConfigTable_entry*) (row->data);
       ent->lldpPortConfigAdminStatus = tempNode->port_tab_status;
       ent->old_lldpPortConfigAdminStatus = 0;
       ent->lldpPortConfigNotificationEnable = tempNode->port_tab_notify;
       ent->old_lldpPortConfigAdminStatus = 0;
       ent->lldpPortConfigTLVsTxEnable[0] = tempNode->port_tab_tlvs;
       ent->lldpPortConfigTLVsTxEnable_len = 1;
       ent->old_lldpPortConfigTLVsTxEnable[0] = 0;
       ent->old_lldpPortConfigTLVsTxEnable_len = 1;
    }
    SNMP_FREE(tempNode);
    tempNode = NULL;
}

void  deinit_lldpPortConfigTable(void) {
     DEBUGMSGTL(("lldpPortConfigTable", "deiniting1 mibs\n"));
     if (alreadyDereg > 0)
	return;	
     DEBUGMSGTL(("lldpPortConfigTable", "deiniting mibs\n")); 	
     /* int unregister_mib(oid *, size_t); */
     unregister_mib(lldpPortConfigTable_oid, lldpPortConfigTable_oid_len); 
     alreadyDereg = 1;	
}

 

/*
 * create a new row in the table 
 */
netsnmp_tdata_row *lldpPortConfigTable_createEntry(netsnmp_tdata *
                                                   table_data,
                                                   long
                                                   lldpPortConfigPortNum) {
    struct lldpPortConfigTable_entry *entry;
    netsnmp_tdata_row *row;        
         
    entry = SNMP_MALLOC_TYPEDEF(struct lldpPortConfigTable_entry);
    if(!entry)
      return NULL;

    row = netsnmp_tdata_create_row();
    if(!row) {
        SNMP_FREE(entry);
        return NULL;
    }
    row->data = entry;
    entry->lldpPortConfigPortNum = lldpPortConfigPortNum;
// test ascending but not consecutive indexes 
//    entry->lldpPortConfigPortNum = 2*lldpPortConfigPortNum; 
// test unordered index
//    entry->lldpPortConfigPortNum = 60 - (8*lldpPortConfigPortNum);
    netsnmp_tdata_row_add_index(row, ASN_INTEGER,
                                &(entry->lldpPortConfigPortNum),
                                sizeof(entry->lldpPortConfigPortNum));
    /*****************************/
/*    entry->lldpPortConfigAdminStatus = tempNode->port_tab_status;
    entry->old_lldpPortConfigAdminStatus = 0;
    entry->lldpPortConfigNotificationEnable = tempNode->port_tab_notify;
    entry->old_lldpPortConfigAdminStatus = 0;
    entry->lldpPortConfigTLVsTxEnable[0] = tempNode->port_tab_tlvs;
    entry->lldpPortConfigTLVsTxEnable_len = 1;
    entry->old_lldpPortConfigTLVsTxEnable[0] = 0;
    entry->old_lldpPortConfigTLVsTxEnable_len = 1; */
/*****************************/
    netsnmp_tdata_add_row(table_data, row);
    return row;
}

/*
 * remove a row from the table 
 */
void    
    lldpPortConfigTable_removeEntry(netsnmp_tdata * table_data,
                                    netsnmp_tdata_row * row) {
    struct lldpPortConfigTable_entry *entry;

    if (!row)
        return;                 /* Nothing to remove */
    entry = (struct lldpPortConfigTable_entry *)
        netsnmp_tdata_remove_and_delete_row(table_data, row);
    if (entry)
        SNMP_FREE(entry);       /* XXX - release any other internal resources */
}

/*
 * Example cache handling - set up table_data list from a suitable file 
 */
int
    lldpPortConfigTable_load(netsnmp_cache * cache, void *vmagic) {
    netsnmp_tdata * table = (netsnmp_tdata *) vmagic;
    netsnmp_tdata_row *row;

    short int i;  
    struct lldpPortConfigTable_entry * ent;
     
/*    entry = SNMP_MALLOC_TYPEDEF(struct lldpPortConfigTable_entry);
    
    if(!entry)
      return 0;

    row = netsnmp_tdata_create_row();
    if(!row) {
        SNMP_FREE(entry);
        return 0;
    }
    row->data = entry; */
 
DEBUGMSGTL(("lldpPortConfigTable", "cache load\n"));  
         
     /*
         * Initialise the contents of the table here 
         */
    DEBUGMSGTL(("lldpPortConfigTable", "cache for loop\n"));

    tempNode = SNMP_MALLOC_TYPEDEF(port_tab_entry_t);
    for(i=4; i<8; i++)
    {
DEBUGMSGTL(("lldpPortConfigTable", "cache for loop%d\n", i));
       
       tempNode->port_tab_portnum = i+1;  
       tempNode->port_tab_status  = (i+1) % 4 + 1; /* 1 thru 4 */
       tempNode->port_tab_notify = i % 2;     /* true or false */
       tempNode->port_tab_tlvs     = bits[i % 4];   /* 0 - 3 */
       row = lldpPortConfigTable_createEntry(table, tempNode->port_tab_portnum);
       ent = row->data;
       ent->lldpPortConfigAdminStatus = tempNode->port_tab_status;
       ent->old_lldpPortConfigAdminStatus = 0;
       ent->lldpPortConfigNotificationEnable = tempNode->port_tab_notify;
       ent->old_lldpPortConfigAdminStatus = 0;
       ent->lldpPortConfigTLVsTxEnable[0] = tempNode->port_tab_tlvs;
       ent->lldpPortConfigTLVsTxEnable_len = 1;
       ent->old_lldpPortConfigTLVsTxEnable[0] = 0;
       ent->old_lldpPortConfigTLVsTxEnable_len = 1;
DEBUGMSGTL(("lldpPortConfigTable", "cache for loop bottom%d\n", i));
   }
   SNMP_FREE(tempNode); 
   tempNode = NULL;
DEBUGMSGTL(("lldpPortConfigTable", "cache after loop\n"));
   return(SNMP_ERR_NOERROR);
    
}

void 
    lldpPortConfigTable_free(netsnmp_cache * cache, void *vmagic) {
//    netsnmp_tdata * table = (netsnmp_tdata *) vmagic;
    netsnmp_tdata_row *this;
    netsnmp_tdata * table;
    table = (netsnmp_tdata *) vmagic;
DEBUGMSGTL(("lldpPortConfigTable", "cache free\n"));

/* change from netsnmp_tdata_get_first_row */
    while ((this = netsnmp_tdata_row_first(table))) {
DEBUGMSGTL(("lldpPortConfigTable", "cache free while\n"));        
        netsnmp_tdata_remove_and_delete_row(table, this);
DEBUGMSGTL(("lldpPortConfigTable", "cache free while2\n"));  
    }
}

/** handles requests for the lldpPortConfigTable table */
 int lldpPortConfigTable_handler(netsnmp_mib_handler *handler,
                                netsnmp_handler_registration *reginfo,
                                netsnmp_agent_request_info *reqinfo,
                                netsnmp_request_info *requests) {

    netsnmp_request_info *request;
    netsnmp_table_request_info *table_info;
    netsnmp_tdata * table_data;
    netsnmp_tdata_row *table_row;
    struct lldpPortConfigTable_entry *table_entry;
    int  ret;

    switch (reqinfo->mode) {
        /*
         * Read-support (also covers GetNext requests)
         */
    case MODE_GET:
        for (request = requests; request; request = request->next) {
            table_entry = (struct lldpPortConfigTable_entry *)
                netsnmp_tdata_extract_entry(request);
            table_info = netsnmp_extract_table_info(request);

            switch (table_info->colnum) {
            case COLUMN_LLDPPORTCONFIGADMINSTATUS:
                if (!table_entry) {
                    netsnmp_set_request_error(reqinfo, request,
                                              SNMP_NOSUCHINSTANCE);
                    continue;
                }
                snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER,
                                           table_entry->
                                           lldpPortConfigAdminStatus);
                break;
            case COLUMN_LLDPPORTCONFIGNOTIFICATIONENABLE:
                if (!table_entry) {
                    netsnmp_set_request_error(reqinfo, request,
                                              SNMP_NOSUCHINSTANCE);
                    continue;
                }
                snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER,
                                           table_entry->
                                           lldpPortConfigNotificationEnable);
                break;
            case COLUMN_LLDPPORTCONFIGTLVSTXENABLE:
                if (!table_entry) {
                    netsnmp_set_request_error(reqinfo, request,
                                              SNMP_NOSUCHINSTANCE);
                    continue;
                }
                snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR,
                                         (u_char *) table_entry->
                                         lldpPortConfigTLVsTxEnable,
                                         table_entry->
                                         lldpPortConfigTLVsTxEnable_len);
                break;
            default:
                netsnmp_set_request_error(reqinfo, request,
                                          SNMP_NOSUCHOBJECT);
                break;
            }
        }
        break;

        /*
         * Write-support
         */
    case MODE_SET_RESERVE1:
        for (request = requests; request; request = request->next) {
            table_entry = (struct lldpPortConfigTable_entry *)
                netsnmp_tdata_extract_entry(request);
            table_info = netsnmp_extract_table_info(request);

            switch (table_info->colnum) {
            case COLUMN_LLDPPORTCONFIGADMINSTATUS:
                /*
                 * or possibly 'netsnmp_check_vb_int_range' 
                 */
                ret = netsnmp_check_vb_int(request->requestvb);
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                }

                ret = checkNumericRange(1, 4, *request->requestvb->val.integer);
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                }
                break;
            case COLUMN_LLDPPORTCONFIGNOTIFICATIONENABLE:
                /*
                 * or possibly 'netsnmp_check_vb_int_range' 
                 */
                ret = netsnmp_check_vb_int(request->requestvb);
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                }

                ret = checkBoolean(*request->requestvb->val.integer);
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                } 
                break;
            case COLUMN_LLDPPORTCONFIGTLVSTXENABLE:
                /*
                 * or possiblc 'netsnmp_check_vb_type_and_size' 
                 */
                ret =
                    netsnmp_check_vb_type_and_max_size(request->requestvb,
                                                       ASN_OCTET_STR,
                                                       sizeof(table_entry->
                                                              lldpPortConfigTLVsTxEnable));
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                }

                ret = checkTlvsBITS(*request->requestvb->val.string);
                if (ret != SNMP_ERR_NOERROR) {
                    netsnmp_set_request_error(reqinfo, request, ret);
                    return SNMP_ERR_NOERROR;
                }
                break;
            default:
                netsnmp_set_request_error(reqinfo, request,
                                          SNMP_ERR_NOTWRITABLE);
                return SNMP_ERR_NOERROR;
            }
        }
        break;

    case MODE_SET_RESERVE2:
        break;

    case MODE_SET_FREE:
        break;

    case MODE_SET_ACTION:
        for (request = requests; request; request = request->next) {
            table_entry = (struct lldpPortConfigTable_entry *)
                netsnmp_tdata_extract_entry(request);
            table_info = netsnmp_extract_table_info(request);

            switch (table_info->colnum) {
            case COLUMN_LLDPPORTCONFIGADMINSTATUS:
                table_entry->old_lldpPortConfigAdminStatus =
                    table_entry->lldpPortConfigAdminStatus;
                table_entry->lldpPortConfigAdminStatus =
                    *request->requestvb->val.integer;
                break;
            case COLUMN_LLDPPORTCONFIGNOTIFICATIONENABLE:
                table_entry->old_lldpPortConfigNotificationEnable =
                    table_entry->lldpPortConfigNotificationEnable;
                table_entry->lldpPortConfigNotificationEnable =
                    *request->requestvb->val.integer;
                break;
            case COLUMN_LLDPPORTCONFIGTLVSTXENABLE:
                memcpy(table_entry->old_lldpPortConfigTLVsTxEnable,
                       table_entry->lldpPortConfigTLVsTxEnable,
                       sizeof(table_entry->lldpPortConfigTLVsTxEnable));
                table_entry->old_lldpPortConfigTLVsTxEnable_len =
                    table_entry->lldpPortConfigTLVsTxEnable_len;
                memset(table_entry->lldpPortConfigTLVsTxEnable, 0,
                       sizeof(table_entry->lldpPortConfigTLVsTxEnable));
                memcpy(table_entry->lldpPortConfigTLVsTxEnable,
                       request->requestvb->val.string,
                       request->requestvb->val_len);
                table_entry->lldpPortConfigTLVsTxEnable_len =
                    request->requestvb->val_len;
                break;
            }
        }
        break;

    case MODE_SET_UNDO:
        for (request = requests; request; request = request->next) {
            table_entry = (struct lldpPortConfigTable_entry *)
                netsnmp_tdata_extract_entry(request);
            table_row = netsnmp_tdata_extract_row(request);
            table_data = netsnmp_tdata_extract_table(request);
            table_info = netsnmp_extract_table_info(request);

            switch (table_info->colnum) {
            case COLUMN_LLDPPORTCONFIGADMINSTATUS:
                table_entry->lldpPortConfigAdminStatus =
                    table_entry->old_lldpPortConfigAdminStatus;
                table_entry->old_lldpPortConfigAdminStatus = 0;
                break;
            case COLUMN_LLDPPORTCONFIGNOTIFICATIONENABLE:
                table_entry->lldpPortConfigNotificationEnable =
                    table_entry->old_lldpPortConfigNotificationEnable;
                table_entry->old_lldpPortConfigNotificationEnable = 0;
                break;
            case COLUMN_LLDPPORTCONFIGTLVSTXENABLE:
                memcpy(table_entry->lldpPortConfigTLVsTxEnable,
                       table_entry->old_lldpPortConfigTLVsTxEnable,
                       sizeof(table_entry->lldpPortConfigTLVsTxEnable));
                memset(table_entry->old_lldpPortConfigTLVsTxEnable, 0,
                       sizeof(table_entry->lldpPortConfigTLVsTxEnable));
                table_entry->lldpPortConfigTLVsTxEnable_len =
                    table_entry->old_lldpPortConfigTLVsTxEnable_len;
                break;
            }
        }
        break;

    case MODE_SET_COMMIT:
        break;
    }
    return SNMP_ERR_NOERROR;
}
debug.txt (application/octet-stream, 2 KB)
registered debug token lldpPortConfigTable, 1
registered debug token dlmod, 1
dlmod: register mib
dlmod: dlmod_path: /usr/lib64/snmp/dlmod
Duplicate IPv6 address detected, some interfaces may not be visible in IP-MIB
NET-SNMP version 5.3.2.2
Connection from UDP: [127.0.0.1]:38066
dlmod: dlmod_create_module
Connection from UDP: [127.0.0.1]:51324
dlmod: dlmodEntry dlm: 0x2b3324419080 dlmod_index: 1
dlmod: dlmodEntry dlm: 0x2b3324419080 dlmod_index: 1
Connection from UDP: [127.0.0.1]:46809
dlmod: dlmodEntry dlm: 0x2b3324419080 dlmod_index: 1
dlmod: dlmod_load_module lldpPortConfigTable: /home/mcleod/lldp/lldpPortConfigTable.so
lldpPortConfigTable: initing table1
lldpPortConfigTable: initing table
lldpPortConfigTable: for loop
lldpPortConfigTable: for loop0
lldpPortConfigTable: for loop1
lldpPortConfigTable: for loop2
lldpPortConfigTable: for loop3
Connection from UDP: [127.0.0.1]:35975
lldpPortConfigTable: cache load
lldpPortConfigTable: cache for loop
lldpPortConfigTable: cache for loop4
lldpPortConfigTable: cache for loop bottom4
lldpPortConfigTable: cache for loop5
lldpPortConfigTable: cache for loop bottom5
lldpPortConfigTable: cache for loop6
lldpPortConfigTable: cache for loop bottom6
lldpPortConfigTable: cache for loop7
lldpPortConfigTable: cache for loop bottom7
lldpPortConfigTable: cache after loop
Connection from UDP: [127.0.0.1]:35975
Connection from UDP: [127.0.0.1]:35975
lldpPortConfigTable: cache free
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
lldpPortConfigTable: cache free while
lldpPortConfigTable: cache free while2
Connection from UDP: [127.0.0.1]:53791
screen1.txt (application/octet-stream, 952 B)
 snmptable -v 2c -Ci -c private localhost LLDP-MIB::lldpPortConfigTable
SNMP table: LLDP-MIB::lldpPortConfigTable

 index lldpPortConfigAdminStatus lldpPortConfigNotificationEnable lldpPortConfigTLVsTxEnable
     1                    txOnly                                0                      "80 "
     2                    rxOnly                             true                      "40 "
     3                   txAndRx                                0                      "20 "
     4                  disabled                             true                      "10 "
     5                    rxOnly                                0                      "80 "
     6                   txAndRx                             true                      "40 "
     7                  disabled                                0                      "20 "
     8                    txOnly                             true                      "10 "
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.