Annotation of 43BSDReno/contrib/isode-beta/doc/manual/grind2b-2.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #include "generic.h"           /* defines OPERATIONS and ERRORS */
        !             3: #include <isode/rosap.h>
        !             4: 
        !             5: 
        !             6: int    ros_indication ();
        !             7: 
        !             8: 
        !             9: main (argc, argv, envp)
        !            10: int    argc;
        !            11: char  **argv,
        !            12:       **envp;
        !            13: {
        !            14:     int            result,
        !            15:            sd;
        !            16:     struct AcSAPstart   acss;
        !            17:     register struct AcSAPstart *acs = &acss;
        !            18:     struct AcSAPindication  acis;
        !            19:     register struct AcSAPindication *aci = &acis;
        !            20:     register struct AcSAPabort   *aca = &aci -> aci_abort;
        !            21:     register struct PSAPstart *ps = &acs -> acs_start;
        !            22:     struct RoSAPindication  rois;
        !            23:     register struct RoSAPindication *roi = &rois;
        !            24:     register struct RoSAPpreject   *rop = &roi -> roi_preject;
        !            25: 
        !            26:     if (AcInit (argc, argv, acs, aci) == NOTOK)
        !            27:        error ("initialization fails: %s", AcErrString (aca -> aca_reason));
        !            28: 
        !            29:     sd = acs -> acs_sd;
        !            30:     ACSFREE (acs);
        !            31:     
        !            32: /* read command line arguments here... */
        !            33: 
        !            34:     if (AcAssocResponse (sd, ACS_ACCEPT, ACS_USER_NULL, NULLOID, NULLAEI,
        !            35:                &ps -> ps_called, NULLPC, ps -> ps_defctxresult,
        !            36:                ps -> ps_prequirements, ps -> ps_srequirements,
        !            37:                SERIAL_NONE, ps -> ps_settings, &ps -> ps_connect,
        !            38:                NULLPEP, 0, aci) == NOTOK)
        !            39:        error ("A-ASSOCIATE.RESPONSE: %s", AcErrString (aca -> aca_reason));
        !            40: 
        !            41:     if (RoSetService (sd, RoPService, roi) == NOTOK)
        !            42:        error ("RoSetService: %s", RoErrString (rop -> rop_reason));
        !            43: 
        !            44:     if (RoSetIndications (sd, ros_indication, roi) == NOTOK)
        !            45:        error ("RoSetIndications: %s", RoErrString (rop -> rop_reason));
        !            46: 
        !            47:     for (;;)
        !            48:        pause ();
        !            49: }

unix.superglobalmegacorp.com

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