CFDictionarySetValue(classesToMatch,
CFSTR(kIOSerialBSDTypeKey),
CFSTR(kIOSerialBSDModemType));
// Each serial device object has a property with key
// kIOSerialBSDTypeKey and a value that is one of kIOSerialBSDAllTypes,
// kIOSerialBSDModemType, or kIOSerialBSDRS232Type. You can experiment with the
// matching by changing the last parameter in the above call to CFDictionarySetValue.
// As shipped, this sample is only interested in modems,
// so add this property to the CFDictionary we're matching on.
// This will find devices that advertise themselves as modems,
// such as built-in and USB modems. However, this match won't find serial modems.