• 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
sockaddr_in sin_port in host byte order on Intel Macs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sockaddr_in sin_port in host byte order on Intel Macs


  • Subject: sockaddr_in sin_port in host byte order on Intel Macs
  • From: Kent Sorensen <email@hidden>
  • Date: Fri, 24 Feb 2006 22:07:58 -0500

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.

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 have to do this in order for the code to connect. That tells me that the field is in host byte order on Intel.

			struct sockaddr_in	*sin = (struct sockaddr_in *) res->ai_addr;
			sin->sin_port = htons(sin->sin_port);

So, since this is now set in stone it is safe to assume it won't be fixed. Can anyone else confirm this behavior ?

Thanks
Kent

_______________________________________________
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: "Matt Slot" <email@hidden>
    • Re: sockaddr_in sin_port in host byte order on Intel Macs
      • From: Marc Krochmal <email@hidden>
    • Re: sockaddr_in sin_port in host byte order on Intel Macs
      • From: "Justin C. Walker" <email@hidden>
    • Re: sockaddr_in sin_port in host byte order on Intel Macs
      • From: Mike Cohen <email@hidden>
  • Prev by Date: Networking issues with file shares on OSX 10.4
  • Next by Date: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Previous by thread: Networking issues with file shares on OSX 10.4
  • Next by thread: Re: sockaddr_in sin_port in host byte order on Intel Macs
  • Index(es):
    • Date
    • Thread