sba.h 3.5 KB

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