• 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: IPSec not a "supported" protocol for PPP interfaces?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IPSec not a "supported" protocol for PPP interfaces?


  • Subject: Re: IPSec not a "supported" protocol for PPP interfaces?
  • From: Chris Heimark <email@hidden>
  • Date: Sat, 12 Jan 2008 18:03:12 -0500

Let me RECANT that - logic is correct upon opening my eyes a little more. Allan is surely right...

If I'm right, I think the bug is in this line of code, where you're examining before the beginning of the array (0 based indices I assume). protoCount begins one too high, right? Do you want for (idx=0;idx< protoCount;++idx) ?

SCNetworkProtocolRef curProto = CFArrayGetValueAtIndex(protocols,  protoCount);

From docs:

The index of the value to retrieve. If the index is outside the index space of theArray (0 to N-1 inclusive (where N is the count of theArray), the behavior is undefined.


On Jan 12, 2008, at 3:05 PM, email@hidden wrote:

Message: 1
Date: Fri, 11 Jan 2008 23:27:11 -0800
From: Allan Nathanson <email@hidden>
Subject: Re: IPSec not a "supported" protocol for PPP interfaces?
To: Nathan Duran <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Sorry for the delay in responding (it's been a busy week for me).

You've found a a bug!  The IPSec configuration is actually associated  
with the interface and would be accessible via the  
SCNetworkInterface(Get|Set)ExtendedInterfaceConfiguration APIs.  Can  
you kindly file a bug report.

- Allan


On Jan 10, 2008, at 3:50 PM, Nathan Duran wrote:


On Dec 20, 2007, at 10:28 AM, Allan Nathanson wrote:

"IPSec" is not a protocol type.

OK, so why, when I call SCNetworkServiceCopyProtocols on an Apple  
created L2TP service, is there one named "IPSec" in the array that  
is returned?

CFArrayRef services = SCNetworkServiceCopyAll(prefs);
int serviceCount = CFArrayGetCount(services);

while ( serviceCount-- )
{
SCNetworkServiceRef curService = CFArrayGetValueAtIndex(services,  
serviceCount);
CFStringRef serviceName = SCNetworkServiceGetName(curService);

if ( CFEqual(serviceName, CFSTR("VPN (L2TP)")) )
{
SCNetworkInterfaceRef firstLayer =  
SCNetworkServiceGetInterface(curService);
CFArrayRef supportedProtocols =  
SCNetworkInterfaceGetSupportedProtocolTypes(firstLayer);

CFShow(supportedProtocols);

CFArrayRef protocols = SCNetworkServiceCopyProtocols(curService);
int protoCount = CFArrayGetCount(protocols);

while ( protoCount-- )
{
SCNetworkProtocolRef curProto = CFArrayGetValueAtIndex(protocols,  
protoCount);
CFStringRef protoName =  
SCNetworkProtocolGetProtocolType(curProto);
CFDictionaryRef protoConfig =  
SCNetworkProtocolGetConfiguration(curProto);

CFShow(protoName);  //Second element will be "IPSec"
CFShow(protoConfig);
}
}
}




 _______________________________________________
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

  • Prev by Date: Re: IPSec not a "supported" protocol for PPP interfaces?
  • Next by Date: Connect to Server smb path containing :139 resets / kills Finder
  • Previous by thread: Re: IPSec not a "supported" protocol for PPP interfaces?
  • Next by thread: Re: Macnetworkprog Digest, Vol 5, Issue 9
  • Index(es):
    • Date
    • Thread