>>>>> On Wed, 19 Oct 2005 10:00:53 +0100, Dave Shield <[EMAIL PROTECTED]> said:

Dave> I'm not sure that the on-the-wire representation is particularly
Dave> relevant here. Surely what's important is how the Net-SNMP library
Dave> stores an IP address internally?

Dave> If it stores it as an integer, then this would most naturally
Dave> be handled in local byte order (and any conversion done as part
Dave> of building/parsing the actual packet).  If it stores it as a
Dave> string, then it makes more sense to handle the byte-ordering
Dave> when the string value is set or read (presumably via a suitable
Dave> utility routine).

The routines expect 4 bytes handed to it in proper order.  How those 4
bytes are stored doesn't matter...  I think it's *mistakenly* stored
as a integer many times because the C datatype is conveniently 4
bytes.  Most of the time of course.

-- 
Wes Hardaker
Sparta, Inc.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to