Re: Deprecated objects in ifTable

This is a discussion on Re: Deprecated objects in ifTable within the SNMP Users forums, part of the Networking and Network Related category; Robert, As per your advice I used the netsnmp_column_info structure to indicate valid columns to the agent. Following is my ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-15-2005
Sridhar S
 
Posts: n/a
Default Re: Deprecated objects in ifTable

Robert,

As per your advice I used the netsnmp_column_info structure to indicate
valid columns to the agent. Following is my observation.

When I make a query from the manager on these invalid columns I am
getting 'SNMP_NOSUCHINSTANCE' error, but I am expecting a
'SNMP_NOSUCHOBJECT' error, as these columns are not at all implemented
at the agent side.

Please let me your comments.

Thanks
SrIdhar

Following is my code. Rest of the code is same.


static netsnmp_column_info valid_columns;

static unsigned int column_list [] =
{
COLUMN_IFINDEX,
COLUMN_IFDESCR,
COLUMN_IFTYPE,
COLUMN_IFMTU,
COLUMN_IFSPEED,
COLUMN_IFPHYSADDRESS,
COLUMN_IFADMINSTATUS,
COLUMN_IFOPERSTATUS,
COLUMN_IFLASTCHANGE,
COLUMN_IFINOCTETS,
COLUMN_IFINUCASTPKTS,
/* COLUMN_IFINNUCASTPKTS, -- deprecated */
COLUMN_IFINDISCARDS,
COLUMN_IFINERRORS,
COLUMN_IFINUNKNOWNPROTOS,
COLUMN_IFOUTOCTETS,
COLUMN_IFOUTUCASTPKTS,
/* COLUMN_IFOUTNUCASTPKTS, -- deprecated */
COLUMN_IFOUTDISCARDS,
COLUMN_IFOUTERRORS,
/* COLUMN_IFOUTQLEN, -- deprecated */
/* COLUMN_IFSPECIFIC -- deprecated */
};


int my_initialize_table_ifTable (void)
{
:
:

/*
* Inserted code to filter out invalid columns
*/

valid_columns.isRange = (char) 0;
valid_columns.list_count = (char) 18; /* Total valid columns */
valid_columns.details.list = column_list;
valid_columns.next = NULL;

table_info->valid_columns = &valid_columns;

:
:
}


On Tue, 8 Mar 2005 15:44:12 -0500, "Robert Story" <rstory@freesnmp.com>
said:
> On Fri, 25 Feb 2005 19:10:38 +0530 Sridhar wrote:
> SS> It means that the agent I implement should not support these objects.
> In
> SS> the UCD-Style of coding I removed these objects from the
> initialization
> SS> structure, there by preventing them by getting registerd at the
> agent.
> SS> So 'SNMP_NOSUCHOBJECT' error will be returned to the manager.
> SS>
> SS> My question is how can I achieve this by using Net-SNMP style of
> coding.
>
> What handler are you using? As long as you have the table handler in the
> chain,
> you can use the valid_columns structure to indicate which columns the
> agent
> handlers, and it will filter out requests for other columns.
>
> --
> Robert Story; NET-SNMP Junkie
> Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
> Archive:
> <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>
>
> You are lost in a twisty maze of little standards, all different.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:41 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0