Annotation of kernel/bsd/netat/at/at_atp.h, revision 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:  *
        !            27:  * ORIGINS: 82
        !            28:  *
        !            29:  * APPLE CONFIDENTIAL
        !            30:  * (C) COPYRIGHT Apple Computer, Inc. 1992-1996
        !            31:  * All Rights Reserved
        !            32:  *
        !            33:  */                                                                   
        !            34: 
        !            35: /* Definitions for ATP protocol and streams module, per 
        !            36:  * AppleTalk Transaction Protocol documentation from
        !            37:  * `Inside AppleTalk', July 14, 1986.
        !            38:  */
        !            39: 
        !            40: #ifndef UIOSEG_USER
        !            41: # include <sys/uio.h>
        !            42: #endif
        !            43: 
        !            44: #define ATP_ATP_HDR(c) ((at_atp_t *)(&((at_ddp_t *)(c))->data[0]))
        !            45: 
        !            46: #define TOTAL_ATP_HDR_SIZE    (ATP_HDR_SIZE+DDP_X_HDR_SIZE)
        !            47: #define ATP_CLEAR_CONTROL(c)  (*(char *)(c) = 0)
        !            48: 
        !            49: /* ATP ioctl interface */
        !            50: 
        !            51: /* Structure for the atp_set_default call */
        !            52: 
        !            53: #define        ATP_INFINITE_RETRIES    0xffffffff      /* means retry forever
        !            54:                                                 * in the def_retries field
        !            55:                                                 */
        !            56: 
        !            57: struct atp_set_default {
        !            58:        u_int   def_retries;            /* number of retries for a request */
        !            59:        u_int   def_rate;               /* retry rate (in seconds/100) NB: the
        !            60:                                         * system may not be able to resolve
        !            61:                                         * delays of 100th of a second but will
        !            62:                                         * instead make a 'best effort'
        !            63:                                         */
        !            64:        struct atpBDS *def_bdsp; /*  BDS structure associated with this req */
        !            65:        u_int   def_BDSlen;     /* size of BDS structure */
        !            66: };
        !            67: 
        !            68: 
        !            69: /* Return header from requests */
        !            70: 
        !            71: struct atp_result {
        !            72:        u_short         count;          /* the number of packets */
        !            73:        u_short         hdr;            /* offset to header in buffer */
        !            74:        u_short         offset[8];      /* offset to the Nth packet in the buffer */
        !            75:        u_short         len[8];         /* length of the Nth packet */
        !            76: };
        !            77: 
        !            78: struct atpBDS {
        !            79:        ua_short        bdsBuffSz;
        !            80:        ua_long         bdsBuffAddr;
        !            81:        ua_short        bdsDataSz;
        !            82:        unsigned char   bdsUserData[4];
        !            83: };
        !            84: 
        !            85: 
        !            86: typedef struct {
        !            87:         u_short        at_atpreq_type;
        !            88:         at_net         at_atpreq_to_net;
        !            89:         at_node        at_atpreq_to_node;
        !            90:         at_socket      at_atpreq_to_socket;
        !            91:         u_char         at_atpreq_treq_user_bytes[4];
        !            92:         u_char         *at_atpreq_treq_data;
        !            93:         u_short        at_atpreq_treq_length;
        !            94:         u_char         at_atpreq_treq_bitmap;
        !            95:         u_char         at_atpreq_xo;
        !            96:         u_char         at_atpreq_xo_relt;
        !            97:         u_short        at_atpreq_retry_timeout;
        !            98:         u_short        at_atpreq_maximum_retries;
        !            99:         u_char         at_atpreq_tresp_user_bytes[ATP_TRESP_MAX][4];
        !           100:         u_char         *at_atpreq_tresp_data[ATP_TRESP_MAX];
        !           101:         u_short        at_atpreq_tresp_lengths[ATP_TRESP_MAX];
        !           102:         u_long         at_atpreq_debug[4];
        !           103:         u_short        at_atpreq_tid;
        !           104:         u_char         at_atpreq_tresp_bitmap;
        !           105:         u_char         at_atpreq_tresp_eom_seqno;
        !           106:         u_char         at_atpreq_got_trel;
        !           107: } at_atpreq;
        !           108: 
        !           109: 
        !           110: /* The ATP module ioctl commands */
        !           111: 
        !           112: #define AT_ATP_CANCEL_REQUEST          (('|'<<8)|1)
        !           113: #define AT_ATP_ISSUE_REQUEST           (('|'<<8)|2)
        !           114: #define AT_ATP_ISSUE_REQUEST_DEF       (('|'<<8)|3)
        !           115: #define AT_ATP_ISSUE_REQUEST_DEF_NOTE  (('|'<<8)|4)
        !           116: #define AT_ATP_ISSUE_REQUEST_NOTE      (('|'<<8)|5)
        !           117: #define AT_ATP_GET_POLL                        (('|'<<8)|6)
        !           118: #define AT_ATP_RELEASE_RESPONSE        (('|'<<8)|7)
        !           119: #define AT_ATP_REQUEST_COMPLETE        (('|'<<8)|8)
        !           120: #define AT_ATP_SEND_FULL_RESPONSE      (('|'<<8)|9)
        !           121: #define AT_ATP_BIND_REQ                        (('|'<<8)|10)
        !           122: #define AT_ATP_GET_CHANID              (('|'<<8)|11)
        !           123: #define AT_ATP_PEEK                            (('|'<<8)|12)
        !           124: 
        !           125: /* These macros don't really depend here, but since they're used only by the
        !           126:  * old ATP and old PAP, they're put here.  Unisoft PAP includes this file.
        !           127:  */
        !           128: #define        R16(x)          UAS_VALUE(x)
        !           129: #define        W16(x,v)        UAS_ASSIGN(x, v)
        !           130: #define        C16(x,v)        UAS_UAS(x, v)
        !           131: 
        !           132: 
        !           133: /*
        !           134:  * these are the dispatch codes for
        !           135:  * the new atp_control system call
        !           136:  */
        !           137: #define ATP_SENDREQUEST  0
        !           138: #define ATP_GETRESPONSE  1
        !           139: #define ATP_SENDRESPONSE 2
        !           140: #define ATP_GETREQUEST   3

unix.superglobalmegacorp.com

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