Thanks for your responses,

I find out that we could use context field to register the same objects of 
ifTable with our subagent which netsnmp will understand and forward all 
requests to my callback function connected to that context. is it right?

can i register same objects/mibs using different context and handle each 
context with it own callbacks? if so? which APIs should i use to create, 
register handles and how can i set the context.

Regards,

/Masoud


-----Original Message-----

From: Magnus Fromreide <[EMAIL PROTECTED]>

To: Masoud Fatollahy <[EMAIL PROTECTED]>

Cc: [email protected], 
[EMAIL PROTECTED]

Date: Sun, 03 Feb 2008 08:08:08 +0100

Subject: RE: overwrite standard mib2/interfaces




On lör, 2008-02-02 at 21:42 +0100, Masoud Fatollahy wrote:

> Hi and thanks for the response,

> Since it is not possible to add our own rows to the ifTable right now

> and we don't know when this feature can be added to the net-snmp, I

> think it should be nice and helpful to know the way to disable/exclude

> ifTable  on net-snmp and do everything in our subagent? 



It is possible, just register your row using 



Register-PDU ( ifDescr.[ifIndex] .. ifSpecific.[ifIndex] ) and it should

show up.



The problem is that you have to make sure that you don't clash with the

normal ifTable and that your interface number allocations stays the same

over time, specifically there is a requirement that interface numbers

are constant between agent (and subagent) restarts.



As for turning off the module:



>From the command line:

  -I -ifTable,ifXTable



Using configure:

  --with-out-mib-modules=if-mib



> Thanks,

>  

> /Masoud

>  

> 

>         -----Original Message-----

>         From: "Mike Ayers" <[EMAIL PROTECTED]>

>         To: "Masoud Fatollahy" <[EMAIL PROTECTED]>,

>         <[EMAIL PROTECTED]>,

>         <[email protected]>

>         Date: Fri, 1 Feb 2008 10:38:12 -0800

>         Subject: RE: overwrite standard mib2/interfaces

>         

>         > From: [EMAIL PROTECTED] 

>         > [mailto:[EMAIL PROTECTED] On 

>         > Behalf Of Masoud Fatollahy

>         > Sent: Thursday, January 31, 2008 7:24 AM

>         

>         > We are planning to find the best possible way to register

>         our 

>         > ports as interface in mib2/interfaces(if-mib/ifTable) table 

>         > on net-snmp-5.4.1. since these ports are not seen by the 

>         > linux system then we should include them to the interface 

>         > list ourselves, but the idea is to keep net-snmp as it is

>         and 

>         > do not modify anything(modify as little as possible). in 

>         > order to do this we have decided to use a sub-agent and 

>         > AgentX to talk to net-snamp agent. the question is:

>         > How can we do this to achieve our goal? 

>         > A answer which we are looking at right now is that remove 

>         > registration of MIB2/Interfaces(if-mib/ifTable) and use our 

>         > subagent to register all interface mibs and callbacks

>         functions. 

>         > Since you are the experties, I want to know your idea about

>         this?

>         

>            There is no need to clobber the entire ifTable.  Simply

>         register a row for each port.  You'll need to register each

>         object in each row individually, which is a bit of a pain, but

>         that's the only real problem.  I don't know if there are

>         helpers for this.  I would recommend using very large numbers

>         for your ifIndex to keep clear of those generated by the MIB

>         module.

>         

>            Hopefully, the ifTable implementation has a way to

>         cooperatively add your own rows, but I've never examined it.

>          Anyone?

>         

>         

>            Thanks,

>         

>         Mike

>         

> -------------------------------------------------------------------------

> This SF.net email is sponsored by: Microsoft

> Defy all challenges. Microsoft(R) Visual Studio 2008.

> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ 
[http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/]

> _______________________________________________ Net-snmp-coders mailing 
list [email protected] 
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders 
[https://lists.sourceforge.net/lists/listinfo/net-snmp-coders]





-------------------------------------------------------------------------

This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft(R) Visual Studio 2008.

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ 
[http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/]

_______________________________________________

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 
[https://lists.sourceforge.net/lists/listinfo/net-snmp-users]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to