//  -------------------------------------------------
//
//  Stub file "stub.cfrhand-server"
//
//  Generated from "stub.cfrhand-def" version 3
//  Written on Friday, 16-Oct-87 at 17:34:37
//
//  -------------------------------------------------



//  GLOBAL
//  $(
//      serverstub.findcfrinfo
//      serverstub.findpublicassociation
//      serverstub.extractinfo
//      serverstub.addassociation
//      serverstub.modifyassociation
//      serverstub.deleteassociation
//  $)



//  GLOBAL
//  $(
//      server.findcfrinfo
//      server.findpublicassociation
//      server.extractinfo
//      server.addassociation
//      server.modifyassociation
//      server.deleteassociation
//  $)



AND rpc.findprocedure( function, version )  =  VALOF
$(
    UNLESS  version = 3  DO  RESULTIS  NIL

    SWITCHON  function  INTO
    $(
        CASE   1 :  RESULTIS  serverstub.findcfrinfo
        CASE   2 :  RESULTIS  serverstub.findpublicassociation
        CASE   3 :  RESULTIS  serverstub.extractinfo
        CASE   4 :  RESULTIS  serverstub.addassociation
        CASE   5 :  RESULTIS  serverstub.modifyassociation
        CASE   6 :  RESULTIS  serverstub.deleteassociation

        DEFAULT  :  RESULTIS  NIL
    $)
$)



AND serverstub.findcfrinfo( ccb )  =  VALOF
$(
//  RPC function 1 version 3
//
//    PROCEDURE findcfrinfo( device, address, config )  PROTOCOL eo
//      INT device  OUT
//      INT address  OUT
//      INT config  OUT
//    END findcfrinfo

    LET work1  =  0
    LET device  =  @work1
    LET work2  =  0
    LET address  =  @work2
    LET work3  =  0
    LET config  =  @work3

    //  Nothing to marshall

    UNLESS  server.findcfrinfo( device, address, config )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    UNLESS  marshall.int( ccb, device )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, address )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, config )  DO  RESULTIS  FALSE

    RESULTIS  TRUE
$)



AND serverstub.findpublicassociation( ccb )  =  VALOF
$(
//  RPC function 2 version 3
//
//    PROCEDURE findpublicassociation( association )  PROTOCOL eo
//      INT association  OUT
//    END findpublicassociation

    LET work1  =  0
    LET association  =  @work1

    //  Nothing to marshall

    UNLESS  server.findpublicassociation( association )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    UNLESS  marshall.int( ccb, association )  DO  RESULTIS  FALSE

    RESULTIS  TRUE
$)



AND serverstub.extractinfo( ccb )  =  VALOF
$(
//  RPC function 3 version 3
//
//    PROCEDURE extractinfo( association, port, peeraddr, peerport, timeout )  PROTOCOL eo
//      INT association  IN
//      INT port  OUT
//      INT peeraddr  OUT
//      INT peerport  OUT
//      INT timeout  OUT
//    END extractinfo

    LET work1  =  0
    LET association  =  @work1
    LET work2  =  0
    LET port  =  @work2
    LET work3  =  0
    LET peeraddr  =  @work3
    LET work4  =  0
    LET peerport  =  @work4
    LET work5  =  0
    LET timeout  =  @work5

    UNLESS  marshall.int( ccb, association )  DO  RESULTIS  FALSE

    UNLESS  server.extractinfo( association, port, peeraddr, peerport, timeout )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    UNLESS  marshall.int( ccb, port )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, peeraddr )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, peerport )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, timeout )  DO  RESULTIS  FALSE

    RESULTIS  TRUE
$)



AND serverstub.addassociation( ccb )  =  VALOF
$(
//  RPC function 4 version 3
//
//    PROCEDURE addassociation( association, port, peeraddr, peerport, timeout )  PROTOCOL eo
//      INT association  OUT
//      INT port  OUT
//      INT peeraddr  IN
//      INT peerport  IN
//      INT timeout  IN
//    END addassociation

    LET work1  =  0
    LET association  =  @work1
    LET work2  =  0
    LET port  =  @work2
    LET work3  =  0
    LET peeraddr  =  @work3
    LET work4  =  0
    LET peerport  =  @work4
    LET work5  =  0
    LET timeout  =  @work5

    UNLESS  marshall.int( ccb, peeraddr )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, peerport )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, timeout )  DO  RESULTIS  FALSE

    UNLESS  server.addassociation( association, port, peeraddr, peerport, timeout )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    UNLESS  marshall.int( ccb, association )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, port )  DO  RESULTIS  FALSE

    RESULTIS  TRUE
$)



AND serverstub.modifyassociation( ccb )  =  VALOF
$(
//  RPC function 5 version 3
//
//    PROCEDURE modifyassociation( association, peeraddr, peerport, timeout )  PROTOCOL eo
//      INT association  IN
//      INT peeraddr  IN
//      INT peerport  IN
//      INT timeout  IN
//    END modifyassociation

    LET work1  =  0
    LET association  =  @work1
    LET work2  =  0
    LET peeraddr  =  @work2
    LET work3  =  0
    LET peerport  =  @work3
    LET work4  =  0
    LET timeout  =  @work4

    UNLESS  marshall.int( ccb, association )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, peeraddr )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, peerport )  DO  RESULTIS  FALSE
    UNLESS  marshall.int( ccb, timeout )  DO  RESULTIS  FALSE

    UNLESS  server.modifyassociation( association, peeraddr, peerport, timeout )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    //  Nothing to marshall

    RESULTIS  TRUE
$)



AND serverstub.deleteassociation( ccb )  =  VALOF
$(
//  RPC function 6 version 3
//
//    PROCEDURE deleteassociation( association )  PROTOCOL eo
//      INT association  IN
//    END deleteassociation

    LET work1  =  0
    LET association  =  @work1

    UNLESS  marshall.int( ccb, association )  DO  RESULTIS  FALSE

    UNLESS  server.deleteassociation( association )  DO  RESULTIS  FALSE

    rpc.setupreply( ccb )

    //  Nothing to marshall

    RESULTIS  TRUE
$)



//  End of server procedures
