home *** CD-ROM | disk | FTP | other *** search
/ Hacker Chronicles 2 / HACKER2.BIN / 531.L2V.C < prev    next >
Text File  |  1988-05-14  |  7KB  |  113 lines

  1. /**************************************************************************\
  2. *                                                                          *
  3. *                                                                          *
  4. *    *****                      *****                                      *
  5. *      *****                  *****                                        *
  6. *        *****              *****                                          *
  7. *          *****          *****                                            *
  8. *            *****      *****                                              *
  9. *              *****  *****                                                *
  10. *            *****      *****                                              *
  11. *          *****          *****          The Firmware. The Net.            *
  12. *        *****              *****        Portable. Compatible.             *
  13. *      *****                  *****      Public Domain.                    *
  14. *    *****                      *****    By NORD><LINK.                    *
  15. *                                                                          *
  16. *                                                                          *
  17. *                                                                          *
  18. *    L2V.C   -   Level 2, globale Variable                                 *
  19. *                                                                          *
  20. *    angelegt:      DC4OX                                                  *
  21. *    modifiziert:                                                          *
  22. *                                                                          *
  23. \**************************************************************************/
  24.  
  25.  
  26.  
  27.  
  28.  
  29. /*                                                             Includes   */
  30. /**************************************************************************/
  31.  
  32. #include "all.h"         /* allgemeine Festlegungen                       */
  33. #include "l2.h"          /* Festlegungen/Datenstrukturen fuer den Level 2 */
  34.  
  35.  
  36.  
  37.  
  38.  
  39. /*                                                              Globals   */
  40. /**************************************************************************/
  41.  
  42. char        myid[L2IDLEN];    /* Call (normal) + SSID (1 Bit linksgesch.) */
  43. char        alias[L2CALEN];   /* Ident der Station                        */
  44.  
  45. #ifndef FIRMWARE
  46. char        istraf[L2PNUM];   /* != 0 -> Frame gesendet                   */
  47. #endif
  48.  
  49. char        nmblks;           /* Anzahl aktiver Level-2-Links (1..127)    */
  50. char        Ypar;             /* Anzahl moeglicher Links (Y-Befehl)       */
  51. char        Vpar;             /* 0 = Linkaufbau mit Version 1 Protokoll   */
  52.                               /* 1 = Linkaufbau mit Version 2 Protokoll   */
  53.                               /* (V-Befehl)                               */
  54.                               
  55.                               /* empfangenes Frame :                      */
  56. char        rxfhdr[L2AFLEN+1];/*   Header (Ziel/Quell/via-Id's), 0-term.  */
  57. char        rxfctl;           /*   Kontrollbyte ohne P/F-Bit              */
  58. char        rxfPF;            /*   V1-Frame: 0                            */
  59.                               /*   V2-Frame: 0x10 = P/F gesetzt, 0 sonst  */
  60. char        rxfV2;            /*   0 = V1-Frame, 1 = V2-Frame             */
  61. char        rxfCR;            /*   V1-Frame: 0                            */
  62.                               /*   V2-Frame: 0x80 = Command-Frame         */
  63.                               /*             0x00 = Response-Frame        */
  64. char        rxfprt;           /*   0 = HDLC-Frame, 1 = Crosslink-Frame    */
  65.                               
  66.                               /* zu sendendes Frame :                     */
  67. char        txfhdr[L2AFLEN+1];/*   Header (Ziel/Quell/via-Id's), 0-term.  */
  68. char        txfctl;           /*   Kontrollbyte ohne P/F-Bit              */
  69. char        txfPF;            /*   V1-Frame: 0                            */
  70.                               /*   V2-Frame: 0x10 = P/F gesetzt, 0 sonst  */
  71. char        txfV2;            /*   0 = V1-Frame, 1 = V2-Frame             */
  72. char        txfCR;            /*   V1-Frame: 0                            */
  73.                               /*   V2-Frame: 0x80 = Command-Frame         */
  74.                               /*             0x00 = Response-Frame        */
  75. char        txfprt;           /*   0 = HDLC-Frame, 1 = Crosslink-Frame    */
  76.  
  77. unsigned    Fpar;             /* FRACK      sec               F-Befehl    */
  78. unsigned    Opar;             /* MAXFRAME   0..7              O-Befehl    */
  79. unsigned    Npar;             /* RETRY      0..127            N-Befehl    */
  80. unsigned    T2par;            /* T2         20ms              @-T2-Befehl */
  81. unsigned    T3par;            /* T3         sec               @-T3-Befehl */
  82. unsigned    Rpar;             /* DIGION     0..1              R-Befehl    */
  83.                               /* 1 = Digipeaten ein, 0 = aus              */
  84. unsigned    nmbfre;           /* "number free", Anzahl freier 32-Byte-    */
  85.                               /* Buffer (36 Byte mit Kopf)                */
  86. LHEAD       freel;            /* "free list",                             */
  87.                               /* Listenkopf Freibuffer                    */
  88. LHEAD       rxfl;             /* "rx frame list",                         */
  89.                               /* Listenkopf empfangene Frames             */
  90. LHEAD       stfl;             /* "sent frame list",                       */
  91.                               /* Listenkopf gesendete Frames              */
  92. LHEAD       trfl;             /* "trash frame list",                      */
  93.                               /* Listenkopfe Frames fuer den Muelleimer   */
  94. LHEAD       txl2fl[L2PNUM];   /* "tx level 2 frame list",                 */
  95.                               /* Listenkoepfe (je Port einer) zu sendende */
  96.                               /* Frames                                   */
  97. MBHEAD     *rxfhd[L2PNUM];    /* "rx frame head",                         */
  98.                               /* Zeiger (je Port einer) auf das gerade    */
  99.                               /* aktuelle Frame waherend Empfang,         */
  100.                               /* 0 = es wird gerade kein Frame empfangen  */ 
  101. MBHEAD     *txfhd[L2PNUM];    /* "tx frame head",                         */
  102.                               /* Zeiger (je Port einer) auf das gerade    */
  103.                               /* aktuelle Frame waherend Sendung,         */
  104.                               /* 0 = es wird gerade kein Frame gesendet   */
  105. LNKBLK      lnktbl[LINKNMBR]; /* "link table", fuer jeden moeglichen      */
  106.                               /* Level-2-Link ein Eintrag                 */
  107. LNKBLK     *lnkpoi;           /* "link pointer", globaler Zeiger auf den  */
  108.                               /* gerade aktuellen Linkblock (in lnktbl)   */
  109.  
  110.  
  111.  
  112. /* Ende von L2V.C */
  113.