On Thu, Dec 02, 2004 at 05:27:20PM -0600, [EMAIL PROTECTED] wrote: > greetings, all: > > now, doing an snmp set on an existing value in this table works fine. > when i do an snmp set on it that results in a new value being added, the > index is stored in the wrong byte order (e.g., .z.y.x.w instead of > .w.x.y.z). (bug #1077761) > > my current remedy for this has been to comment out the htonl() call in > parse_one_oid_index() in snmplib/mib.c (line 3660-ish). i don't know how > permanent or far-reaching such a solution might be, though i have seen no > other side effects in (admittedly light) testing. ip addresses need to be > stored in memory in host order, so somewhere (hopefully, in *one* place in > the library) there needs to be a swap from network order off the wire into > host order bound for memory. > > does anyone know if this is sufficient, or is it a bad idea? >
I am not certain about the code in question, but in general I would strongly oppose the notion of storing ip addresses in host byte order. All functions that want an ip address parameter expect to get it in network byte order so I would say that the idea of storing ip addresses in host byte order is ill adviced, all you gain from it is more work for yourself. /MF ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
