home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Developers / dropg++ / usr / include / netccitt / dll.h next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  3.3 KB  |  84 lines  |  [TEXT/R*ch]

  1. /* 
  2.  * Copyright (C) Dirk Husemann, Computer Science Department IV, 
  3.  *          University of Erlangen-Nuremberg, Germany, 1990, 1991, 1992
  4.  * Copyright (c) 1992, 1993
  5.  *    The Regents of the University of California.  All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Redistributions in binary form must reproduce the above copyright
  13.  *    notice, this list of conditions and the following disclaimer in the
  14.  *    documentation and/or other materials provided with the distribution.
  15.  * 3. All advertising materials mentioning features or use of this software
  16.  *    must display the following acknowledgement:
  17.  *    This product includes software developed by the University of
  18.  *    California, Berkeley and its contributors.
  19.  * 4. Neither the name of the University nor the names of its contributors
  20.  *    may be used to endorse or promote products derived from this software
  21.  *    without specific prior written permission.
  22.  *
  23.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  24.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  27.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  29.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  30.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  32.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33.  * SUCH DAMAGE.
  34.  *
  35.  *    @(#)dll.h    8.1 (Berkeley) 6/10/93
  36.  */
  37.  
  38. /* 
  39.  * We define the additional PRC_* codes in here
  40.  */
  41. #ifdef KERNEL
  42. #ifndef PRC_IFUP
  43. #define PRC_IFUP           3
  44. #endif
  45. #define PRC_CONNECT_INDICATION     8
  46. #define PRC_CONNECT_REQUEST        9
  47. #define PRC_DISCONNECT_REQUEST     10
  48. #define PRC_DISCONNECT_INDICATION  11
  49. #define PRC_RESET_REQUEST          12
  50. #endif
  51.  
  52. /*
  53.  * Data link layer configuration --- basically a copy of the relevant parts
  54.  * of x25config, implemented to become a little bit more network
  55.  * layer independent. (Probably only used for casting et al.)
  56.  */
  57. struct dllconfig {
  58.        u_short dllcfg_unused0:4,
  59.                dllcfg_unused1:4,
  60.                dllcfg_trace:1,     /* link level tracing flag */
  61.                dllcfg_window:7;    /* link level window size */
  62.        u_short dllcfg_xchxid:1,    /* exchange XID (not yet) */
  63.                dllcfg_unused2:7;   /* here be dragons */
  64. };
  65.  
  66. struct dll_ctlinfo {
  67.     union {
  68.         struct {
  69.             struct    dllconfig *dctli_up_cfg;
  70.             u_char    dctli_up_lsap;
  71.         } CTLI_UP;
  72.         struct {
  73.             caddr_t dctli_down_pcb;
  74.             struct rtentry *dctli_down_rt;
  75.             struct dllconfig *dctli_down_llconf;
  76.         } CTLI_DOWN;
  77.     } CTLIun;
  78. };
  79. #define dlcti_cfg  CTLIun.CTLI_UP.dctli_up_cfg
  80. #define dlcti_lsap CTLIun.CTLI_UP.dctli_up_lsap
  81. #define dlcti_pcb  CTLIun.CTLI_DOWN.dctli_down_pcb
  82. #define dlcti_rt   CTLIun.CTLI_DOWN.dctli_down_rt
  83. #define dlcti_conf CTLIun.CTLI_DOWN.dctli_down_llconf
  84.