On 11 March 2011 05:16, sujata patra <sujata_patra2...@yahoo.com> wrote:
> I have an unsigned long long data , which need to be assigned to counter64.
> I can assign that using high part and low part.

That's the correct approach, yes.


> The problem is size, as well as endian ness. While conversion do I have to
> check ENDIAN(BIG ENDIAN)  ness also ?

You need to ensure that the upper 32-bits are assigned to the 'high' field
(in the native byte ordering),  and the lower 32-bits are assigned to the
'low' field.   This is typically done by a 32-bit right-shift, and masking
against 0xffffffff respectively.


> In addition what will happen over the net, If the master agent is on Big
> ENDIAN box and sub-agent is in Little Endian?

The library takes care of converting between native and network byte
ordering.   You don't need to worry about this.

Dave

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to