>>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);
>> ...
Thanks, That got me closer but I'm still missing or not understanding something. The created service does not appear in the Network Preferences.
modem = LookupInterfaceByBsdName(...);
ppp = SCNetworkInterfaceCreateWithInterface(modem, kSCNetworkInterfaceTypePPP);
service = SCNetworkServiceCreate(prefs, ppp);
SCNetworkServiceSetName(service, CFSTR("TEST SERVICE"));
SCNetworkServiceSetEnabled(service, 1);
SCNetworkSetRef currentSet = SCNetworkSetCopyCurrent();
SCNetworkSetAddService(currentSet, service);
CFRelease(currentSet);
SCPreferencesSynchronize(prefs);
CFRelease(prefs);
If I recreate preferences and try to locate the service it is not found and does not appear in Network preferences panel