|
|
1.1 ! root 1: /* ssaperror.c - return SSAP error code in string form */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/ssap/RCS/ssaperror.c,v 7.0 89/11/23 22:25:25 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/ssap/RCS/ssaperror.c,v 7.0 89/11/23 22:25:25 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: ssaperror.c,v $ ! 12: * Revision 7.0 89/11/23 22:25:25 mrose ! 13: * Release 6.0 ! 14: * ! 15: */ ! 16: ! 17: /* ! 18: * NOTICE ! 19: * ! 20: * Acquisition, use, and distribution of this module and related ! 21: * materials are subject to the restrictions of a license agreement. ! 22: * Consult the Preface in the User's Manual for the full terms of ! 23: * this agreement. ! 24: * ! 25: */ ! 26: ! 27: ! 28: /* LINTLIBRARY */ ! 29: ! 30: #include <stdio.h> ! 31: #include "ssap.h" ! 32: ! 33: /* */ ! 34: ! 35: static char *reject_err0[] = { ! 36: "Reason not specified", ! 37: "Temporary congestion", ! 38: "Rejected" ! 39: }; ! 40: ! 41: static int reject_err0_cnt = sizeof reject_err0 / sizeof reject_err0[0]; ! 42: ! 43: ! 44: static char *reject_err8[] = { ! 45: "unknown error code 0x80", ! 46: "SSAP identifier unknown", ! 47: "SS-user not attached to SSAP", ! 48: "Congestion at SSAP", ! 49: "Proposed protocol versions not supported", ! 50: "Address unknown", ! 51: "Connect request refused on this network connection", ! 52: "Transport disconnect", ! 53: "Provider-initiated abort", ! 54: "Protocol error", ! 55: "Invalid parameter", ! 56: "Invalid operation", ! 57: "Timer expired", ! 58: "Indications waiting" ! 59: }; ! 60: ! 61: static int reject_err8_cnt = sizeof reject_err8 / sizeof reject_err8[0]; ! 62: ! 63: ! 64: /* */ ! 65: ! 66: char *SErrString(code) ! 67: register int code; ! 68: { ! 69: register int fcode; ! 70: static char buffer[BUFSIZ]; ! 71: ! 72: code &= 0xff; ! 73: if (code & SC_BASE) { ! 74: if ((fcode = code & ~SC_BASE) < reject_err8_cnt) ! 75: return reject_err8[fcode]; ! 76: } ! 77: else ! 78: if (code < reject_err0_cnt) ! 79: return reject_err0[code]; ! 80: ! 81: (void) sprintf (buffer, "unknown error code 0x%x", code); ! 82: return buffer; ! 83: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.