On 05/18/2017 11:11 AM, Wes Hardaker wrote:
> Murali Karicheri <m-kariche...@ti.com> writes:
> 
>> Hello Coders,
>>
>> I have auto generated code for my mib module using mib2c. I see following 
>> code
>> that disables SET command for my mib agent module as
>>
>> #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || 
>> defined(NETSNMP_DISABLE_SET_SUPPORT))
>> #else
>> #endif
>>
>> How to I configure the agent build to enable Write/Set support?
> 
> Set support is on by default.  Those two defines are only hit when
> configure is run with --disable-set-support or --enable-read-only, for 
> example.
> 
Wes,

Thanks for responding! I could find an answer question which is more applicable
for my case. The mib2c code generator has a bug.
If one of the NETSNMP_NO_WRITE_SUPPORT or NETSNMP_DISABLE_SET_SUPPORT is defined
it should make the MIB RONLY as fixed below.

                                                  
lreInterfaceConfigTable_oid_size,
                                                   HANDLER_CAN_BABY_STEP |
 #if !(defined(NETSNMP_NO_WRITE_SUPPORT) || 
defined(NETSNMP_DISABLE_SET_SUPPORT))
-                                                  HANDLER_CAN_RONLY
-#else
                                                   HANDLER_CAN_RWRITE
+#else
+                                                  HANDLER_CAN_RONLY
 #endif /* NETSNMP_NO_WRITE_SUPPORT || NETSNMP_DISABLE_SET_SUPPORT */


-- 
Murali Karicheri
Linux Kernel, Keystone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to