Annotation of kernel/bsd/netat/at/nbp.h, 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:  *
                     27:  *
                     28:  * ORIGINS: 82
                     29:  *
                     30:  * APPLE CONFIDENTIAL
                     31:  * (C) COPYRIGHT Apple Computer, Inc. 1992-1996
                     32:  * All Rights Reserved
                     33:  *
                     34:  */                                                                   
                     35: 
                     36: 
                     37: #ifndef __NBP__
                     38: #define __NBP__
                     39: 
                     40: /* NBP DDP socket type */
                     41: #define  NBP_DDP_TYPE          0x02    /* NBP packet */
                     42: 
                     43: /* NBP DDP socket number */
                     44: #define  NBP_SOCKET            0x02    /* NIS socket number */
                     45: 
                     46: 
                     47: /* NBP packet types */
                     48: 
                     49: #define NBP_BRRQ                       0x01    /* Broadcast request */
                     50: #define NBP_LKUP               0x02    /* Lookup */
                     51: #define NBP_LKUP_REPLY         0x03    /* Lookup reply */
                     52: #define NBP_FWDRQ                      0x04    /* Forward Request (router only) */
                     53: #define NBP_REGISTER           0x07    /* Register a name */
                     54: #define NBP_DELETE             0x08    /* Delete a name */
                     55: #define NBP_CONFIRM            0x09    /* Confirm, not sent on wire */
                     56: #define NBP_STATUS_REPLY       0x0a    /* Status on register/delete */
                     57: #define        NBP_CLOSE_NOTE          0x0b    /* Close notification from DDP */
                     58: 
                     59: 
                     60: /* Protocol defaults */
                     61: 
                     62: #define NBP_RETRY_COUNT                8       /* Maximum repeats */
                     63: #define NBP_RETRY_INTERVAL     1       /* Retry timeout */
                     64: 
                     65: 
                     66: /* Special (partial) wildcard character */
                     67: #define        NBP_SPL_WILDCARD        0xC5
                     68: #define        NBP_ORD_WILDCARD        '='
                     69: 
                     70: 
                     71: #define NBP_NVE_STR_SIZE       32      /* Maximum NBP tuple string size */
                     72: typedef struct at_nvestr {
                     73:        u_char          len;
                     74:        u_char          str[NBP_NVE_STR_SIZE];
                     75: } at_nvestr_t;
                     76: 
                     77: 
                     78: /* Entity Name */
                     79: 
                     80: typedef struct at_entity {
                     81:        at_nvestr_t     object;
                     82:        at_nvestr_t     type;
                     83:        at_nvestr_t     zone;
                     84: } at_entity_t;
                     85: 
                     86: 
                     87: /* Packet definitions */
                     88: 
                     89: #define NBP_TUPLE_SIZE ((3*NBP_NVE_STR_SIZE)+3) /* 3 for field lengths + 3*32 for three names */
                     90: #define NBP_TUPLE_MAX  15      /* Maximum number of tuples in one DDP packet */
                     91: #define        NBP_HDR_SIZE    2
                     92: 
                     93: typedef struct at_nbptuple {
                     94:        at_inet_t       enu_addr;
                     95:        union {
                     96:          struct {
                     97:             u_char     enumerator;
                     98:            at_entity_t entity;
                     99:          } en_se;
                    100:          struct {
                    101:             u_char     enumerator;
                    102:             u_char     name[NBP_TUPLE_SIZE];
                    103:          } en_sn;
                    104:        } en_u;
                    105: } at_nbptuple_t;
                    106: 
                    107: /* Some macros for easier access to the tuple union */
                    108: #define        enu_enum        en_u.en_sn.enumerator
                    109: #define        enu_name        en_u.en_sn.name
                    110: #define        enu_entity      en_u.en_se.entity
                    111: 
                    112: 
                    113: typedef struct at_nbp {
                    114:         unsigned       control : 4,
                    115:                        tuple_count : 4;
                    116: /* fix for bug 2228529: 
                    117:         u_char         id;*/
                    118:        u_char          at_nbp_id;
                    119:        at_nbptuple_t   tuple[NBP_TUPLE_MAX];
                    120: } at_nbp_t;
                    121: 
                    122:        /* misc */
                    123: #define IF_NAME_LEN            5
                    124: 
                    125: #endif /* __NBP__ */
                    126: 

unix.superglobalmegacorp.com

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