Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /******************************************************************************
0003  *
0004  *  (C)Copyright 1998,1999 SysKonnect,
0005  *  a business unit of Schneider & Koch & Co. Datensysteme GmbH.
0006  *
0007  *  The information in this file is provided "AS IS" without warranty.
0008  *
0009  ******************************************************************************/
0010 
0011 /*
0012  * Synchronous Bandwidth Allocation (SBA) structs
0013  */
0014  
0015 #ifndef _SBA_
0016 #define _SBA_
0017 
0018 #include "mbuf.h"
0019 #include "sba_def.h"
0020 
0021 #ifdef  SBA
0022 
0023 /* Timer Cell Template */
0024 struct timer_cell {
0025     struct timer_cell   *next_ptr ;
0026     struct timer_cell   *prev_ptr ;
0027     u_long          start_time ;
0028     struct s_sba_node_vars  *node_var ;
0029 } ;
0030 
0031 /*
0032  * Node variables
0033  */
0034 struct s_sba_node_vars {
0035     u_char          change_resp_flag ;
0036     u_char          report_resp_flag ;
0037     u_char          change_req_flag ;
0038     u_char          report_req_flag ;
0039     long            change_amount ;
0040     long            node_overhead ;
0041     long            node_payload ;
0042     u_long          node_status ;
0043     u_char          deallocate_status ;
0044     u_char          timer_state ;
0045     u_short         report_cnt ;
0046     long            lastrep_req_tranid ;
0047     struct fddi_addr    mac_address ;
0048     struct s_sba_sessions   *node_sessions ;
0049     struct timer_cell   timer ;
0050 } ;
0051 
0052 /*
0053  * Session variables
0054  */
0055 struct s_sba_sessions {
0056     u_long          deallocate_status ;
0057     long            session_overhead ;
0058     u_long          min_segment_size ;
0059     long            session_payload ;
0060     u_long          session_status ;
0061     u_long          sba_category ;
0062     long            lastchg_req_tranid ;
0063     u_short         session_id ;
0064     u_char          class ;
0065     u_char          fddi2 ;
0066     u_long          max_t_neg ;
0067     struct s_sba_sessions   *next_session ;
0068 } ;
0069 
0070 struct s_sba {
0071 
0072     struct s_sba_node_vars  node[MAX_NODES] ;
0073     struct s_sba_sessions   session[MAX_SESSIONS] ;
0074 
0075     struct s_sba_sessions   *free_session ; /* points to the first */
0076                         /* free session */
0077 
0078     struct timer_cell   *tail_timer ;   /* points to the last timer cell */
0079 
0080     /*
0081      * variables for allocation actions
0082      */
0083     long    total_payload ;     /* Total Payload */
0084     long    total_overhead ;    /* Total Overhead */
0085     long    sba_allocatable ;   /* allocatable sync bandwidth */
0086 
0087     /*
0088      * RAF message receive parameters
0089      */
0090     long        msg_path_index ;    /* Path Type */
0091     long        msg_sba_pl_req ;    /* Payload Request */
0092     long        msg_sba_ov_req ;    /* Overhead Request */
0093     long        msg_mib_pl ;        /* Current Payload for this Path */
0094     long        msg_mib_ov ;        /* Current Overhead for this Path*/
0095     long        msg_category ;      /* Category of the Allocation */
0096     u_long      msg_max_t_neg ;     /* longest T_Neg acceptable */
0097     u_long      msg_min_seg_siz ;   /* minimum segement size */
0098     struct smt_header   *sm ;       /* points to the rec message */
0099     struct fddi_addr    *msg_alloc_addr ;   /* Allocation Address */
0100 
0101     /*
0102      * SBA variables
0103      */
0104     u_long  sba_t_neg ;     /* holds the last T_NEG */
0105     long    sba_max_alloc ;     /* the parsed value of SBAAvailable */  
0106 
0107     /*
0108      * SBA state machine variables
0109      */
0110     short   sba_next_state ;    /* the next state of the SBA */
0111     char    sba_command ;       /* holds the execuded SBA cmd */
0112     u_char  sba_available ;     /* parsed value after possible check */
0113 } ;
0114 
0115 #endif  /* SBA */
0116 
0117     /*
0118      * variables for the End Station Support
0119      */
0120 struct s_ess {
0121 
0122     /*
0123      * flags and counters
0124      */
0125     u_char  sync_bw_available ; /* is set if sync bw is allocated */
0126     u_char  local_sba_active ;  /* set when a local sba is available */
0127     char    raf_act_timer_poll ;    /* activate the timer to send allc req */
0128     char    timer_count ;       /* counts every timer function call */
0129 
0130     SMbuf   *sba_reply_pend ;   /* local reply for the sba is pending */
0131     
0132     /*
0133      * variables for the ess bandwidth control
0134      */
0135     long    sync_bw ;       /* holds the allocaed sync bw */
0136     u_long  alloc_trans_id ;    /* trans id of the last alloc req */
0137 } ;
0138 #endif