1 /****************************************************************************** 2 * 3 * (C)Copyright 1998,1999 SysKonnect, 4 * a business unit of Schneider & Koch & Co. Datensysteme GmbH. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * The information in this file is provided "AS IS" without warranty. 12 * 13 ******************************************************************************/ 14 15 /* 16 * Synchronous Bandwidth Allocation (SBA) structs 17 */ 18 19 #ifndef _SBA_ 20 #define _SBA_ 21 22 #include "h/mbuf.h" 23 #include "h/sba_def.h" 24 25 #ifdef SBA 26 27 /* Timer Cell Template */ 28 struct timer_cell { 29 struct timer_cell *next_ptr ; 30 struct timer_cell *prev_ptr ; 31 u_long start_time ; 32 struct s_sba_node_vars *node_var ; 33 } ; 34 35 /* 36 * Node variables 37 */ 38 struct s_sba_node_vars { 39 u_char change_resp_flag ; 40 u_char report_resp_flag ; 41 u_char change_req_flag ; 42 u_char report_req_flag ; 43 long change_amount ; 44 long node_overhead ; 45 long node_payload ; 46 u_long node_status ; 47 u_char deallocate_status ; 48 u_char timer_state ; 49 u_short report_cnt ; 50 long lastrep_req_tranid ; 51 struct fddi_addr mac_address ; 52 struct s_sba_sessions *node_sessions ; 53 struct timer_cell timer ; 54 } ; 55 56 /* 57 * Session variables 58 */ 59 struct s_sba_sessions { 60 u_long deallocate_status ; 61 long session_overhead ; 62 u_long min_segment_size ; 63 long session_payload ; 64 u_long session_status ; 65 u_long sba_category ; 66 long lastchg_req_tranid ; 67 u_short session_id ; 68 u_char class ; 69 u_char fddi2 ; 70 u_long max_t_neg ; 71 struct s_sba_sessions *next_session ; 72 } ; 73 74 struct s_sba { 75 76 struct s_sba_node_vars node[MAX_NODES] ; 77 struct s_sba_sessions session[MAX_SESSIONS] ; 78 79 struct s_sba_sessions *free_session ; /* points to the first */ 80 /* free session */ 81 82 struct timer_cell *tail_timer ; /* points to the last timer cell */ 83 84 /* 85 * variables for allocation actions 86 */ 87 long total_payload ; /* Total Payload */ 88 long total_overhead ; /* Total Overhead */ 89 long sba_allocatable ; /* allocatable sync bandwidth */ 90 91 /* 92 * RAF message receive parameters 93 */ 94 long msg_path_index ; /* Path Type */ 95 long msg_sba_pl_req ; /* Payload Request */ 96 long msg_sba_ov_req ; /* Overhead Request */ 97 long msg_mib_pl ; /* Current Payload for this Path */ 98 long msg_mib_ov ; /* Current Overhead for this Path*/ 99 long msg_category ; /* Category of the Allocation */ 100 u_long msg_max_t_neg ; /* longest T_Neg acceptable */ 101 u_long msg_min_seg_siz ; /* minimum segement size */ 102 struct smt_header *sm ; /* points to the rec message */ 103 struct fddi_addr *msg_alloc_addr ; /* Allocation Address */ 104 105 /* 106 * SBA variables 107 */ 108 u_long sba_t_neg ; /* holds the last T_NEG */ 109 long sba_max_alloc ; /* the parsed value of SBAAvailable */ 110 111 /* 112 * SBA state machine variables 113 */ 114 short sba_next_state ; /* the next state of the SBA */ 115 char sba_command ; /* holds the execuded SBA cmd */ 116 u_char sba_available ; /* parsed value after possible check */ 117 } ; 118 119 #endif /* SBA */ 120 121 /* 122 * variables for the End Station Support 123 */ 124 struct s_ess { 125 126 /* 127 * flags and counters 128 */ 129 u_char sync_bw_available ; /* is set if sync bw is allocated */ 130 u_char local_sba_active ; /* set when a local sba is available */ 131 char raf_act_timer_poll ; /* activate the timer to send allc req */ 132 char timer_count ; /* counts every timer function call */ 133 134 SMbuf *sba_reply_pend ; /* local reply for the sba is pending */ 135 136 /* 137 * variables for the ess bandwidth control 138 */ 139 long sync_bw ; /* holds the allocaed sync bw */ 140 u_long alloc_trans_id ; /* trans id of the last alloc req */ 141 } ; 142 #endif 143