|
|
1.1 ! root 1: /* ftamerror.c - return FTAM error code in string form */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/ftam/RCS/ftamerror.c,v 7.0 89/11/23 21:53:34 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/ftam/RCS/ftamerror.c,v 7.0 89/11/23 21:53:34 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: ftamerror.c,v $ ! 12: * Revision 7.0 89/11/23 21:53:34 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 "ftam.h" ! 32: ! 33: /* DATA */ ! 34: ! 35: static char *diag_gen[] = { ! 36: "No reason", ! 37: "Responder error (unspecific)", ! 38: "System shutdown", ! 39: "FTAM management problem (unspecific)", ! 40: "FTAM management, bad account", ! 41: "FTAM management, security not passed", ! 42: "Delay may be encountered", ! 43: "Initiator error (unspecific)", ! 44: "Subsequent error", ! 45: "Temporal insufficiency of resources", ! 46: "Access request violates VFS security", ! 47: "Access request violates local security", ! 48: "Indications waiting" ! 49: }; ! 50: ! 51: static int diag_gen_cnt = sizeof diag_gen / sizeof diag_gen[0]; ! 52: ! 53: ! 54: static char *diag_pro[] = { ! 55: "Conflicting parameter values", ! 56: "Unsupported parameter values", ! 57: "Mandatory parameter not set", ! 58: "Unsupported parameter", ! 59: "Duplicated parameter", ! 60: "Illegal parameter type", ! 61: "Unsupported parameter type", ! 62: "FTAM protocol error (unspecific)", ! 63: "FTAM protocol error, procedure error", ! 64: "FTAM protocol error, functional unit error", ! 65: "FTAM protocol error, corruption error", ! 66: "Lower layer failure", ! 67: "Lower layer addressing error", ! 68: "Timeout", ! 69: "System shutdown", ! 70: "Illegal grouping sequence", ! 71: "Grouping threshold violation", ! 72: "Specific PDU request inconsistent with the current requested access" ! 73: }; ! 74: ! 75: static int diag_pro_cnt = sizeof diag_pro / sizeof diag_pro[0]; ! 76: ! 77: ! 78: static char *diag_acs[] = { ! 79: "Association with user not allowed", ! 80: "not assigned, #2001", ! 81: "Unsupported service class", ! 82: "Unsupported functional unit", ! 83: "Attribute group error (unspecific)", ! 84: "Attribute group not supported", ! 85: "Attribute group not allowed", ! 86: "Bad account", ! 87: "Association management (unspecific)", ! 88: "Association management - bad address", ! 89: "Association management - bad account", ! 90: "Checkpoint window error - too large", ! 91: "Checkpoint window error - too small", ! 92: "Checkpoint window error - unsupported", ! 93: "Communications QoS not supported", ! 94: "Initiator identity unacceptable", ! 95: "Context management refused", ! 96: "Rollback not available", ! 97: "Contents type list cut by responder", ! 98: "Contents type list cut by Presentation service", ! 99: "Invalid filestore password", ! 100: "Incompatible service classes" ! 101: }; ! 102: ! 103: static int diag_acs_cnt = sizeof diag_acs / sizeof diag_acs[0]; ! 104: ! 105: ! 106: static char *diag_sel[] = { ! 107: "Filename not found", ! 108: "Selection attributes not matched", ! 109: "Initial attributes not possible", ! 110: "Bad attribute name", ! 111: "Non-existent file", ! 112: "File already exists", ! 113: "File can not be created", ! 114: "File can not be deleted", ! 115: "Concurrency control not available", ! 116: "Concurrency control not supported", ! 117: "Concurrency control not possible", ! 118: "More restrictive lock", ! 119: "File busy", ! 120: "File not available", ! 121: "Access control not available", ! 122: "Access control not supported", ! 123: "Access control inconsistent", ! 124: "Filename truncated", ! 125: "Initial attributes altered", ! 126: "Bad account", ! 127: "Override selected existing file", ! 128: "Override deleted and recreated file with old attributes", ! 129: "Create override deleted and recreated file with new attributes", ! 130: "Create override - not possible", ! 131: "Ambiguous file specification", ! 132: "Invalid create password", ! 133: "Invalid delete password on override", ! 134: "Bad attribute value", ! 135: "Requested access violates permitted actions", ! 136: "Functional unit not available for requested access", ! 137: "File created but not selected" ! 138: }; ! 139: ! 140: static int diag_sel_cnt = sizeof diag_sel / sizeof diag_sel[0]; ! 141: ! 142: ! 143: static char *diag_mgt[] = { ! 144: "Attribute non-existant", ! 145: "Attribute cannot be read", ! 146: "Attribute cannot be changed", ! 147: "Attribute not supported", ! 148: "Bad attribute name", ! 149: "Bad attribute value", ! 150: "Attribute partially supported", ! 151: "Additional set attribute not distinct" ! 152: }; ! 153: ! 154: static int diag_mgt_cnt = sizeof diag_mgt / sizeof diag_mgt[0]; ! 155: ! 156: ! 157: static char *diag_acc[] = { ! 158: "Bad FADU (unspecific)", ! 159: "Bad FADU - size error", ! 160: "Bad FADU - type error", ! 161: "Bad FADU - poorly specified", ! 162: "Bad FADU - bad location", ! 163: "FADU does not exist", ! 164: "FADU not available (unspecific)", ! 165: "FADU not available for reading", ! 166: "FADU not available for writing", ! 167: "FADU not available for location", ! 168: "FADU not available for erasure", ! 169: "FADU cannot be inserted", ! 170: "FADU cannot be replaced", ! 171: "FADU cannot be located", ! 172: "Bad data element type", ! 173: "Operation not available", ! 174: "Operation not supported", ! 175: "Operation inconsistent", ! 176: "Concurrency control not available", ! 177: "Concurrency control not supported", ! 178: "Concurrency control inconsistent", ! 179: "Processing mode not available", ! 180: "Processing mode not supported", ! 181: "Processing mode inconsistent", ! 182: "Access context not available", ! 183: "Access context not supported", ! 184: "Bad write (unspecific)", ! 185: "Bad read (unspecific)", ! 186: "Local failure (unspecific)", ! 187: "Local failure - file space exhausted", ! 188: "Local failure - data corrupted", ! 189: "Local failure - device failure", ! 190: "Future file size exceeded", ! 191: "not assigned, #5033", ! 192: "Future file size increased", ! 193: "Functional unit invalid in processing mode", ! 194: "Contents type inconsistent", ! 195: "Contents type simplified", ! 196: "Duplicate FADU name", ! 197: "Damage to select/open regime", ! 198: "FADU locking not available on file", ! 199: "FADU locked by another user" ! 200: }; ! 201: ! 202: static int diag_acc_cnt = sizeof diag_acc / sizeof diag_acc[0]; ! 203: ! 204: ! 205: static char *diag_rvy[] = { ! 206: "Bad checkpoint (unspecific)", ! 207: "Activity not unique", ! 208: "Checkpoint outside window", ! 209: "Activity no longer exists", ! 210: "Activity not recognized", ! 211: "No docket", ! 212: "Corrupt docket", ! 213: "File waiting restart", ! 214: "Bad recovery point", ! 215: "Non-existent recovery point", ! 216: "Recovery mode not available", ! 217: "Recovery mode inconsistent", ! 218: "Recovery mode reduced", ! 219: "Access control not available", ! 220: "Access control not supported", ! 221: "Access control inconsistent", ! 222: "Contents type inconsistent", ! 223: "Contents type simplified" ! 224: }; ! 225: ! 226: static int diag_rvy_cnt = sizeof diag_rvy / sizeof diag_rvy[0]; ! 227: ! 228: /* */ ! 229: ! 230: char *FErrString (code) ! 231: register int code; ! 232: { ! 233: register int offset; ! 234: char buffer[BUFSIZ]; ! 235: ! 236: offset = FS_CODE2OFF (code); ! 237: switch (code - offset) { ! 238: case FS_GEN_BASE: ! 239: if (offset < diag_gen_cnt) ! 240: return diag_gen[offset]; ! 241: break; ! 242: ! 243: case FS_PRO_BASE: ! 244: if (offset < diag_pro_cnt) ! 245: return diag_pro[offset]; ! 246: break; ! 247: ! 248: case FS_ACS_BASE: ! 249: if (offset < diag_acs_cnt) ! 250: return diag_acs[offset]; ! 251: break; ! 252: ! 253: case FS_SEL_BASE: ! 254: if (offset < diag_sel_cnt) ! 255: return diag_sel[offset]; ! 256: break; ! 257: ! 258: case FS_MGT_BASE: ! 259: if (offset < diag_mgt_cnt) ! 260: return diag_mgt[offset]; ! 261: break; ! 262: ! 263: case FS_ACC_BASE: ! 264: if (offset < diag_acc_cnt) ! 265: return diag_acc[offset]; ! 266: break; ! 267: ! 268: case FS_RVY_BASE: ! 269: if (offset < diag_rvy_cnt) ! 270: return diag_rvy[offset]; ! 271: break; ! 272: } ! 273: ! 274: (void) sprintf (buffer, "unknown error code %d", code); ! 275: return buffer; ! 276: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.