Annotation of kernel/bsd/netat/adsp_CLDeny.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: 
                     26: #include       <adsp_local.h>
                     27: 
                     28: /*
                     29:  * dspCLDeny
                     30:  * 
                     31:  * INPUTS:
                     32:  *     --> ccbRefNum           refnum of connection listener
                     33:  *     --> remoteCID           connection identifier of remote connection end
                     34:  *     --> remoteAddress       internet address of remote connection end
                     35:  *
                     36:  * OUTPUTS:
                     37:  *     none
                     38:  *
                     39:  * ERRORS:
                     40:  *     errRefNum               bad connection refnum
                     41:  *     errState                not a connection listener
                     42:  *     errAborted              request aborted by a Remove call
                     43:  */
                     44: int adspCLDeny(sp, pb)                 /* (DSPPBPtr pb) */
                     45:     struct adspcmd *pb;
                     46:     CCBPtr sp;
                     47: {
                     48:     gbuf_t *mp;
                     49:     ADSP_FRAMEPtr adspp;
                     50:     ADSP_OPEN_DATAPtr adspop;
                     51:        
                     52:     if (sp == 0) {
                     53:        pb->ioResult = errRefNum;
                     54:        return EINVAL;
                     55:     }
                     56:     mp = gbuf_alloc(AT_WR_OFFSET + DDPL_FRAME_LEN + ADSP_FRAME_LEN + ADSP_OPEN_FRAME_LEN,
                     57:                PRI_LO);
                     58:     gbuf_rinc(mp,AT_WR_OFFSET);
                     59:     gbuf_wset(mp,DDPL_FRAME_LEN);
                     60:     adspp = (ADSP_FRAMEPtr)gbuf_wptr(mp);
                     61:     gbuf_winc(mp,ADSP_FRAME_LEN);
                     62:     bzero((caddr_t) gbuf_rptr(mp),DDPL_FRAME_LEN + ADSP_FRAME_LEN + ADSP_OPEN_FRAME_LEN);
                     63:     adspp->descriptor = ADSP_CONTROL_BIT | ADSP_CTL_ODENY;
                     64:     adspop = (ADSP_OPEN_DATAPtr)gbuf_wptr(mp);
                     65:     gbuf_winc(mp,ADSP_OPEN_FRAME_LEN);
                     66:     UAS_ASSIGN(adspop->dstCID, pb->u.openParams.remoteCID);
                     67:     UAS_ASSIGN(adspop->version, 0x100);
                     68:     adsp_sendddp(sp, mp, 
                     69:                 DDPL_FRAME_LEN + ADSP_FRAME_LEN + ADSP_OPEN_FRAME_LEN, 
                     70:                 &pb->u.openParams.remoteAddress, DDP_ADSP);
                     71:     adspioc_ack(0, pb->ioc, pb->gref);
                     72:     return 0;
                     73: }

unix.superglobalmegacorp.com

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