• 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
System Configuration Framework API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Configuration Framework API


  • Subject: System Configuration Framework API
  • From: hector.chou(周建嘉) <email@hidden>
  • Date: Mon, 3 Dec 2007 12:27:16 +0800
  • Acceptlanguage: zh-TW, en-US
  • Thread-topic: System Configuration Framework API

Hello, I'm a newbie of Mac OS X (10.4) programming,
trying to port windows applications to Mac OS X.
 
The application uses a windows API called "GetAdaptersInfo",
which returns a list of structures of network interface information,
for example:
IP,
MAC adress,
gateway,
network type: (ethernet, pppoe, token ring, loopback, ...)
DHCP is enabled or not,
DHCP server,
DHCP lease time,
etc.
 
I spent so much time on surveying equivalent functions or APIs for Mac OS X,
the command line utility "ifconfig" is out, I need a function call,
the BSD library function "getifaddrs" is fine, but it doesn't contain enough information I list above.
finally, I found the System Configuration Framework,
but I have kind of data exchange problems below:
 
For example, the function "SCNetworkInterfaceGetInterface",
it returns a reference to target interface, called "SCNetworkInterfaceRef",
but how do I use this reference to extract information, and put it into C data types like character array, integers or something like that?
 
The type definition of "SCNetworkInterfaceRef" is:
typedef const struct __SCNetworkInterface * SCNetworkInterfaceRef;
but I can't find the definition of "struct __SCNetworkInterface",
I even try to use Xcode IDE to get this information, but it doesn't work.
 
So, is there any way (or is it right) to work these APIs with C program? Thanks.
 

Hector Chou
Engineer
Application Platform Department
VIVOTEK INC.
6F, No.192, Lien-Cheng Rd., Chung-Ho,
Taipei County, Taiwan, R.O.C.

Tel: +886 2 8245 5282 ext.261
Fax: +886 2 8245 5532
http://www.vivotek.com

VIVOTEK Inc.

 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: System Configuration Framework API
      • From: Quinn <email@hidden>
  • Prev by Date: Re: Non-default ppp connections - accessing user info dictionary
  • Next by Date: Re: System Configuration Framework API
  • Previous by thread: Re: Non-default ppp connections - accessing user info dictionary
  • Next by thread: Re: System Configuration Framework API
  • Index(es):
    • Date
    • Thread