Hi,
I'm attempting to get a list of VLANs configured via the SCVLANInterfaceCopyAll call, but I'm getting back an empty CFArrayRef, which makes me think that my SCPreferencesRef is invalid, or incorrect, or something.
It isn't at all clear from reading the documentation on SCPreferencesCreate what values I might need to pass the call to get a correct handle for accessing the VLAN information.
Here's the code:
CFStringRef myApp = CFStringCreateWithCString(NULL, argv[0], kCFStringEncodingMacRoman);
preferencesRef = SCPreferencesCreate(NULL, myApp, NULL); vlanInterfaceArrayRef = SCVLANInterfaceCopyAll(preferencesRef);
I'm assuming there's a valid default allocator for me? Maybe not... I suppose I'll try creating a new allocator and see if that helps.
Also, do I need some sort of prefsID parameter to SCPreferencesCreate, or is NULL sufficient here? There aren't any examples in the API documentation, so I'm not even sure what something like that should look like...
- Terry |