|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 2534 (0x9e6) Types: TextFile Names: »acsapdse.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/acsap/acsapdse.c«
/* acsapdse.c - application entity info -- directory service interface */ #ifndef lint static char *rcsid = "$Header: /f/osi/acsap/RCS/acsapdse.c,v 6.0 89/03/18 23:24:09 mrose Rel $"; #endif /* * $Header: /f/osi/acsap/RCS/acsapdse.c,v 6.0 89/03/18 23:24:09 mrose Rel $ * * * $Log: acsapdse.c,v $ * Revision 6.0 89/03/18 23:24:09 mrose * Release 5.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ /* LINTLIBRARY */ #include <stdio.h> #include "psap.h" #include "isoaddrs.h" #include "tailor.h" /* \f DATA */ static AEInfo aeis; static struct PSAPaddr pas; #ifdef STRING_ATTRIBUTES #define PRESENTATION_ADDRESS "presentationAddress" #define COMMON_NAME "commonName" #else #define PRESENTATION_ADDRESS "2.5.4.29" #define COMMON_NAME "2.5.4.3" #endif PE (*acsap_lookup) () = name2value; /* \f */ AEI str2aei_dse (designator, qualifier) char *designator, *qualifier; { char *alias, name[BUFSIZ]; PE pe; register AEI aei = &aeis; register struct PSAPaddr *pa = &pas; static int first_time = 1; if (first_time) first_time = 0; else { AEIFREE (aei); } bzero ((char *) aei, sizeof *aei); if ((alias = alias2name (designator)) == NULL) alias = designator; (void) sprintf (name, "%s@%s=%s", alias, COMMON_NAME, qualifier); if (acsap_lookup == NULL) { SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ("str2aei acsap_lookup function not set")); return NULLAEI; } bzero ((char *) pa, sizeof *pa); if (pe = (*acsap_lookup) (name, PRESENTATION_ADDRESS, &aei -> aei_ap_title)) { if (parse_DSE_PSAPaddr (pe, 1, NULLIP, NULLVP, (char *) pa) == NOTOK) { SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ("parse of presentationAddress failed: %s", PY_pepy)); } else PLOG (addr_log, print_DSE_PSAPaddr, pe, "address", 1); pe_free (pe); } else SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ("directory returns no value")); return (aei -> aei_ap_title ? aei : NULLAEI); } /* \f */ struct PSAPaddr *aei2addr_dse (aei) AEI aei; { register struct PSAPaddr *pa; if (aei != &aeis) { SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP, ("aei2addr_dse cache miss on %s", sprintaei (aei))); return NULLPA; } return ((pa = &pas) -> pa_addr.sa_addr.ta_naddr > 0 ? pa : NULLPA); }