• 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: [FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >[FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X) (From: Marc Stibane <email@hidden>)

  • Prev by Date: Airport Direct Connect?
  • Next by Date: mounting AppleShare volumes?
  • Previous by thread: [FOUND] Mac OS X Mach-O BSD C PowerPlant (was Re: OpenTransport behaviour under X)
  • Next by thread: Airport Direct Connect?
  • Index(es):
    • Date
    • Thread