Re: ServiceIDs and Proxies
Re: ServiceIDs and Proxies
- Subject: Re: ServiceIDs and Proxies
- From: Charlie Boisseau <email@hidden>
- Date: Fri, 11 Jun 2004 11:39:55 +0100
On 11 Jun 2004, at 01:50, OL&L Lists wrote:
I need to get the HTTP and HTTPS proxy settings currently set in the
system preferences for *all* network interfaces in the system. I used
SCDynamicStoreCopyProxies but the comment for that routine in
SCDynamicStoreCopySpecific.h doesn't indicate what interface(s) the
returned dictionary is(are) for. Or does the dictionary contain
entries for all of the serviceIDs? And if so, what are the keys used
to access those values?
The proxies for each interface *are* stored separately, however
SCDynamicStoreCopyProxies only returns the proxies for the primary
interface. You should use:
SCDynamicStoreCopyValue(yourSessionRef,
"Setup:/Network/Service/xxx/Proxies")
(where xxx is the interface ID)
You get the interface IDs using:
SCDynamicStoreCopyValue(yourSessionRef, "Setup:/Network/Global/IPv4")
This returns a CFDictionary containing a CFArray called "ServiceOrder"
where you should find your IDs. You can get more info on the other
properties available from:
/Library/Preferences/SystemConfiguration/preferences.plist
I have done this successfully using REALbasic, so I'm sure you'll have
no problem.
--
Charlie Boisseau
_______________________________________________
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.