Directory Services holds and provides access to information
about objects (generally existing in telecommunications and information
processing). Directory Services stores information in an area collectively
known as the Directory Information Base (DIB).
FTAM uses Directory Services to identify responders. One analogy
is that Directory Services is like a telephone directory that lists
responders.
For communicating with other systems and processes, you need
to know how to identify yourself and the systems and processes with
which you want to communicate. FTAM uses Directory Services to obtain
the presentation addresses (called_presentation_address) for such
identification purposes. To obtain these addresses, Directory Services
uses the directory distinguished names (called_dir_name, source_dirname,
destination_dirname, and dirname) that you provide.
For information on configuring your directory distinguished
names and presentation addresses for the OTS/9000 IEEE 802.3 link,
refer to the OSI Troubleshooting Guide.
Organizing Directory Services |
 |
The Directory Service organization starts at a root entry
that is the base for all entries. The following list provides possible
entries in the required order.
Figure 3-1 “Example
Directory Services (X.500) Structure” depicts one possible
organizational structure of Directory Services.
Using Directory Services |
 |
FTAM uses Directory Services whenever you call ft_connect()
or high level calls to specify your directory or the directory with
which you want to communicate.
Ae_dir_name |
 |
typedef Dir_dn *Ae_dir_name; |
Ae_dir_name is the primary structure for setting the directory
distinguished name when calling ft_connect(), ft_aeactivation(),
and all high level, context free (HLCF) functions. The embedded
structures are Dir_dn, Dir_rdn, and Dir_ava ( Figure 3-2 “Ae_dir_name
Structure”). To have the system automatically set
the Ae_dir_name structure, call convert_ddn; the source is in /opt/ftam/demos/cnvrt_addr.c.
Dir_dn |
 |
typedef struct Dir_dn /* Directory Distinguished name */ { Sint8 n; /*No. of relative dist. names */ struct Dir_rdn *rdn; /*Ptr to a sequence of Dir_rdn */ } Dir_dn; |
Dir_dn identifies the directory distinguished name.
The first field (n) is the number
of relative distinguished names (rdn).
The rdn field points to an array of Dir_rdn structures
containing attribute value assertions (avas).
The embedded structures are Dir_rdn and Dir_ava.
Each Dir_dn that specifies an application entity
(AE) has a corresponding P_address stored in the ICS, which provides
the mapping between the two.
The Dir_dn must be exactly the same as the one set
during configuration.
In this example, the directory distinguished name for the
ftam_resp is as follows. Each portion of the name is an rdn (e.g.,
O=HP).
/C=US/O=HP/AP=node_1/AE=ftam_resp |
Dir_rdn |
 |
typedef struct Dir_rdn /* Relative distinguished names */ { Sint8 n; /*Number of avas */ struct Dir_ava *avas; } Dir_rdn; |
Dir_rdn identifies the relative distinguished name (Figure 3-4 “Dir_rdn
Structure”).
Each rdn is part of the directory
distinguished name. Refer to the following example.
The first field (n) is the number of attribute value
assertions (avas).
Each avas points to a Dir_ava structure containing
attr_id, attr_value, and syntax_id.
This example depicts five rdns: three rdns contain one avas
each, and one rdn (OU) contains two avas.
/C=us/O=hp/L=ca/OU=falc/OU=hawk/AP=nodal/AE=ftam_resp |
Dir_ava |
 |
typedef struct Dir_ava /* Attribute Value assertions */ { struct Object_id attr_id; struct Octet_string attr_value; struct Object_id syntax_id; /* for future use */ } Dir_ava; |
Dir_ava is the final embedded structure in the Ae_dir_name
structure that defines the directory distinguished name (Figure 3-5 “Dir_ava
Structure”).
Each Dir_ava contains the following fields: attr_id (e.g.,
country), attr_value (e.g., USA), and syntax_id (reserved for future
ISO extensions).
Setting Ae_dir_name Example |
 |
This example sets the Ae_dir_name structure.
 |
#include "map.h" #include "mapftam.h" #include %<stdio.h> #include %<malloc.h> /* ** ** setup_ddn ** ** DESCRIPTION: ** This routine assigns valid values to the Ae_dir_name ** structure. ** ** ** PARAMETERS: ** Outputs: ** dirname : pointer to the Ae_dir_name structure ** Ae_dir_name is a pointer to struct ** Dir_dn. ** */ void setup_ddn(dirname) Ae_dir_name *dirname; { /* Initialize all fields of the Ae_dir_name structure. Set up: "/C=us/O=hp/OU=org_unit/CN=machine_name/CN=ftam_resp" */ *dirname = (struct Dir_dn *)malloc(sizeof(struct Dir_dn)); (*dirname)->rdn=(struct Dir_rdn *)malloc(5*sizeof(struct Dir_rdn)); (*dirname)->n = 5; /* C = us The Country attribute id is defined by ISO to be "6". */ (void)addrdn( & (*dirname)->rdn[0], 6, "us"); /* O = hp The Organization attribute id is defined by ISO to be "10". */ (void)addrdn( & (*dirname)->rdn[1], 10, "hp"); /* OU = org_unit The Organization Unit attribute id is defined by ISO to be "11". */ (void)addrdn( & (*dirname)->rdn[2], 11, "org_unit"); /* AP = machine_name The Application Process attribute id is defined by ISO to be "3". */ (void)addrdn( & (*dirname)->rdn[3], 3, "machine_name"); |
 |
 |
/* AE = ftam_resp The Application Entity attribute id is defined by ISO to be "3". */ (void)addrdn( & (*dirname)->rdn[4], 3, "ftam_resp"); } /* *** addrdn ** ** DESCRIPTION: ** This routine sets up the Dir_rdn structure using the input ** parameters for values. ** ** ** PARAMETERS: ** Input: ** att_id : integer value for the attribute id ** att_value : character string for the attribute value ** ** Output: ** rdn : pointer to struct Dir_rdn being set up ** */ Sint32 addrdn(rdn, att_id, att_value) struct Dir_rdn *rdn; int att_id; char *att_value; { /* Allocate the memory for struct Dir_ava */ rdn->n = 1; rdn->avas = (struct Dir_ava *)malloc(sizeof(struct Dir_ava)); rdn->avas->attr_value.pointer = (Octet *)malloc (strlen(att_value)*sizeof(Octet)); rdn->avas->attr_id.element = (Sint32 *)malloc(sizeof(Sint32)); /* Set up the attribute id */ *(rdn->avas->attr_id.element) = att_id; rdn->avas->attr_id.length = 1; /* Set up the attribute value */ memcpy(rdn->avas->attr_value.pointer, att_value, strlen(att_value)); rdn->avas->attr_value.length = strlen(att_value); /* The syntax id is for future use */ rdn->avas->syntax_id.element = NULL; rdn->avas->syntax_id.length = 0; } |
 |