• 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
Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.


  • Subject: Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.
  • From: Terry Simons <email@hidden>
  • Date: Mon, 17 Mar 2008 23:17:23 -0600

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
 _______________________________________________
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: Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.
      • From: Terry Simons <email@hidden>
  • Prev by Date: Re: Question about VLANs in Mac OS X
  • Next by Date: Re: Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.
  • Previous by thread: how to write a virtual network device driver based on USBCDCECM (Or Quacomm MSM interface)
  • Next by thread: Re: Question about obtaining SCPreferencesRef for accessing SCVLANInterfaceRef data.
  • Index(es):
    • Date
    • Thread