Re: MfD suggestions

This is a discussion on Re: MfD suggestions within the SNMP Coders forums, part of the Networking and Network Related category; On Mon, 25 Jul 2005 17:21:20 +0100 Dave wrote: DS> We should probably ensure that the hard-...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-28-2005
Robert Story
 
Posts: n/a
Default Re: MfD suggestions

On Mon, 25 Jul 2005 17:21:20 +0100 Dave wrote:
DS> We should probably ensure that the hard-coded and interactive
DS> defaults match - either bringing the hard-coded settings into
DS> line with the interactive versions (my preference), or vice versa.

Agreed.

DS> The other suggestion relates to the 'object_get' routines - and in
DS> particular to code generated for processing string- and OID-based
DS> objects.
DS> Currently, this code includes checks on the size of the buffer
DS> passed in, and re-allocates memory if necessary (potentially
DS> resulting in a memory leak, since the old memory doesn't appear
DS> to be released).

I=B4m pretty sure there isn=B4t a leak - the calling function should detect=
if the
pointer changed.

DS> It struck me that this is effectively duplicating
DS> the internal processing of the 'snmp_set_var_value' library routine.
DS>=20
DS> Wouldn't it be clearer to tweak this 'object_get' interface slightly
DS> to pass in the varbind structure, [...]

Clearer to us, yes. Clearer to them? Not likely. One of the explicit goals =
of
the MFD code is to require a little net-snmp specific knowledge as possible.
Any C programmer worth their salt should understand a pointer to a pointer =
and
a pointer to the length. When confronted with a netsnmp_variable_list, they
start asking questions about what it is, how is it used, what header is it
defined in, etc. The goal isn=B4t to be efficient, it=B4s to be easy to und=
erstand.
(I really wish it could use C++ as a better C - I=B4d much rather have refe=
rences
than pointer to pointers.)

--=20
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/f...Dnet-snmp-cod=
ers>

You are lost in a twisty maze of little standards, all different.=20


-------------------------------------------------------
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/...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 12:53 AM.


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