Re: native sockets different on powerbooks/iBooks?
Re: native sockets different on powerbooks/iBooks?
- Subject: Re: native sockets different on powerbooks/iBooks?
- From: Eli Green <email@hidden>
- Date: Wed, 15 Oct 2003 12:27:46 -0400
On Tuesday, Oct 14, 2003, at 17:02 Canada/Eastern, Roy Lovejoy wrote:
>
I'm writing some native socket code, and it seems that there is an
>
unexplained runtime difference
>
on powerbooks & iBooks.
>
>
(all running 10.2.8)
>
>
On a G4 tower, I can broadcast from a socket just fine, tcpdump sees
>
it, but running the same
>
app on a G4 powerbook, or G3 iBook, tcpdump does not see it.
>
>
It doesn't matter if the laptop's network config has airport first,
>
last, or totally off.
>
(the laptop's primary connection is Ethernet)
>
>
The laptops can *send* packets successfully, they just can't
>
*broadcast* packets..
>
>
Another very strange thing is that on the laptops, gethostid() returns
>
0x00000000.
>
Same app on the G4 Tower returns the expected IP#.
>
>
Am I missing something extremely obvious?
>
>
I'm just using (as my contract dictates) standard bsd
>
sockets/netcalls..
BSD sockets are yummy. I'd use them if I could... lousy CFM apps. :)
I've had bizarre problems with broadcast packets myself. When trying to
send UDP broadcast packets, they get sent, but are not received by the
local host .. until the network configuration is restarted. Once I go
into the Network control panel and make any kind of change on the
TCP/IP pane, everything starts working fine. I've filed this as bug
#3422114, but nobody at Apple has looked at it as far as I can tell.
Probably because I made the mistake of not listing it at a high
priority. I probably should have.
Also, are you sending to the machine's broadcast address, or to
255.255.255.255? You might want to try whichever one you haven't tried.
:)
Lastly, gethostid() was dropped in 4.4BSD, so I'm not sure you should
rely on it. Maybe gethostname() / gethostbyname().
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.