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 t

⟦abb333d81⟧ TextFile

    Length: 1970 (0x7b2)
    Types: TextFile
    Names: »tsaperror.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« 
        └─⟦d846658bd⟧ 
            └─⟦this⟧ »osimis/misode/tsap/tsaperror.c« 
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/tsap/tsaperror.c« 

TextFile

/* tsaperror.c - print out TPKT error codes */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/tsap/RCS/tsaperror.c,v 7.0 89/11/23 22:30:43 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/tsap/RCS/tsaperror.c,v 7.0 89/11/23 22:30:43 mrose Rel $
 *
 *
 * $Log:	tsaperror.c,v $
 * Revision 7.0  89/11/23  22:30:43  mrose
 * Release 6.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 "tsap.h"

/* \f

 */

static char *disc_err0[] = {
    "Reason not specified",
    "Congestion at TSAP",
    "Session entity not attached to TSAP",
    "Address unknown"
};

static int  disc_err0_cnt = sizeof disc_err0 / sizeof disc_err0[0];


static char *disc_err8[] = {
    "Normal disconnect initiated by session entity",
    "Remote transport entity congestion at connect time",
    "Connection negotiation failed (proposed class(es) not supported)",
    "Duplicate source reference detected for the same pair of NSAPs",
    "Mismatched references",
    "Protocol error",
    "Not used",
    "Reference overflow",
    "Connect request refused on this network connection",
    "Not used",
    "Header or parameter length invalid",
    "Network disconnect",
    "Invalid parameter",
    "Invalid operation",
    "Timer expired",
    "Indications waiting"
};

static int  disc_err8_cnt = sizeof disc_err8 / sizeof disc_err8[0];

/* \f

 */

char *TErrString(code)
register int	code;
{
    register int    fcode;
    static char buffer[BUFSIZ];

    code &= 0xff;
    if (code & DR_BASE) {
	if ((fcode = code & ~DR_BASE) < disc_err8_cnt)
	    return disc_err8[fcode];
    }
    else
	if (code < disc_err0_cnt)
	    return disc_err0[code];

    (void) sprintf (buffer, "unknown error code 0x%x", code);
    return buffer;
}