• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sockaddr_in sin_port in host byte order on Intel Macs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sockaddr_in sin_port in host byte order on Intel Macs


  • Subject: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • From: Frederick Cheung <email@hidden>
  • Date: Sun, 26 Feb 2006 01:57:36 +0000


On 26 Feb 2006, at 01:49, Marc Krochmal wrote:


On Feb 24, 2006, at 10:10 PM, Matt Slot wrote:

Kent Sorensen <email@hidden> wrote:
I'm seeing an issue on Intel Macs where the sin_port field in the
sockaddr_in structure is in host byte order. As far as I know it is
supposed to be in network byte order.

This also happens under OpenTransport, except that both the port and the host fields are expected in host byte order. Most OT routines now return IP addresses in host byte order as well, except for the call OTInetAddressToName().

A short tester is available at:

  http://www.ambrosiasw.com/~fprefect/otbyteorder.c

I first saw this on 10.4.3, and filed a radar bug on it. It was closed
without comments. Now I'm seeing it on 10.4.5 ..

I can confirm that this didn't happen on the DTK systems, and is new to
the shipping intel systems.

Open Transport does require IP addresses to be in host byte order, so I just filed a bug report regarding OTInetAddressToName().


<rdar://problem/4458711> OTInetAddressToName requires address in network byte order

I've seen something similar with OTInitDNSAddress/OTConnect. If you pass a domain name (eg localhost, www.apple.com) it works fine, but if you provide a dotted decimal string, then you need to flip it on intel macs in order for the connect to succeed (ie to connect to localhost you need to specify "1.0.0.127"

Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: sockaddr_in sin_port in host byte order on Intel Macs
      • From: Glenn Anderson <email@hidden>
References: 
 >sockaddr_in sin_port in host byte order on Intel Macs (From: Kent Sorensen <email@hidden>)
 >Re: sockaddr_in sin_port in host byte order on Intel Macs (From: "Matt Slot" <email@hidden>)
 >Re: sockaddr_in sin_port in host byte order on Intel Macs (From: Marc Krochmal <email@hidden>)

  • Prev by Date: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Next by Date: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Previous by thread: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Next by thread: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Index(es):
    • Date
    • Thread