On Fri, 21 Oct 2005 13:32:37 +0100 Dave wrote: DS> So bearing in mind that most of the building routines come in pairs DS> (and ignoring the debug output call), it's actually equally split DS> between integer and string-based interpretation of the value!
I was afraid of that. DS> It would be quite reasonable to decide to use either style of DS> representation for an IP address: DS> DS> - treat it as an integer DS> (and convert to/from the string format DS> when working with low-level SNMP packets) We also have to decide here if the integer is host or network byte order. My preference would be network, since that what most of the routines that work with sockaddr_in, in_addr, etc expect and return. DS> or DS> - treat it as a four-byte string DS> (and convert to/from the integer form DS> when working with in_addr_t variables) DS> DS> My gut reaction is that it would probably be simpler in the DS> long run to hold such addresses internally in the natural DS> form (i.e. as an integer), and convert them to the string DS> equivalent when building or parsing SNMP packets. I'll second that. -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- 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
