![]() | ![]() |
Home |
|
|
Open Client Client-Library/C Reference Manual |
|
| Chapter 2 Topics |
|
| Client-Library and SQL Structures |
|
| CS_OID structure |
CS_OID structures store object identifiers.
An Object Identifier (OID) is an encoded character string that provides a machine- and network-independent method of uniquely identifying objects in a distributed environment. An OID functions as a symbolic global name that means the same to all applications in a distributed environment.
Sybase uses OIDs to represent the following:
Directory objects.
Attribute types within a directory object.
Security mechanisms that assure secure client/server connections. A security mechanism may have a different local name on the client machine than on the server machine. To avoid confusion, an OID is used as a global name that identifies the security mechanism for both the client and the server. See "Choosing a network security mechanism" for a description of how a security mechanism is associated with a connection.
OIDs are encoded as a sequence of decimal integers separated by dots. OIDs are defined according to ISO standards and organized in a hierarchy that avoids duplication among different vendors. In the hierarchy, unique prefixes are assigned to different vendors. For example, the prefix "1.3.1.4.1.897" belongs to Sybase, and all Sybase OIDs have this prefix.
Definition of the CS_OID structureA CS_OID structure is required to exchange an OID between Client-Library routines and application code.
The CS_OID structure is used with calls to ct_ds_lookup or ct_ds_objinfo.
The CS_OID structure is defined as follows:
typedef struct _cs_oid
{CS_INT oid_length;
CS_CHAR oid_buffer[CS_MAX_DS_STRING];
} CS_OID;
where:
oid_length is the length of the OID string. If the OID string is null-terminated, the length does not include the null terminator.
oid_buffer is an array of bytes that holds the OID string. This string is not always null-terminated.
The Client-Library header files define OID strings for applications to use in initializing or comparing OIDs. Predefined OID strings are used for the following purposes:
Identifying directory object. Sybase directory object is Server, and the OID is CS_OID_OBJSERVER.
For more information, see "Server directory object"
Identifying the attributes of a given directory object. See the definition of the directory object for the predefined OID strings that identify each attribute.
|
|