Apple Network Setup manual Database Operations

Models: Network Setup

1 184
Download 184 pages 5.56 Kb
Page 19
Image 19
Database Operations

C H A P T E R 1

About Network Setup

For simplicity, this example assumes a computer with two places of operation, home and work, and two protocol stacks, TCP/IP and AppleTalk. Thus, there are four network connection entities:

“AirPort,” a TCP/IP network connection entity that configures a TCP/IP interface to use an AirPort card to access an AirPort Base Station at home.

“LocalTalk for Printer,” an AppleTalk network connection entity that configures an AppleTalk interface to use LocalTalk over the Printer port, to talk to a LocalTalk printer at home.

“Work/DHCP,” a TCP/IP network connection entity which configures a TCP/IP interface to use DHCP over the Ethernet port.

“Company Ethernet,” an AppleTalk network connection entity that configures an AppleTalk interface to use the Ethernet port in a zone that only exists on the “Work” network.

The area also has two global protocol entities, one for TCP/IP and one for AppleTalk. These settings do not need to change between home and work, so there is only one of each.

Finally, the area has two set entities:

“Home,” which references the two global protocol entities and the two home network connection entities: “AirPort” for TCP/IP and “LocalTalk for Printer” for AppleTalk.

“Work,” which references the two global protocol entities but also references two network connection entities: “Work/DHCP” for TCP/IP and “Company Ethernet” for AppleTalk.

The “Work” set entity is marked as active, so the network connection entities that it references are active. When the user moves from work to home, a program (such as the Location Manager) can simply mark the “Work” entity as inactive and the “Home” entity as active and the network configuration will switch accordingly.

Database Operations

Before reading or writing preferences, an application must open the database. The first step is to create a database reference. This reference identifies the calling application to the Network Setup library and is passed to subsequent calls that access the database. After creating the database reference, the process diverges for readers and writers. When an application opens the default area for

Network Setup Database Fundamentals

19

Page 19
Image 19
Apple Network Setup manual Database Operations