• 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: Opening Ports in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening Ports in Leopard


  • Subject: Re: Opening Ports in Leopard
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 19 Nov 2008 17:08:45 +0700


On 19 Nov 2008, at 15:59, Kyle Sluder wrote:

On Wed, Nov 19, 2008 at 12:08 AM, Gerriet M. Denkmann
<email@hidden> wrote:
In an other programm (doing Distributed Objects between computers) I found
out that
int y = bind( newSocket, (struct sockaddr *)&serverAddress,
sizeof(serverAddress) );
wants to have the data in "truct sockaddr_in serverAddress" in network byte
order (aka big endian) (did see no mention of this in the man page for bind,
nor in "in.h" or "socket.h").

Take a look at the first sentence of the inet(4) man page: "Internet addresses are four byte quantities, stored in network standard format (on the VAX these are word and byte reversed)."

Yes, you are right. But how does a poor programmer trying to use bind() get the idea to look at inet(4)?
Anyway problem solved, lesson learned and all is fine.


My dealer told me that newer hardware (in this case a white MacBook bought
last week) cannot boot in Tiger.
Can this be true?

Yes. Probably due to lack of drivers for the newer hardware.

Anyway, my current guess is: the problem is an endian issue.
If I fail, I will look for Wireshark. But: what is this? Some hardware
device? Or software?

It depends on what you see in Wireshark. If you see a request go out, and all the data is correct, then you know your software is working. If you don't see a request go out, or the data in the request is incorrect, then your software isn't working. You should be running Wireshark on the same Ethernet segment as the machine running your code, so that all but eliminates faulty hardware, since The Bug Is Always In Your Code(TM).

Again, a very true statement. It turned out to be not endianness but poll().


Through some accident (or, to be honest, through some rather silly mistake of mine) poll() got an array of struct pollfd's, where only the first was correctly set, all others did contain just zeroes.
Ppc-Tiger obviously ignored the illegal entries and polled the correct one, but Intel-Leopard just sits there, appalled at such bad input and waits for the timeout.


Now this problem is also solved.

Thanks for all your help and suggestions!


Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Opening Ports in Leopard (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Opening Ports in Leopard (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Window title bar accessory view
  • Next by Date: NSNumberFormatter problem with percentage
  • Previous by thread: Re: Opening Ports in Leopard
  • Next by thread: Can you @synthesize simple arrays?
  • Index(es):
    • Date
    • Thread