ct_ds_lookup searches for server directory objects in the interfaces file when either of the following occurs:
The application chooses or defaults to use the interfaces file as the directory source for a CS_CONNECTION structure. A connection’s directory source is specified with the CS_DS_PROVIDER connection property (see “Directory service provider”).
Client-Library could not load the directory driver specified by the driver configuration, and failover to the interfaces file occurred. Directory service failover occurs only when it has been enabled with the CS_DS_FAILOVER connection property (see “Directory service failover”).
In these situations, Client-Library maps the contents of each interfaces file entry onto an instance of the server directory object that may be viewed with ct_ds_objinfo. Table 2-24 describes the mapping.
Attribute |
Corresponding interfaces file component |
---|---|
Server Entry Version |
None. This value is always 1250 when the interfaces file is searched. |
Server Name Attribute |
The server’s name in the interfaces file. When the interfaces file is searched, the value of the name attribute and the directory entry name are the same. |
Service Type |
None. This value is always “Adaptive Server” when the interfaces file is searched. |
Server Status |
None. The status is always CS_STATUS_UNKNOWN when the interfaces file is searched. |
Transport Address |
The contents of each “query” line in the interfaces file entry, returned to the application within a CS_TRANADDR structure. If multiple “query” lines are present in the interfaces file, then the CS_ATTRVALUE array which contains the values for this attribute has the same order as the interfaces file. “Master” lines are ignored. Clients use only “query” lines when establishing a connection; therefore, “master” lines are ignored when ct_ds_lookup reads the interfaces file. |
Security Mechanisms |
The OIDs listed on the “secmech” line of the entry, each within a CS_OID structure. |
Retry Count |
The “retry_count” option can be included in interfaces file entries for some platforms. It controls the number of times Client-Library attempts to connect each server address. Applications may set the CS_RETRY_COUNT property for the connection to get equivalent behavior—see “Retry count”. If present in the entry, this value is returned as an attribute with OID string CS_OID_ATTRRETRYCOUNT and integer syntax. |
Loop Delay |
The “loop_delay” option can be specified in the interfaces file for some platforms. Applications can set the CS_LOOP_DELAY connection property to get equivalent behavior—see “Loop delay”. If present in the entry, this value is returned as an attribute with OID string CS_OID_ATTRLOOPDELAY and integer syntax. |