On Tue, 2005-09-06 at 00:25 +0200, Magnus Fromreide wrote:

> I added patch #1282566 wich I think implements this.

That's certainly a good start, but I don't think it's quite right.
A couple of things struck me immediately:

  a)  Your patch appears to be specific to the agent trap handling.
      This is actually an example of a more general problem,
      and we should be looking for a generic solution.

  b)  It looks as if you're changing the existing APIs  (e.g.
      the various create_tstring parameters, as well as the
      tdomain structure).  This may not matter, but should be
      avoided if at all possible.


What I'd envisage would be a call such as

        netsnmp_transport *
        netsnmp_transport_open( char *string, int def_port )

which would take a transport specification string:
("tcp:localhost:1234", "udp:10.0.0.1", "myhost", etc) and
a default port number (which the first example would ignore),
This routine would then return the appropriate transport
structure.

The create_trap_session* routines shouldn't need to bother
about *any* of that detail - it's purely a matter for the
library transport code.


Dave


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to