> The code I generated for ifXTable is by using the ucd-snmp style. 
> 
> Also, I gone through the code for ifXTable implementation in the repository.
> That code is generated using the new style i believe.

Yes.
All new development will use the v5 APIs. The v4-line is dead.
(There will probably be one final bug-fix release of 4.2.7,
but that will be the end).

>  not even in the format of net-snmp 5.1.1 release.  am i right?

Err... I'm not sure what you mean by this.
It uses a different style of helper, agreed.
You'd have to ask Robert about that - this is his baby....



> here is the exact code which I put inside this var_ifXTable using
> counter64 structure.

But you're *not* using a counter64 structure:


>         ret_val = (char *) calloc(1, 21);
>         uu_long = <something>;> 
>          /* storing it in a string format */
>         sprintf(ret_val, "%lld", uu_long);
> 
>         /* return statement expecting string format */
>         return (u_char *) ret_val;


You're using a string representation of a long format.   That isn't
what the agent is expecting.   It's expecting a "struct counter64"
(You're also failing to pass back the size of this result)

Try
        c64.high = 0;
        c64.low  = 1;
        *var_len = sizeof(struct counter64);
        return (u_char *)&c64;

Dave    



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to