Re: Agent Extension

This is a discussion on Re: Agent Extension within the SNMP Coders forums, part of the Networking and Network Related category; On 24/09/2007, <kujtim.hyseni@fshmn.uni-pr.edu> wrote: > Hi, > > how to extent ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-25-2007
Dave Shield
 
Posts: n/a
Default Re: Agent Extension

On 24/09/2007, <kujtim.hyseni@fshmn.uni-pr.edu> wrote:
> Hi,
>
> how to extent the agent to support new user defined protocol, other than
> 1, 2c and 3.


There are two possibilities.
If the new protocol is similar to SNMP, then you need to:

- provide a routine to take an incoming request, and parse
it into a 'netsnmp_pdu' structure
- provide a routine to process this netsnmp_pdu request
structure, and construct a response PDU
- provide a routine to take a netsnmp_pdu structure, and
encode it ready for sending over the network

You can then use snmp_add_full() to register these three
routines with the main agent framework.
See agent/mibgroup/agentx/{subagent.c,protocol.c} for an
example of this approach.


Alternatively, if your protocol doesn't match SNMP sufficiently
to fit into the netsnmp_pdu structure, then you can use the
register_{read,write}fd() routines to read/send arbitrary data
on specified sockets. See snmplib/fd_event_manager.c
for details.
Unfortunately, I don't believe that there's an example of
this approach in the Net-SNMP code base.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
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 07:27 PM.


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