Annotation of 43BSDReno/contrib/isode-beta/dsap/net/dsaprovider.c, revision 1.1

1.1     ! root        1: /* dsaprovider.c - DSAP: Support for DSAP Actions */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dsaprovider.c,v 7.0 90/07/26 14:46:00 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/dsap/net/RCS/dsaprovider.c,v 7.0 90/07/26 14:46:00 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       dsaprovider.c,v $
        !            12:  * Revision 7.0  90/07/26  14:46:00  mrose
        !            13:  * *** empty log message ***
        !            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 "quipu/dsap.h"
        !            32: #include "tailor.h"
        !            33: 
        !            34: /*    BIND interface */
        !            35: 
        !            36: int      ronot2dsaplose (di, event, rni)
        !            37: struct DSAPindication  * di;
        !            38: char                   * event;
        !            39: struct RoNOTindication * rni;
        !            40: {
        !            41: 
        !            42:        char    * cp;
        !            43:        char      buffer[BUFSIZ];
        !            44: 
        !            45: /*
        !            46:        if (event)
        !            47:                SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
        !            48:                        ((rni->rni_cc > 0) ? "%s: %s [%*.*s]" : "%s: %s",
        !            49:                        event, AcErrString (rni->rni_reason), rni->rni_cc,
        !            50:                        rni->rni_cc, rni->rni_data));
        !            51: */
        !            52:        (void) sprintf (cp = buffer, " (Error in RO-BIND)");
        !            53: 
        !            54:        if (rni->rni_cc > 0)
        !            55:                return (dsaplose (di, DA_RO_BIND, NULLCP, "%*.*s%s",
        !            56:                        rni->rni_cc, rni->rni_cc, rni->rni_data, cp));
        !            57:        else
        !            58:                return (dsaplose (di, DA_RO_BIND, NULLCP, "%s", cp));
        !            59: }
        !            60: 
        !            61: /*    ROS interface */
        !            62: 
        !            63: int      ros2dsaplose (di, event, rop)
        !            64: struct DSAPindication  * di;
        !            65: char                   * event;
        !            66: struct RoSAPpreject    * rop;
        !            67: {
        !            68:        char    * cp;
        !            69:        char      buffer[BUFSIZ];
        !            70: 
        !            71: /*
        !            72:        if (event)
        !            73:                SLOG (addr_log, LLOG_EXCEPTIONS, NULLCP,
        !            74:                        ((rop->rop_cc > 0) ? "%s: %s [%*.*s]" : "%s: %s",
        !            75:                        event, AcErrString (rop->rop_reason), rop->rop_cc,
        !            76:                        rop->rop_cc, rop->rop_data));
        !            77: */
        !            78:        (void) sprintf (cp = buffer, " (Error in ROS)");
        !            79: 
        !            80:        if (rop->rop_cc > 0)
        !            81:                return (dsaplose (di, DA_ROS, NULLCP, "%*.*s%s",
        !            82:                        rop->rop_cc, rop->rop_cc, rop->rop_data, cp));
        !            83:        else
        !            84:                return (dsaplose (di, DA_ROS, NULLCP, "%s", cp));
        !            85: }
        !            86: 
        !            87: int      ros2dsapreject (di, event, rou)
        !            88: struct DSAPindication  * di;
        !            89: char                   * event;
        !            90: struct RoSAPureject    * rou;
        !            91: {
        !            92:        char    * cp;
        !            93:        char      buffer[BUFSIZ];
        !            94: 
        !            95:        (void) sprintf (cp = buffer, " (Reject at ROS)");
        !            96: 
        !            97:        if (rou->rou_noid)
        !            98:                return (dsapreject (di, DA_ROS, -1, NULLCP, " no op id, reason: %d%s", rou->rou_reason, cp));
        !            99:        else
        !           100:                return (dsapreject (di, DA_ROS, rou->rou_id, NULLCP, " op id %d, reason: %d%s", rou->rou_id, rou->rou_reason, cp));
        !           101: }
        !           102: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.