+__createMediaOptions(CFStringRef interfaceName, CFDictionaryRef media_options);
+
+
+static CFDictionaryRef
+__copyMediaOptions(CFDictionaryRef options)
+{
+ CFMutableDictionaryRef requested = NULL;
+ CFTypeRef val;
+
+ if (!isA_CFDictionary(options)) {
+ return NULL;
+ }
+
+ val = CFDictionaryGetValue(options, kSCPropNetEthernetMediaSubType);
+ if (isA_CFString(val)) {
+ requested = CFDictionaryCreateMutable(NULL,
+ 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ CFDictionaryAddValue(requested, kSCPropNetEthernetMediaSubType, val);
+ } else {
+ /* if garbage */;
+ return NULL;
+ }
+
+ val = CFDictionaryGetValue(options, kSCPropNetEthernetMediaOptions);
+ if (isA_CFArray(val)) {
+ CFDictionaryAddValue(requested, kSCPropNetEthernetMediaOptions, val);
+ } else {
+ /* if garbage */;
+ CFRelease(requested);
+ return NULL;
+ }
+
+ return requested;
+}