• 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: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service


  • Subject: Re: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
  • From: Allan Nathanson <email@hidden>
  • Date: Tue, 3 Nov 2009 19:58:21 -0500

On Nov 3, 2009, at 7:38 PM, Gordon Scott wrote:

> I've been using the MoreSCF code to generate PPP network services which is working okay.
> Since I'm only targeting 10.4 and later I wanted to try using the System Configuration API to do this.
> I am locating the proper SCNetworkInterfaceRef based on the bsd name of the modem however SCNetworkServiceCreate() always fails with error kSCStatusNoKey.
>
> Any ideas why this is happening?  Anything I need to setup first in the SCNetworkInterfaceRef or the SCPreferencesRef before making this call?

You can't create a network service using just a modem interface.  You must layer a PPP interface on top of the modem and then create the service with using the PPP interface.

	SCNetworkInterfaceRef	 modem;
	SCNetworkInterfaceRef	ppp;
	SCNetworkServiceRef		service;

	...
	ppp = SCNetworkInterfaceCreateWithInterface(modem, kSCNetworkInterfaceTypePPP);
	service = SCNetworkServiceCreate(prefs, ppp);
	...

- Allan

 _______________________________________________
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: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
      • From: Gordon Scott <email@hidden>
References: 
 >SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service (From: Gordon Scott <email@hidden>)

  • Prev by Date: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
  • Next by Date: Snow Leopard VPN connection - halfway there
  • Previous by thread: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
  • Next by thread: Re: SCNetworkServiceCreate returns kSCStatusNoKey when trying to create a PPP service
  • Index(es):
    • Date
    • Thread