C H A P T E R 1

About Network Setup

reading, it reads the area directly. Network Setup simply notes that the area is open for synchronization purposes (see the section “Preference Coherency” (page 21)). For writing, the process is somewhat different.

When an application opens an area for writing, Network Setup creates a temporary area that is an exact duplicate of the default area. It then returns the temporary area ID to the application. The application can now change the temporary area without affecting running network services. When the application is done making changes, it commits the changes to the database. Committing changes is an atomic process that overwrites the default area with the contents of the temporary area and causes the protocol stacks to reconfigure themselves for the new configuration.

Alternatively, the writing application can choose to abort the modifications, in response to which Network Setup discards the temporary area and the system continues to use the configuration in the default area.

Figure 1-6 shows this process diagrammatically.

Figure 1-6Reading and writing the default area

Reading

Default area

Open for reading

Default area being read

Writing

Default area

Open for write

abort

Temporary area being written

Close for reading

Commit

Default area

Updated default area

Multiple applications can open the Network Setup database for reading, but only one application at a time can open the database for writing.When an application commits changes to the default area, Network Setup notifies each application that has opened the database for reading that a change has occurred, as explained in the next section, “Preference Coherency.”

20Network Setup Database Fundamentals

Page 20
Image 20
Apple Network Setup manual Shows this process diagrammatically