Re: Endian - ness issue

This is a discussion on Re: Endian - ness issue within the SNMP Coders forums, part of the Networking and Network Related category; >>>>> On Wed, 19 Oct 2005 10:00:53 +0100, Dave Shield <D.T.Shield@...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2005
Wes Hardaker
 
Posts: n/a
Default Re: Endian - ness issue

>>>>> On Wed, 19 Oct 2005 10:00:53 +0100, Dave Shield <D.T.Shield@csc.liv.ac.uk> 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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:41 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0