Oracle DBA Tips Corner |
|
Installing the Oracle Internet Directory C API
by Jeff Hunter, Sr. Database Administrator
Contents
About the OID C API
You can use the Oracle Internet Directory API release 3.0.1 in the following modes:
The API uses TCP/IP to connect to an LDAP server. When it does this, it uses, by
default, an unencrypted channel. To use the SSL mode, you must use the Oracle SSL call
interface. You determine which mode you are using by the presence or absence of the SSL
calls in the API usage. You can easily switch between SSL and non-SSL modes.
Building Applications with the OID C API
To build applications with the C API, you need:
Solaris Users: Installing gcc
For Solaris users, you will need to download and install gcc. The compiler
can be downloaded from
http://www.sunfreeware.com.
After downloading the software application gcc, you will need to use pkgadd (logged
in as the root userid) as follows:
Building a Sample Search Tool
The Oracle Internet Directory SDK release 3.0.1 provides a sample command
line tool, samplesearch, for demonstrating how to use the C API to build applications.
You can use samplesearch to perform LDAP searches in either SSL or non-SSL mode.
You can find the source file (samplesearch.c) and the make file (demo_ldap.mk)
in the following directory: $ORACLE_HOME/ldap/demo.
To build the sample search tool, enter the following command:
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter
and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express,
prior, written permission. Application to host any of the material elsewhere can be made by contacting me at jhunter@idevelopment.info.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate,
but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from
relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.
The Oracle Internet Directory SDK C API is based on:
Required Header Files and Libraries
# su -
# pkgadd -d gcc-3.2-sol8-sparc-local
After installing gcc, you'll need to update one of the key file for settting environment
variables for making LDAP executables. This file is called "$ORACLE_HOME/ldap/lib/env_ldap.mk".
You will need to located the entry for CC=cc and change it to CC=gcc as follows:
...
# CC=cc
CC=gcc
...
# make -f demo_ldap.mk build EXE=samplesearch OBJS=samplesearch.o
NOTE: You can use this make file to build other
client applications by using the C API. Replace samplesearch with the name of the
binary you want to build, and samplesearch.o with your own object file.
Friday, 23-Apr-2004 00:00:00 EDT
Page Count: 9769