DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦3b5ad4ca0⟧ TextFile

    Length: 2681 (0xa79)
    Types: TextFile
    Names: »acsapaddr.c«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/acsap/acsapaddr.c« 

TextFile

/* acsapaddr.c - application entity information -- lookup */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/acsap/RCS/acsapaddr.c,v 6.0 89/03/18 23:24:07 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/acsap/RCS/acsapaddr.c,v 6.0 89/03/18 23:24:07 mrose Rel $
 *
 *
 * $Log:	acsapaddr.c,v $
 * Revision 6.0  89/03/18  23:24:07  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"


#ifndef	NOSTUB
AEI	str2aei_stub ();
struct PSAPaddr *aei2addr_stub ();
#endif

AEI	str2aei_dse ();
struct PSAPaddr *aei2addr_dse ();

/* \f

   DATA */

#ifndef	NOSTUB
static char fallback1[BUFSIZ],
	    fallback2[BUFSIZ];
#endif

static struct PSAPaddr *(*lookup) () = NULL;

/* \f

 */

AEI	str2aei (designator, qualifier)
char   *designator,
       *qualifier;
{
    AEI	    aei;

    if (qualifier == NULLCP)
	qualifier = "default";

    isodetailor (NULLCP, 0);
    LLOG (addr_log, LLOG_TRACE,
	  ("str2aei \"%s\" \"%s\"", designator, qualifier));

    aei = NULL, lookup = NULL;

    if (ns_enabled) {
	if (aei = str2aei_dse (designator, qualifier)) {
	    lookup = aei2addr_dse;
#ifndef	NOSTUB
	    (void) strcpy (fallback1, designator);
	    (void) strcpy (fallback2, qualifier);
	    goto out;
#endif
	}
	else
	    SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
		  ("DSE lookup of service \"%s-%s\" failed",
		   designator, qualifier));
    }

#ifndef	NOSTUB
    if (aei = str2aei_stub (designator, qualifier))
	lookup = aei2addr_stub;
    else
	SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
	      ("stub DSE lookup of service \"%s-%s\" failed",
	       designator, qualifier));
#endif

#ifndef	NOSTUB
out: ;
#endif
    SLOG (addr_log, LLOG_TRACE, NULLCP,
	  ("str2aei returns %s", aei ? sprintaei (aei) : "NULLAEI"));

    return aei;
}

/* \f

 */

struct PSAPaddr *aei2addr (aei)
AEI	aei;
{
    struct PSAPaddr *pa;

    isodetailor (NULLCP, 0);
    SLOG (addr_log, LLOG_TRACE, NULLCP, ("aei2addr %s", sprintaei (aei)));

    if (lookup) {
	pa = (*lookup) (aei);
#ifndef	NOSTUB
	if (pa == NULLPA
		&& lookup == aei2addr_dse
		&& (aei = str2aei_stub (fallback1, fallback2))
		&& (pa = aei2addr_stub (aei))) {
	    SLOG (addr_log, LLOG_NOTICE, NULLCP, 
		   ("fallback use of stub DSE succeeded"));
	}
#endif

	lookup = NULL;
    }
    else
	pa = NULLPA;

    SLOG (addr_log, LLOG_TRACE, NULLCP,
	  ("aei2addr returns %s", paddr2str (pa, NULLNA)));

    return pa;
}