|
|
1.1 ! root 1: /* ftamtrace.c - FPM: tracing */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/ftam/RCS/ftamtrace.c,v 7.1 90/07/01 21:03:01 mrose Exp $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/ftam/RCS/ftamtrace.c,v 7.1 90/07/01 21:03:01 mrose Exp $ ! 9: * ! 10: * ! 11: * $Log: ftamtrace.c,v $ ! 12: * Revision 7.1 90/07/01 21:03:01 mrose ! 13: * pepsy ! 14: * ! 15: * Revision 7.0 89/11/23 21:53:54 mrose ! 16: * Release 6.0 ! 17: * ! 18: */ ! 19: ! 20: /* ! 21: * NOTICE ! 22: * ! 23: * Acquisition, use, and distribution of this module and related ! 24: * materials are subject to the restrictions of a license agreement. ! 25: * Consult the Preface in the User's Manual for the full terms of ! 26: * this agreement. ! 27: * ! 28: */ ! 29: ! 30: ! 31: /* LINTLIBRARY */ ! 32: ! 33: #include <stdio.h> ! 34: #include <signal.h> ! 35: #include "fpkt.h" ! 36: ! 37: /* DATA */ ! 38: ! 39: LLog _ftam_log = { ! 40: "ftam.log", NULLCP, NULLCP, LLOG_FATAL | LLOG_EXCEPTIONS | LLOG_NOTICE, ! 41: LLOG_NONE, -1, LLOGCLS | LLOGCRT | LLOGZER, NOTOK ! 42: }; ! 43: LLog *ftam_log = &_ftam_log; ! 44: ! 45: static char *ftam_appls[] = { ! 46: "Abstract-Syntax-Name", ! 47: "Access-Context", ! 48: "Access-Passwords", ! 49: "Access-Request", ! 50: "Account", ! 51: "Action-Result", ! 52: "Activity-Identifier", ! 53: "Application-Entity-Title", ! 54: "Change-Attributes", ! 55: "Charging", ! 56: "Concurrency-Control", ! 57: "Constraint-Set-Name", ! 58: "Create-Attributes", ! 59: "Diagnostic", ! 60: "Document-Type-Name", ! 61: "FADU-Identity", ! 62: "FADU-Lock", ! 63: "Password", ! 64: "Read-Attributes", ! 65: "Select-Attributes", ! 66: "Shared-ASE-Information", ! 67: "State-Result", ! 68: "User-Identity" ! 69: }; ! 70: ! 71: static int ftam_nappl = sizeof ftam_appls / sizeof ftam_appls[0]; ! 72: ! 73: /* set tracing */ ! 74: ! 75: int FHookRequest (sd, tracing, fti) ! 76: int sd; ! 77: IFP tracing; ! 78: struct FTAMindication *fti; ! 79: { ! 80: SBV smask; ! 81: register struct ftamblk *fsb; ! 82: ! 83: missingP (fti); ! 84: ! 85: smask = sigioblock (); ! 86: ! 87: ftamPsig (fsb, sd); ! 88: ! 89: if (fsb -> fsb_trace = tracing) ! 90: pe_applist = ftam_appls, pe_maxappl = ftam_nappl; ! 91: ! 92: (void) sigiomask (smask); ! 93: ! 94: return OK; ! 95: } ! 96: ! 97: /* user-defined tracing */ ! 98: ! 99: /* ARGSUSED */ ! 100: ! 101: int FTraceHook (sd, event, fpdu, pe, rw) ! 102: int sd; ! 103: char *event, ! 104: *fpdu; ! 105: PE pe; ! 106: int rw; ! 107: { ! 108: if (event) ! 109: LLOG (ftam_log, LLOG_ALL, ("%s %s", rw > 0 ? "event" ! 110: : rw == 0 ? "action" : "exception", event)); ! 111: ! 112: if (pe) ! 113: pvpdu (ftam_log, print_FTAM_PDU_P, pe, fpdu ? fpdu : "FPDU", rw); ! 114: ! 115: (void) ll_sync (ftam_log); ! 116: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.