Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / March 2007



Tip: Looking for answers? Try searching our database.

C replacement for InetInterfaceInfo & OTInetGetInterfaceInfo()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Hopkins - 28 Mar 2007 18:21 GMT
Hi

We currently use some code like this:
=====================================================

   InetInterfaceInfo   myInetInterfaceInfo;

   OTInetGetInterfaceInfo( &myInetInterfaceInfo, adaptorInterface );
      if ( myInetInterfaceInfo.fHWAddrLen > 0 ) {

=====================================================
...but these Carbon types and functions are deprecated and won't work when
we port to x86_64.

Does anyone know of some equivalent simple C types/functions in the Apple
libraries that do the same thing and that will work on 64-bit?  Because of
where we are putting this, we are trying very hard to avoid C++ or
Objective-C code.

We use the code for getting the MAC address of the host, so any other ideas
on how to do that in C that will work in the future also appreciated.

Please feel free to CC replies to me

Michael

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

       _/    _/   _/_/_/             Hopkins Research Ltd
      _/    _/   _/    _/
     _/_/_/_/   _/_/_/          http://www.hopkins-research.com/
    _/    _/   _/   _/
   _/    _/   _/     _/               'touch the future'
                 
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Reinder Verlinde - 28 Mar 2007 18:33 GMT
> Hi
>
[quoted text clipped - 14 lines]
> where we are putting this, we are trying very hard to avoid C++ or
> Objective-C code.

AFAIK, all Mac OS X system calls are callable from C.

> We use the code for getting the MAC address of the host,

There is no "the MAC address of the host".

> so any other ideas
> on how to do that in C that will work in the future also appreciated.

See <http://developer.apple.com/technotes/tn/tn1103.html> for more info

Reinder
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.