I asked a question the other day about access/security and started
building in MIBII.  I have a follow up on a different tangent so I
thought I'd start a new thread.
 
My question comes from an error when compiling "at.c", in
/mibgroup/mibII, specifically in the ARP_Scan_Next function. Now, from
what I can figure, my relevant defines for this function (that I found
in the configure-generated net-snmp-config.h and others) are
#define HAVE_SYS_SYSCTL_H 1
ARP_SCAN_FOUR_ARGUMENTS is not defined
RTF_LLINFO *is* defined
These last 2 in turn mean that (from at.c):
#  define NETSNMP_CAN_USE_SYSCTL 1

Looking through the code, this leads me to think that ARP_Scan_Next
function does NOT have the -secret- 4th parameter, ifIndex (based on
no-def of ARP_SCAN_FOUR_ARGUMENTS).  The conditional compile (#ifndef
NETSNMP_CAN_USE_SYSCTL) on line 726 is skipped, down to the #else on
line 822.
 
Here's where my error comes in.  On line 839, there is the statement
            *ifIndex = sdl->sdl_index;
But as I said above, ifIndex is not defined in this build of the
function, so this throws an error.  This seems like an error or
oversight in the code, but I'm relatively new to this, so I don't know.
It seems at least that there should be a conditional compile for the
same ARP_SCAN_FOUR_ARGUMENTS define around the ifIndex variable.  The
only other thing I can think of is if this combination of no-def
ARP_SCAN_FOUR_ARGUMENTS and yes-def NETSNMP_CAN_USE_SYSCTL is not
allowed, but I would think that would be done with an error directive if
that were so.
 
Oh, and please note I am using netsnmp 5.5 w.r.t the line numbers above.
I've tried to include as much info as I could without being too
confusing, I hope it is clear.  Thanks for any and all replies.
 
-----------
Brett Szudy
 
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to