Re: [FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X)
Re: [FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X)
- Subject: Re: [FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X)
- From: "Justin C. Walker" <email@hidden>
- Date: Sat, 8 Nov 2003 13:41:41 -0800
On Saturday, November 8, 2003, at 12:36 AM, Marc Stibane wrote:
So if there is a sample that shows how to
use the BSD C library with Carbon and MSL C++ in CodeWarrior, finding
that should take a lot less time (for both of us) than me trying to
extract a working sample (which might not even work on CW9).
Larry Gerndt pointed me to:
Metrowerks CodeWarrior 9.0/
(CodeWarrior Examples)/
MacOS X Examples/
Mach-O BSD C Stationery/
Mac OS X Mach-O BSD C PowerPlant/
[snip]
// First get my own IP address
InetInterfaceInfo OTInetInfo;
if (OTInetGetInterfaceInfo(&OTInetInfo,kDefaultInetInterface)==noErr)
host.sin_addr.s_addr = OTInetInfo.fAddress;
else
return -1;
What would be the corresponding socket call?
'man getifaddrs', although it's not, per se, a "socket" call.
(Please don't point me to the "Living in a dynamic environment"
technote
- I just want the main (first) address to get it up and running).
There is no such thing as the 'main' address. The 'first' address may
change after each reboot, depending on what you mean.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | It's not whether you win or
lose...
| It's whether *I* win or lose.
*--------------------------------------*-------------------------------*
_______________________________________________
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.