Sorry Dave,
But when i print the var_val in function it is showing another value
instead of the settable value. Is there any register or handler or header
function is there to get the settable value from CLI to var_val.
Regards,
Thazhaiarasan R.
On Thu, Jul 22, 2010 at 3:10 AM, Dave Shield <[email protected]>wrote:
> [ First - *please* don't mail me privately, without copying
> any responses to the mailing list. I don't have the time
> or inclination to offer private, unpaid, SNMP consultancy.
> Keep discussions to the list, where others can both learn
> and offer advice. Thanks. ]
>
> On 22 July 2010 05:30, Thazhai Arasan <[email protected]> wrote:
> >
> > Suppose if i want to pass the integer value "1" for another value, same
> > thing happened (value is not set) do i need to write any function to
> convert
> > the var_val to array of char ?
>
> No - just cast the var_val parameter accordingly.
> From mibII/route_write.c:
>
> case IPROUTEMETRIC1:
> if ( action == RESERVE1 ) {
> if ( var_val_type != ASN_INTEGER) [value
> must be an integer]
> // error
>
> long val = *((long *)var_val);
> [extract the new value]
>
> if ( val < -1 )
> [is this new value valid]
> // error
> }
>
>
> Don't get confused by the var_val being 'char *'
> It's probably better to think of this as 'void *'
> It's a generic pointer, that points to the new value.
>
> Dave
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users