Apple Network Setup Network Card User Manual


 
CHAPTER 2
Using Network Setup
Working with Sets 43
There are a few basic rules for set entities:
Each set entity contains a preference, kOTCfgSetsStructPref, that has a flag
that determines whether the set is active.
At all times, there must be one and only one active set.
Each set entity contains a preference, kOTCfgSetsVectorPref, that includes, as
elements of an unbounded array, the entity references of all entities in the set.
For legacy synchronization to work correctly, each set entity must contain
one and only one entity of each type of network connection and global
protocol entity. This restriction will be relaxed in future versions of Mac OS.
When you make changes to a set entity, you must follow these rules:
If you mark a set as active, you must deactivate the previously active set.
When you add an entity to a set entity, you must remove the first entity in
the array of the same class and type as the entity you are adding. If there is
more than one entity of the same class and type, you can safely leave the
other entities in the set entity because you are running on a system that
supports multihoming.
When you delete an entity, you must delete its reference from all set entities,
whether they are active or not.
You must not delete the last remaining entity of a particular class and type
from a set entity.
Do not add a set entity reference to another set entity. Network Setup does
not support nested set entities.
Finding the Active Set Entity 2
The basic algorithm for finding the active entity of a particular class and type is:
1. Get a list of all set entities.
2. Search the list for the active set entity.
3. Get the contents of that set entity. (The contents of a set entity is a list of
entity references.)
4. Search the set’s entity references for the entity reference having the
appropriate class and type.